OK thanks to all of you that replies and explanations on this
-- i am very surprised it has so much difference in performance!
One option of course would be to have opcodes [ especially ones whose
f-tables are given at i-rate ] look to see if the table size is a p-
o-2 in the i-pass.
Then it could set a function pointer to either an optimized p-o-2 or
non po2
routine for p-time accordingly.
But the main thing i am annoyed with as a USER
is that i do not want to THINK about power-of-2. And after
teaching this csound class
this past semester i can tell you i am not the only one!
i think at the very least we could add default table sizes so the
user could just
specify 0 for the table size - i think in most general cases you just
want to use gen10
with an oscili or something and not need to worry about tablesize - a
reasonable
default size [ 1024? ] would be a nice feature.
the other frequently annoying case is large gen01 functions --
getting more opcodes to
support "deferred" sizes would be really nice.
i don't know, maybe all this should just be done in some kind of
front-end pre-process..
and did i mention more multichannel gen01 support as well?
Post by Richard DobsonPost by Istvan VargaPost by Richard DobsonThe issue that would have to be addressed (and whcih I have
always seen as the main obstacle to the proposed changes) is
indeed the definition of the guard point, on which many opcodes
rely. In the current scheme, the contents of the opcode are
indicated by the table size being either a pow_of_2 or pow_of_2
+1, relying on the special significance of the pow_of_2 value.
Probably that is why the non-power of two table sizes are specified
as negative numbers. In this mode, the size always includes the guard
point, like in the pow_of_2+1 case above. A p3 of -101 means 100 samples
and a guard point which is not copied from sample 0.
This is OK if the reduced flexibility compared to the standard
system is accepted. That is to say, it only supports the extension"
form of guard point. It does not therefore form a complete
substitute for the standard system. Of course, for waveform lookup
tables there is no obvious reason not to use a power-of-two table,
but the second (wraparound) guard-point form is still important; I
guess the trust is that it will never (?) be required for a non
power-of-two size. Given the ingenuity of Csound users, I find that
difficult to believe! I fully appreciate the problems the power-of-
two requirement poses; but a ~lot~ of efficiency was gained by that
design, not least in the fact that opcodes had to perform
absolutely no special actions depending on the size of the table.
Put another way - gaining the use of arbitrary table sizes may yet
mean losing quite a lot. I would be very interested to see
benchmark comparisons, especially for the case ksmps = 1.
Richard Dobson
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?
cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Csound-devel mailing list
https://lists.sourceforge.net/lists/listinfo/csound-devel
Matt;
________________________
matt ingalls
http://sonomatics.com
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642