Midi

midi (<eventType>) (<note number/control channel/program/pitchbend value>) (<velocity/control value/aftertouch value>)

Triggers whenever CoyoteMIDI recieves a MIDI event from an input device.

Parameters:

  1. The type of MIDI event to listen for.
  2. The MIDI number for the event. For example, for “NOTE”, this is the note number, for “CONTROLCHANGE”, this is the control change number, and for “PITCHBEND”, this is the pitch.
  3. The MIDI value for the event. For example, the note velocity, or the control change value. This parameter would be unused for pitchbend and program changes. The default value is 127.

Variable map:

  • type: The type of MIDI event.
  • midinumber: The catch-all MIDI number associated with this event, regardless of event type.
  • midivalue: The catch-all MIDI value associated with this event, regardless of event type.
  • channel: The MIDI channel number, ranging from 0 to 15.
  • note: The note number, if the MIDI event type is Note.
  • velocity: The note velocity, if the MIDI event type is Note.
  • controlnumber: The control change number, if the MIDI event type is ControlChange.
  • controlvalue: The control change value, if the MIDI event type is ControlChange.
  • pitchbend: The pitchbend value, if the MIDI event type is PitchBend.
  • program: The program change number, if the MIDI event type is ProgramChange.
  • aftertouchvalue: The aftertouch value, if the MIDI event type is NoteAfterTouch or ChannelAfterTouch.
  • device: The name of the MIDI device.
  • silenced: Whether the event has been silenced or surpressed by CoyoteMIDI.

Return: True or false to control whether the MIDI event should be ignored in CoyoteMIDI and not be sent to the MIDI output devices.