{
   "author" : "peterk",
   "name" : "MIDI displayer/debugger",
   "ancestor_list" : [],
   "description" : "Get started using midi controllers with this script to easily output note on/off and continuous controller messages.",
   "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});",
   "id" : "1-5co",
   "is_private" : null
}
