Multichannel MIDI using Supercollider and Logic Pro 9
Today i learnt how to send different MIDI outputs, to separate channels within Logic. Now the real fun can begin!!!! Using this technique, along with Supercolliders Pdef (Pattern define) instruction it seems possible to start making some tracks to play and edit live. Instead of simply sending MIDI, through Logic, to one software instrument , i can start mixing up the instruments. Setting one pattern to play on bass, one pattern to play a drum track and one pattern to play a synth line is now a possibility. Still lots of experimenting to do before i get this mastered but i’m on the way.
For anyone who wants to know i’ll (try to) explain how to do this.
1) Load Logic and create two channels for software instruments. (one for piano, one for guitar for example)
2) Select the first channel. Now in the inspector window you should see (about half way down) a triangle next to the name of the instrument you have chosen, click it. This will reveal some variables for this channel. Set the MIDI channel (default: all) to 1.
3) Repeat this for the second channel, setting the MIDI channel to 2.
4) Now right-click on the record button (on the transport bar) and select ‘recording settings’. Make sure the ‘Auto demix by channel if multitrack recording’ box is ticked.
5) Load Supercollider and initialize the MIDI client and setup a MIDI out, by evaluating the following lines of code.
6) Ensure that the ‘r’ record button is pressed on all channels or the information is only sent to the ones that do have it selected (it turns red when when selected)
m = MIDIOut (0, MIDIClient.destinations.uid);
6) Now when writing you MIDI code you need to instruct Supercollider which channel to play to. Here’s some code i wrote earlier to demonstrate.
Pbind ( \type, \midi, \midiout, m, \chan,0,
\scale, [ 10, 11, 13, 15, 16, 18, 20, 22],
\degree, Prand([ 1,2,3,4,5,6,7,8,], inf),
\dur, Pseq([1, 1/2, 1, 1/4, 1/4, ], inf),
Pbind ( \type, \midi, \midiout, m, \chan,1,
\scale, [ 0, 1, 3, 5, 6, 8, 10, 12],
\degree, Pseq([1,3,5,7,1,5,3,7, ], inf),
\dur, Pseq([1/4, 1/8, ], inf),
The first Pbind is set (using the ‘\chan’ command) to play from the Logic channel that is set to MIDI Channel 1, and the second Pbind will play through the Logic channel set to MIDI Channel 2. (Supercollider starts counting at 0. So Logic Midi channel 1 = Supercollider Midi channel 0, Logic MIDI channel 2 = Supercollider Midi channel 1 etc) The Ppar lets us combine Pbinds, and play them simultaneously.
Hopefully that made sense. If not come and find me at Uni and i’ll try and explain it a bit better.