ctrl7 Real-time MIDI:Input ctrl7 ctrl7 Allows a floating-point 7-bit MIDI signal scaled with a minimum and a maximum range. Description Allows a floating-point 7-bit MIDI signal scaled with a minimum and a maximum range. Syntax idest ctrl7 ichan, ictlno, imin, imax [, ifn] kdest ctrl7 ichan, ictlno, kmin, kmax [, ifn] adest ctrl7 ichan, ictlno, kmin, kmax [, ifn] [, icutoff] Initialization idest -- output signal ichan -- MIDI channel (1-16) ictlno -- MIDI 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. icutoff (optional) -- low pass filter cut-off frequency for smoothing a-rate output. Performance kdest, adest -- output signal kmin -- user-defined minimum floating-point value of output kmax -- user-defined maximum floating-point value of output ctrl7 (i- and k-rate 7 bit MIDI control) allows a floating-point 7-bit MIDI signal scaled with a minimum and a maximum range. It also allows optional non-interpolated table indexing. Minimum and maximum values can be varied at k-rate. ctrl7 differs from midic7 because it can be included in score-oriented instruments without Csound crashes. It also needs the additional parameter ichan containing the MIDI channel of the controller. The a-rate version of ctrl7 outputs an a-rate variable, which is low-pass filtered (smoothed). It contains an optional icutoff parameter, to set the cutoff frecuency for the low-pass filter. The default is 5. Examples Here is an example of the ctrl7 opcode. It uses the file ctrl7.csd. Example of the ctrl7 opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. ctrl7 only outputs k values once the controller is first moved. To set an initial k-value, a call to initc7 is required. Ctrlinit does not work for this purpose. See also MIDI input and Initialization Credits Author: &namegabriel; Italy New in Csound version 3.47 Thanks goes to &namerasmus; for pointing out the correct MIDI channel and controller number ranges. The a-rate version of ctrl7 was added in version 5.06