cec_midi name event channel min max ?init?
event: pbend|touch|veloc|notnum|ctrl[1-127] channel: 1 to 16 min & max: real-numbers ?init?: a real-number between min and max
Note that the normal Cecilia substitution is not in effect in this case. Variables are referenced in the user orchestra by their name prefixed with "gk".
When the orchestra and score are compiled, the cec_midi object creates its own instruments to preprocess midi information within Csound. This is not normally seen by the user.
Remember that a midi instrument must be launched with a midi note-on message for it to transmit any data. Therefor, if a pitch bend message is used to control a variable, it is important to understand that the pitchbend data will be accepted only if there is a currently active midi note. A good way to get around this problem is to program the desired JLCooper fader to delivers midi note-on messages. The user can then specify the velocity received as the data carrier. This way, a note-on message will always be sent along with the desired velocity data.
A regular cec_slider is always produced along with a cec_midi. That slider is used to set a portamento or lag value for the midi data. The portamento value is issued automatically at init time only.
An option menu is also produced with the options: practice, midi_record, playback, load and save. The user can record any midi event with midi_record and replay them with playback. A given stream can be saved under any name with save and recalled with load. Practice allows to simply play the sliders without recording.
It is compulsory, when using the cec_midi object to also declare a "total_time" cec_slider.
cec_midi pitch veloc 16 0 45 10
The definition:
cec_midi amp ctrl28 16 .5 10 10