| jpff@codemist.co.uk wrote:
> It would be very useful in a research project here to be able to
> define orchestra macros from the command line. In csound4 I have
> hacked in a --macro:FOO=bar option, but that is not clean. If we do
> this in csound5 it either needs an API entry or it could be fakes as
> in cs4, or made a little cleaner. The purpose of this message is to
> seek input form others as either why this should not be allowed or how
> to do it nicely
I already had options in my old "unofficial" Csound4 version to define
any number of orchestra or score macros from the command line, although
I am not sure if it is done in an elegant way.
By the way, I do not know if this is useful for the project, but Csound5
allows defining strset strings from the command line. These are suitable
for passing arguments like file names to the orchestra, but for special
purposes like defining an opcode name (which needs actual text replacement),
macros are needed.
An example of using --strset, that you can try with Csound5:
csound -d -m231 -H0 -f -h -n --strset1="Hello, world" --strset2=1.23 strset.csd
sr = 48000
ksmps = 32
nchnls = 1
0dbfs = 1
gSfoo strget 1
gSbar strget 2
gibar strtod gSbar
instr 1
Stmp sprintf "gSfoo = '%s', gibar = '%g'\n", gSfoo, gibar
puts Stmp, 1
endin
i 1 0 1
e
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |