monitor plus

mod of factory monitor Dumps incoming MIDI data to the log. Useful for diagnostics, but do not leave it in a patch for real playing! Occasionally causes disconnects. modded to include channel touch and clock messages, plus tells you which device/port dev 1 = DIN
Author: Mattilyn Mattroe
License: GPL
Github: matroe/midi/monitor plus.axo

Inlets

None

Outlets

None

Parameters

bool32.tgl Enable to monitor Control Change messages

bool32.tgl Enable to monitor Note On/Off messages

bool32.tgl Enable to monitor Program Change messages

bool32.tgl Enable to monitor Pitch Bend messages

bool32.tgl Enable to monitor Polyphonic Pressure messages

bool32.tgl Enable to monitor Channel Pressure messages

bool32.tgl Clock

bool32.tgl StartStop

Declaration
bool p_Note;
bool p_PolyPressure;
bool p_ControlChange;
bool p_ProgramChange;
bool p_Bend;
bool p_ChannelPressure;
bool p_Clock;
bool p_StartStop;
Control Rate
p_Note = param_Note;
p_PolyPressure = param_PolyPressure;
p_ControlChange = param_ControlChange;
p_ProgramChange = param_ProgramChange;
p_Bend = param_Bend;
p_ChannelPressure = param_ChannelPressure;
p_Clock = param_Clock;
p_StartStop = param_StartStop;
Midi Handler
switch (status & 0xf0) {
case MIDI_NOTE_ON:
  if (p_Note)

    LogTextMessage("NoteOn  ch%2D n%3D v%3D    dev%3D port%3D ",
                   1 + (status & 0x0F), data1, data2, dev, port);
  break;
case MIDI_NOTE_OFF:
  if (p_Note)
    LogTextMessage("NoteOff ch%2D n%3D v%3D    dev%3D port%3D ",
                   1 + (status & 0x0F), data1, data2, dev, port);
  break;
case MIDI_POLY_PRESSURE:
  if (p_PolyPressure)
    LogTextMessage("PolyPrs ch%2D n%3D v%3D    dev%3D port%3D ",
                   1 + (status & 0x0F), data1, data2, dev, port);
  break;
case MIDI_CONTROL_CHANGE:
  if (p_ControlChange)
    LogTextMessage("Control ch%2D cc%3D v%3D    dev%3D port%3D ",
                   1 + (status & 0x0F), data1, data2, dev, port);
  break;
case MIDI_PROGRAM_CHANGE:
  if (p_ProgramChange)
    LogTextMessage("PgmChg  ch%2D pgm%3D    dev%3D port%3D ",
                   1 + (status & 0x0F), data1, data2, dev, port);
  break;
case MIDI_PITCH_BEND:
  if (p_Bend)
    LogTextMessage("PitchBnd ch%2D v%3D v%3D    dev%3D port%3D ",
                   1 + (status & 0x0F), data1, data2, dev, port);
  break;
case MIDI_CHANNEL_PRESSURE:
  if (p_ChannelPressure)
    LogTextMessage("ChannelPrs ch%2D v%3D     dev%3D port%3D ",
                   1 + (status & 0x0F), data1, dev, port);
  break;
default:;
}

if ((status == MIDI_TIMING_CLOCK) && p_Clock) {

  LogTextMessage("Clock Tick dev%3D port%3D ", dev, port);
}

if ((status == MIDI_START) && p_StartStop) {

  LogTextMessage("Start Clock dev%3D port%3D ", dev, port);
}

if ((status == MIDI_STOP) && p_StartStop) {

  LogTextMessage("Stop Clock dev%3D port%3D ", dev, port);
}

Privacy

© 2024 Zrna Research