[Csnd] Deferred length GEN tables
| Date | 2005-09-21 03:23 |
| From | David Akbari |
| Subject | [Csnd] Deferred length GEN tables |
Hi List, I was wondering if the following would be considered a BUG or a FEATURE ?? |
| Date | 2005-09-21 04:04 |
| From | luis jure |
| Subject | Re: [Csnd] Deferred length GEN tables |
el Tue, 20 Sep 2005 22:23:32 -0400 David Akbari |
| Date | 2005-09-22 09:35 |
| From | Istvan Varga |
| Subject | Re: [Csnd] Deferred length GEN tables |
David Akbari wrote: > I was wondering if the following would be considered a BUG or a FEATURE ?? > > ... > > It would seem that simply changing the tablesize to a power of two like > 131072 or 262144 works OK, but I mean I really think the table opcodes > should be able to read deferred size GEN tables ... is this idea > possible at present, and I am just unaware of how to implement it? It has always been this way, I do not think the table opcodes ever supported deferred tables. While the opcodes can be changed to allow non power of two sizes, the cost is increased CPU usage whenever wrapping to table length is needed. -- Send bugs reports to this list. To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk |
| Date | 2005-09-23 15:26 |
| From | David Akbari |
| Subject | Re: [Csnd] Deferred length GEN tables |
On Sep 22, 2005, at 4:35 AM, Istvan Varga wrote: > > It has always been this way, I do not think the table opcodes ever > supported deferred tables. While the opcodes can be changed to allow > non power of two sizes, the cost is increased CPU usage whenever > wrapping to table length is needed. This is a good reason to not allow the table opcode to be able to index non deferred f-tables, but what about the tableng opcode? I think it would be quite useful to at least be able to use the idea of a table length in samples which is obtained at i-rate. For example, the following code results in an error which I do not believe it should: |
| Date | 2005-09-23 17:05 |
| From | Istvan Varga |
| Subject | Re: [Csnd] Deferred length GEN tables |
I changed tableng to allow non power of two table sizes (note that you can already use ftlen on deferred tables). It should be noted, though, that the returned table length is the total number of (mono) samples - 1 (for the guard point), for example with a stereo file of 20000 sample frames, 39999 would be returned. David Akbari wrote: > This is a good reason to not allow the table opcode to be able to index > non deferred f-tables, but what about the tableng opcode? I think it > would be quite useful to at least be able to use the idea of a table > length in samples which is obtained at i-rate. -- Send bugs reports to this list. To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk |
| Date | 2005-09-23 18:38 |
| From | David Akbari |
| Subject | Re: [Csnd] Deferred length GEN tables |
On Sep 23, 2005, at 12:05 PM, Istvan Varga wrote: > I changed tableng to allow non power of two table sizes (note that you > can already use ftlen on deferred tables). It should be noted, though, > that the returned table length is the total number of (mono) samples - > 1 > (for the guard point), for example with a stereo file of 20000 sample > frames, 39999 would be returned. That is quite amazing ... Thanks, Istvan! Hopefully other users as well as myself will be more encouraged to use variety in implementations involving the indexing of digital audio files stored in tables! Also thanks for pointing out the inherent problem in trying to directly index a deferred length table. Studying the idea closer, it would probably result in a fairly large CPU hit in trying to make sure the array is not indexed past it's overall length; and potentially unstable if the user is not extensively careful in their implementation. In that case it seems users would be better off just using a diskin or soundin opcode. -David (Thanks again!!) -- Send bugs reports to this list. To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk |