From: Istvan Varga ()
Date: Apr 29, 2005
Subject:
--strset option, strtod and strtol opcodes
The --strset option allows setting strset string values from the command line,
in the format '--strsetN=VALUE'. It is useful for passing parameters to the
orchestra (e.g. file names).
------------------------------------------------------------------------------
ir strtod Sstr
ir strtod indx
kr strtodk Sstr
kr strtodk kndx
ir strtol Sstr
ir strtol indx
kr strtolk Sstr
kr strtolk kndx
These opcodes convert a string to a floating point (strtod) or a signed
integer (strtol) value. strtol can parse numbers in decimal, octal (prefixed
by 0), and hexadecimal (with a prefix of 0x) format.
It is also possible to pass an strset index or a string p-field from the
score instead of a string argument. Both strtod and strtol have an i-time
only version and one that runs both at initialization and performance time
(note: in the latter case, if a k-rate index variable is used, it should be
valid at i-time as well).
If the string cannot be parsed as a floating point or integer number, an
init or perf error occurs and the instrument is deactivated.
-- [EMAIL REMOVED] (or to http://www.cs.bath.ac.uk/cgi-bin/csound ) [EMAIL REMOVED]