{
   "ancestor_list" : [],
   "description" : "",
   "author" : "jamescaf",
   "name" : "Controlling DSI tetra with Supercollider--some examples",
   "code" : "s.boot;\r\n\r\nMIDIClient.init;\r\n// check the array of midi destinations for the device you are using, and then create a MIDIOut\r\n//   at the index of the destination you plan on using\r\n// in the case that the midi destination you are using is the first in the destinations array:\r\nm = MIDIOut(0); \r\n\r\n//playing a simple pattern of midi notes to the hardware synth listening to midi channel 1\r\n// see also the documentation page \"Pattern Guide Cookbook 04: Sending MIDI\"\r\n(\r\nPbind(\r\n\t\\type, \\midi,\r\n\t\\midicmd, \\noteOn,\r\n\t\\midiout, m,\r\n\t\\chan, 0,\r\n\t\\midinote, Pseq([48, 67, 52], inf), // C, G, E\r\n\t\\dur, Pseq([4, 2, 2], inf),\r\n\t\\legato, 1.01,\r\n\t\\amp, 1,\r\n).play;\r\n)\r\n\r\n// sending a control message. second argument is control number, third is control value:\r\nm.control(0, 23, 110);\r\n\r\n//NRPN control of filter pole on DSI Tetra:\r\n//   first, set parameter number (24 in this case)\r\n//   set most significant byte for parameter number (0 in this case)\r\nm.control(0, 99, 0);\r\n//   then least significant byte for parameter number (24 in this case)\r\nm.control(0, 98, 24);\r\n// then set value (1 for 4 pole)\r\n//   first set most significant byte for this value (0 in this case)\r\nm.control(0, 6, 0);\r\n//   then least significant byte for parameter number (1 in this case)\r\nm.control(0,38, 1);",
   "id" : "1-57O",
   "is_private" : null,
   "labels" : [
      "midi"
   ]
}
