The Alternative Csound Reference Manual
Previous |  | Next

# pchmidi

pchmidi -- Get the note number of the current MIDI event, expressed in pitch-class units.

## Description

Get the note number of the current MIDI event, expressed in pitch-class units.

## Syntax

ipch pchmidi

## Performance

Get the note number of the current MIDI event, expressed in pitch-class units for local processing.

## Examples

Here is an example of the pchmidi opcode. It uses the files pchmidi.orc and pchmidi.sco.

Example 1. Example of the pchmidi opcode.

    /* pchmidi.orc */
    ; Initialize the global variables.
    sr = 44100
    kr = 4410
    ksmps = 10
    nchnls = 1

    ; Instrument #1.
    instr 1
      i1 pchmidi

      print i1
    endin
    /* pchmidi.orc */

    /* pchmidi.sco */
    ; Play Instrument #1 for 12 seconds.
    i 1 0 12
    e
    /* pchmidi.sco */

## See Also

aftouch, ampmidi, cpsmidi, cpsmidib, midictrl, notnum, octmidi, octmidib, pchbend, pchmidib, veloc

## Credits

Author: Barry L. Vercoe - Mike Berry
MIT - Mills
May 1997

Example written by Kevin Conder.

Previous | Home | Next
pchbend | Up | pchmidib