ctrl21Real-time MIDI:Inputctrl21ctrl21
Allows a floating-point 21-bit MIDI signal scaled with a minimum and a maximum range.
Description
Allows a floating-point 21-bit MIDI signal scaled with a minimum and a maximum range.
Syntaxidest ctrl21 ichan, ictlno1, ictlno2, ictlno3, imin, imax [, ifn]kdest ctrl21 ichan, ictlno1, ictlno2, ictlno3, kmin, kmax [, ifn]Initializationidest -- output signal
ichan -- MIDI channel number (1-16)
ictlno1 -- most-significant byte controller number (0-127)
ictlno2 -- mid-significant byte controller number (0-127)
ictlno3 -- least-significant byte controller number (0-127)
imin -- user-defined minimum floating-point value of output
imax -- user-defined maximum floating-point value of output
ifn (optional) -- table to be read when indexing is required. Table must be normalized. Output is scaled according to imax and imin val.
Performancekdest -- output signal
kmin -- user-defined minimum floating-point value of output
kmax -- user-defined maximum floating-point value of output
ctrl21 (i- and k-rate 21 bit MIDI control) allows a floating-point 21-bit MIDI signal scaled with a minimum and a maximum range. Minimum and maximum values can be varied at k-rate. It can use optional interpolated table indexing. It requires three MIDI controllers as input.
ctrl21 differs from midic21 because it can be included in score oriented instruments without Csound crashes. It needs the additional parameter ichan containing the MIDI channel of the controller. MIDI channel is the same for all the controllers used in a single ctrl21 opcode.
Examples
Here is an example of the ctrl21 opcode. It uses the file ctrl21.csd.
Example of the ctrl21 opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.See alsoMIDI input and InitializationCreditsAuthor: &namegabriel;ItalyNew in Csound version 3.47Thanks goes to &namerasmus; for pointing out the correct MIDI channel and controller number ranges.