return
Returns a value from an instrument at i-time.
The value of a global instrument (instrument 0) can be retrieved after compilation by the evalstr opcode. The retrieval of values returned by other instruments is not yet implemented.
Syntax
Initialization
ival -- a value to be returned by instrument.
Examples
Here is a short example of return with evalstr.
The complete example plays a bell arpeggio over a bass line, with stereo echoes and reverb. It builds on tjingboem's example from issue #315.
Instrument 2 builds a code string for each note. In that string, return supplies a frequency to evalstr, which assigns it to iFreq. The console prints each returned frequency as the melody plays. The code in the string runs in the global space, even though instrument 2 calls evalstr.
Change the offsets in iNotes to make a new melody, or change the roots in score field p4 to try a different chord sequence. Score field p5 raises the melody by octaves on the second pass.
It uses the file return.csd.
See Also
evalstr, String Manipulation Opcodes
Credits
Author: Victor Lazzarini, 2013