csound / manual

Csound Reference Manual (English)
Other
45 stars 29 forks source link

Remove all power-of-two requirements for function tables #667

Open joachimheintz opened 1 year ago

joachimheintz commented 1 year ago

I think it is not any more true that function tables need to be power of two. but still it is written in the manual, like for GEN27:

size -- number of points in the table. Must be a power of 2 or power-of-2 plus 1

can it be removed?

tjingboem commented 1 year ago

list of GENs where this is mentioned: ./gen01.xml ./gen02.xml ./gen03.xml ./gen04.xml ./gen05.xml ./gen06.xml ./gen07.xml ./gen08.xml ./gen09.xml ./gen10.xml ./gen11.xml ./gen12.xml ./gen13.xml ./gen14.xml ./gen15.xml ./gen16.xml ./gen17.xml ./gen18.xml ./gen19.xml ./gen20.xml ./gen23.xml ./gen25.xml ./gen27.xml ./gen30.xml ./gen31.xml ./gen33.xml ./gen34.xml ./gen43.xml ./gen49.xml ./gen53.xml ./genexp.xml ./genfarey.xml ./genpadsynth.xml ./gensone.xml ./gentanh.xml ./genwave.xml

vlazzarini commented 1 year ago

I think it can in this case (GEN27), but some (the FFT-based GENs) may need to be power-of-two because of the Radix-2 FFT used. We can change this in Csound 7 to use mix-radix FFTs.

One issue that arises when not using power-of-two sizes is the question of guard point type, which is defined indirectly via the table size (it may have been a great idea then, but it's a horrible one now). Basically, there is no way to specify an extended guardpoint for non-power-of-two sizes. We will need to tackle that in Csound 7.