midichnReal-time MIDI:MIDI/Score Interoperabilitymidichnmidichn
Returns the MIDI channel number from which the note was activated.
Descriptionmidichn returns the MIDI channel number (1 - 16) from which the note was activated. In the case of score notes, it returns 0.
Syntaxichn midichnInitializationichn -- channel number. If the current note was activated from score, it is set to zero.
Examples
Here is a simple example of the midichn opcode. It uses the file midichn.csd.
Example of the midichn opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
Here is an advanced example of the midichn opcode. It uses the file midichn_advanced.csd.
Do not forget that you must include the -F flag when using an external MIDI file like midichn_advanced.mid.
An advanced example of the midichn opcode.
Its output should include lines like:
note 1 (time = 0.00) was activated from channel 1
note 2 (time = 2.00) was activated from channel 4
note 3 (time = 3.00) was activated from channel 2
note 4 (time = 5.00) was activated from channel 3
See alsoMIDI input and InitializationMIDI/Score InteroperabilityCreditsAuthor: &nameistvan;May 2002New in version 4.20