// title: MIDI displayer/debugger // author: peterk // description: // Get started using midi controllers with this script to easily output note on/off and continuous controller messages. // code: // A simple script to help you get started with midi controllers // It will dump midi note on, off, and continuous control messages // initialize the midi client MIDIClient.init; // connect all the possible inputs MIDIIn.connectAll; // if we receive a midi on message, display some data about it including velocity, note number, channel, and source MIDIdef.noteOn(\noteOnFunc, { arg vel, nn, chan, src; [vel, nn, chan, src].postln; }); // same for note off MIDIdef.noteOff(\noteOffFunc, { arg vel, nn, chan, src; [nn, chan, src].postln; }); // handle continuous control messages MIDIdef.cc(\ccFunc, { arg ccNum, chan; //print the num & chan [ccNum, chan].postln; });