[Csnd] GEN51 vs GEN2

Hi all,

I want to join everybody saying thank you Shane and everyone for this year incredible conference!

Just wanted to ask also..
What's the difference between GEN51 and GEN2? Is GEN51 deprecated?
I mean, in the cpstun family opcode both are shown, but I cannot figure out what changes.
When I try to use it for a tuning system Csound says "ftable 151: deferred size for GENs 1, 2, 23, 28 or 49 only"
Thank you!

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here

Nov 9 2022, SUBSCRIBE CSOUND Anonymous has written:
...

What's the difference between GEN51 and GEN2? Is GEN51 deprecated?

...
These two generators have quite a different purpose. GEN02 is a very
simple generator, just taking values that you give it, either during
creation or later on. It does not do anything with them. So:
iList = ftgen0, 0, 4, \-2, 1, \-2, 3, \-4
will fill iList with the values 1, -2, 3 and -4.

GEN51, however, takes the input parameters as controls to create a
microtuning scale, which a few Csound opcodes can use (cpstun, cpstuni,
cpstmid). So it's specific to those, though you can still use it in
other custom areas. If you plan to use it with MIDI you'd set a size of
128, because there are 128 MIDI notes from 0 to 127. With bassfreq and
basskey you can specify one reference point. Say you want A440 on MIDI
key 69. You can use this value to "transpose" your tuning.

So you see, those two table generators are completely different beasts.
GEN51 actually calculates values for you. Be sure to use -51 as the
gen number when creating a tuning table. That means that values you give
it will not be rescale to a range between 0 and 1. It's one of those
things. It might not be necessary in the very latest versions anymore.

Best wishes,

Jeanette

Jeanette is correct and eloquent as usual. :I use GEN51 (-51) in almost all of my pieces.

  • Dave