Skip to content

5.4 MIDI and Events debugging

Davide Magni edited this page Sep 1, 2016 · 3 revisions

Koala's Realtime Debugger features an extremely powerful MIDI and Event monitoring engine. The “Event” page features a detailed overview of every incoming MIDI message, along with the type of event, the value of MIDI bytes and, if available, the source of the event.

To enable MIDI and Event Debugging, you need to add the following lines at the very beginning of on note, on release and on controller callbacks:

on note
DEBUG.on_note
{...}
end on 

on release
DEBUG.on_release
{...}
end on 

on controller
DEBUG.on_controller
{...}
end on 

MIDI Monitor: main view

The MIDI Monitor features six columns which display the following parameters:

  • Event Nr. Displays MIDI events numbers. The MIDI Debugger is able to display the last 27 events before being reset.
  • Event Type Can be “Note ON”, “Note OFF” or “Controller”.
  • Event Details of the displayed Event. Controller Events show the name of the incoming MIDI CC; Note Events display the note name and octave.
  • MIDI Byte 1 First byte of incoming MIDI message. For Controller events, MIDI byte 1 is the MIDI CC number; for Note Events, MIDI byte 1 is the note number.
  • MIDI Byte 2 Second byte of incoming MIDI message. For Controller events, MIDI byte 2 is the value of MIDI CC; for Note Events, MIDI byte 2 is the velocity of the played note.
  • Event Source Note events show here the source of the incoming MIDI event.
  • MIDI Channel MIDI channel of the MIDI event.

MIDI Monitor: Reset actions

The Reset section of MIDI and Events Debugger features four useful actions which can help in case of troubles.

  • Start Monitor Enables the MIDI Monitor to display data. If the monitor is not needed, please turn it off to save CPU.
  • Reset Monitor Wipes the MIDI Monitor view.
  • Freeze Monitor As long as this is active, the MIDI Monitor will not display any incoming MIDI event.
  • Kill Events When pressed, three KSP actions will be executed: note_off() to all notes, MIDI CC 123 is called (“All Notes Off” command) and fade_out is performed on all the active Events. Any playing voice is stopped.
  • Freeze Engine Any Note or Controller event is ignored. An exit command is executed at the beginning of on note, on release and on controller callback.

MIDI Monitor: Events filter

You can choose which Events are shown in the MIDI Monitor. This can be useful to keep the MIDI Monitor view clean and readable.

  • Note ON If enabled, any Note ON Event is displayed.
  • Note OFF If enabled, any Note OFF Event is displayed.
  • MIDI CC If enabled, any MIDI CC Event is displayed.
  • Pitch Bend If enabled, any Pitch Bend Event is displayed.

Play Test

The Play Test section allows the developer to play a sequence of notes to test if the Script is working properly.

  • Play... Play the note sequence. When the note sequence is playing, this button will show the played note number and velocity.
  • Start Note First note of the sequence.
  • End Note` Last note of the sequence.
  • Vel. Velocity of the played note. This value can be set in realtime, even when the sequence is playing.

MIDI CC Test

The MIDI CC Test allows to set the value of any MIDI CC and check how the selected MIDI CC is changing in real time.

  • MIDI CC Test Menu Select the desired MIDI CC. The menu displays MIDI CC numbers and their function according to MIDI standard.
  • CC Value Current value of the selected MIDI CC. This value is updated every time you select a MIDI CC and every time the selected MIDI CC is changed.
Clone this wiki locally