nstrnumInstrument Control:Initialization and Reinitializationnstrnumnstrnum
Returns the number of a named instrument.
Description
Returns the number of a named instrument.
Syntaxinsno nstrnum "name"Initializationinsno -- the instrument number of the named instrument.
Performance"name" -- the named instrument's name.
If an instrument with the specified name does not exist, an init error occurs, and -1 is returned.
Examples
Here is an example of the nstrnum opcode. It uses the file nstrnum_nstrstr.csd.
Example of the nstrnum opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
A musical examples featuring the nstrnum opcode: TivalNstrnum_Yi.csd by Steven Yi.
The example will produce the following output:
instrument name = john
instrument number = 2
See alsoInitialization and ReinitializationCreditsAuthor: &nameistvan;New in version 4.23Written in the year 2002.