outkpc
Sends MIDI program change messages at k-rate.
Syntax
Performance
kchn -- MIDI channel number (1-16)
kprog -- program change number in floating point
kmin -- minimum floating point value (converted in MIDI integer value 0)
kmax -- maximum floating point value (converted in MIDI integer value 127 (7 bit))
outkpc (k-rate program change output) sends program change messages. It works only with MIDI instruments which recognize them. These opcodes can drive a different value of a parameter for each note currently active.
It can scale the k-value floating-point argument according to the kmin and kmax values. For example: set kmin = 1.0 and kmax = 2.0. When the kvalue argument receives a 2.0 value, the opcode will send a 127 value to the MIDI OUT device. When the kvalue argument receives a 1.0 value, it will send a 0 value. k-rate opcodes send a message each time the MIDI converted value of argument kvalue changes.
Examples
Here is an example of the outkpc opcode. It uses the file outkpc.csd.
Here is another example of the outkpc opcode. It uses the file outkpc_flkt.csd.
See also
Credits
Author: Gabriel Maldonado
Italy
New in Csound version 3.47
Thanks goes to Rasmus Ekman for pointing out the correct MIDI channel and controller number ranges.