I suppose for the purpose of a simple sound, the sine wave is quite fine. So
your instrument might look something like this:
iamp = 15000
iftable = 1
aout oscil iamp, p4, iftable
For a stereo instrument use outs like this:
outs aout, aout
You can simply calculate the pitch in Hertz and call the instrument like
this in the score:
i1 0 2 440
i1 2 2 494
There already are some opcodes for micro-tonal scales. Take a look at the
cpstmid, cpstun, cpstuni, cpsxpch. You should find easy examples in the manual
accompanying the explanations.
One note about the instrument I've written up there: p? means the argument
to the istrument in the score, it's like shellscript variable $1, $2,... the
first three parameters are always assigned to constant things: p1 number of
the instrument "instr 1", p2 start-time of the note, p3 length of the note
(both in seconds, can be any floatingpointnumber). From p4 onwards you can
dedicate parameters to whatever you wish.
I hope this helps.
Such Is Life: Very Intensely Adorable;
Free And Jubilating Amazement Revels, Dancing On - FLOWERS!
====== Find my music at ======
"If you live to be 100, I hope I live to be 100 minus 1 day,
so I never have to live without you." (Winnie the Pooh)
Linux-audio-user mailing list