ctrlinit
ctrlinit —
Sets the initial values for a set of MIDI controllers.
Description
Sets the initial values for a set of MIDI controllers.
Syntax
ctrlinit ichnl, ictlno1, ival1 [, ictlno2] [, ival2] [, ictlno3] \
[, ival3] [,...ival32]
Initialization
ichnl -- MIDI channel number (1-16)
ictlno1, ictlno1, etc. -- MIDI controller numbers (0-127)
ival1, ival2, etc. --
initial value for corresponding MIDI controller number, in the
range 0 to 127.
|
Note |
If this opcode is to be used with a scaling opcode such as
ctrl7 the ival1.. should be 127*(initial-min)/(max-min)
|
Performance
Sets the initial values for a set of MIDI controllers.
Examples
Here is an example of the ctrlinit opcode. It uses the file ctrlinit.csd.
Example 195. Example of the ctrlinit opcode.
See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
<CsoundSynthesizer>
<CsOptions>
-d
</CsOptions>
<CsInstruments>
sr = 44100
nchnls = 1
0dbfs = 1
ctrlinit 1,1,64 ; init control to 64.
instr 1
kval ctrl7 1,1,0,1 ; read in the range 0-1
printk2 kval ; prints 0.50394
endin
</CsInstruments>
<CsScore>
i1 0 1
</CsScore>
</CsoundSynthesizer>
Credits
Author: Barry L. Vercoe - Mike Berry |
MIT, Cambridge, Mass. |
New in Csound version 3.47
Thanks goes to Rasmus Ekman for pointing out the correct MIDI channel and controller number ranges.