{"author":"peterk","ancestor_list":[],"has_audio":false,"labels":["midi"],"code":"// A simple script to help you get started with midi controllers \r\n// It will dump midi note on, off, and continuous control messages \r\n\r\n// initialize the midi client\r\nMIDIClient.init;\r\n\r\n// connect all the possible inputs\r\nMIDIIn.connectAll;\r\n\r\n// if we receive a midi on message, display some data about it including velocity, note number, channel, and source\r\nMIDIdef.noteOn(\\noteOnFunc, {\r\n\targ vel, nn, chan, src;\r\n\t[vel, nn, chan, src].postln;\r\n});\r\n\r\n// same for note off\r\nMIDIdef.noteOff(\\noteOffFunc, {\r\n\targ vel, nn, chan, src;\r\n\t[nn, chan, src].postln;\r\n});\r\n\r\n\r\n// handle continuous control messages\r\nMIDIdef.cc(\\ccFunc, {\r\n\targ ccNum, chan;\r\n\t\r\n\t//print the num & chan\r\n\t[ccNum, chan].postln;\r\n});","description":"Get started using midi controllers with this script to easily output note on/off and continuous controller messages.","name":"MIDI displayer/debugger","is_private":null,"id":"1-5co"}