Aug 11th

SuperCollider multitrack to DAW on OSX 2

By Mark Hamlin


Server.local.options.memSize = 32768;

Server.local.options.device = "Soundflower (16ch)";

Server.local.options.numOutputBusChannels = 16;

Server.local.options.numInputBusChannels = 16;


Server.internal.options.memSize = 32768;

Server.internal.options.device = "Soundflower (16ch)";

Server.internal.options.numOutputBusChannels = 16;

Server.internal.options.numInputBusChannels = 16;

Aug 8th

SuperCollider multitrack to DAW on OSX

By Mark Hamlin
Our experiments with SuperCollider reached the point where we wanted to do some production which for us means working with Ableton Live or Logic Pro. We decided to try and wire up multitrack audio output "directly" from SuperCollider. This is tested with Live and Logic, but will with any Audio system on OSX.
  1. First you'll need to install SoundFlower from Cycling64. This provides a new 16 track audio I/O device.
  2. Open the sound panel in System Preferences:
    1. Go to the Output tab, make SoundFlower the default.
    2. Go to the Input tab, make SoundFlower the default. (Not essential i you can override this in your DAW)
  3. SuperCollider has a default maximum number output busses set to 8 (4 x stereo). To increase this run the following commands:
    o = Server.local.options; 
    o.numOutputBusChannels = 16; // reboot the server for this to take effect
    o.numOutputBusChannels.postln; // Check the result
  4. Configure your instruments or the sequences driving them to send to the desired outputs. Many synths have an outBus parameter, modify the default (arg outBus = 2), or include the parameter in your Pbind or similar.
  5. Your just about there. Different DAWs have different capabilities in terms of setting the I/O device. Logic has the same device setting for both input and output. To work with this limitation: In Logic:
    1. Set Logic CoreAudio device to SoundFlower16.
    2. Set the output of each track to SoundFlower 15,16.
    In the SoundFlowerbed gui:
    1. Under SoundFlower16 I selected Built-In Output;
    2. In the channel drop down I made sure 1 & 2 were set to Off, then put 15 & 16 to Built-In.
    By using 15,16 for the master output, you can play with instruments straight out of the box.


Cubase, Logic, Ableton, Digital Performer
Aug 6th

Emacs & SuperCollider on OSX

By Mark Hamlin
An old emacs fan, had I found this article from Sam Aaron before, I might not have gone the TextMate route. TextMate has taken a lot of inspiration from Emacs, it has SuperCollider integration via a bundle (not supplied with TextMate), but on the flipside, its not free. 

Aug 6th

SuperCollider Arpeggiator 1

By Mark Hamlin

Bare Bones Arpeggiator

SuperCollider is provided with powerful Pattern objects. In this series of lessons we will combine them with live Midi input. While this example lacks features essential for performance / collaboration environments, its simplicity will allow us to concentrate on the interesting bits.

    1 (
    3 var pattern, player;
    5 TempoClock.default.tempo = 120 / 60.0;
    7 MIDIClient.init;
    8 MIDIIn.connect(0, 0);
    9 ~notenum = 64;
   11 MIDIIn.noteOn = { arg src, chan, num, vel;  
   12     var lastNum = ~notenum;
   13     ~notenum = num; 
   14     [chan,num,vel / 127].postln; 
   15     ~notenum.postln;
   16     if(player.isNil or: { player.isPlaying.not }) {
   17         player =;
   18     } {
   19         if (~notenum == lastNum) {
   20             player.stop;
   21             pattern.reset;
   22         }
   23     };
   24 };
   26 pattern = Pbind( 
   27     midinote, 
   28         Pseq([
   29             Pfunc { ~notenum; } 
   30             + 
   31             Pshuf(#[-7,-3,0,2,4,7], inf)
   32         ]), 
   33     dur, 0.25 
   34 );
   36 )


Get code without line numbers (must be logged in).


  • Line 3 - 9: Define variables for player, sequence and midi input. And initialise midi input
  • Line 11 - 23: Define noteOn event handler:
    1. Line 13, assign note number of midi input to global ~notenum.
    2. Line 16 - 18: start sequence if not already playing.
    3. Line 19 - 22: stop sequence if note pressed is the same as the last note pressed.
  • Line 26 - 33: The interesting bit. If you just want to play with the musical possibilities of the Patter objects, look here. The outer Pseq on line 28 combines to other Patter objects using functional composition.
    1. Line 26: A standard Pbind where values are specified for various OSC note event parameters.
    2. Line 29: A Pfunc, the output of which will always be the notenumber of the last midi input.
    3. Line 31: Here's the music. Check the SuperCollider documentation or information on the Pshuf class.

Your Turn

  • Start experimenting with the different Pattern classes by swapping out the Pshuf element. Check out the documentation on the Pattern classes to get an idea of the possibilities. Post your results in the comments.


These issues will be dealt with in the following lessons. If you are inclined and able to have a go at any of these problems, post you results in the comments.


  1. Permutation: The Pshuf object gives a random reordering of the provided note list. However it will remain the same until the sequence is stopped and restarted. It would be nice to have an option to enable this pattern to change with every new note provided, or on every bar.
  2. Quantisation: Provide an option to allow sequence start and stop to be quantised to a measure specified

Code & Programming

  1. Encapsulation: The example provided is a a block of code. What if we want to use more than one arpeggiator at the same time. To achieve this we will refractor this code along using object oriented semantics.
  2. Variable Scope: The mix of local and global variables here doesn't make much sense and violates good encapsulation rules.

Notes for the Newbie

  • Pbind note events: The only parameters specified in the Pbind are midinote and dur(ation). As no instrument is specified the default will be used.

Links & References

Aug 1st

SuperCollider & TextMate

By Mark Hamlin
Thanks to Rob Watson for the TextMate SuperCollider bundle.  TextMate is a good programmers editor and with this bundle, it is considerably better than the editor built in to SuperCollider, making interpreting a pleasure.  :)

After installing the dewdrop quarks the TextMate bundle stopped working.  The stack trace did not specify exactly which quarks were at fault so a search of the quark directory for the symbol revealed the culprits.

Aug 1st

Analysis & Decomposition

By Mark Hamlin
The following list is an extract from Aural Awareness by George Pratt [1]
  1. Metre - underlying pulse; regular or varying.
  2. Rhythms - uniform on non-uniform
  3. Pitch - pentatonic (or fewer notes)l seven notes, major, minor or modal; polytonal; twelve notes, tonal or atonal; micro-tonal.
  4. Texture - independent lines of counterpoint or homophonic block chords, with every stage between.
  5. Timbre - varying between instruments; within an instrument; within a single note.
  6. Compass - the possible notes of an instrument or voice.
  7. Range - the actual notes of a piece of music, within which is Tessitura (Ed. listed separately herein) - the most frequently used part of the range.
  8. Density - the number - distribution and doubling of notes.
  9. Dynamics - both broad and detailed
  10. Articulation - the degree of accent and separation of notes, motives and phrases.
  11. Placing in space - where one or many sounds come from (Ed. Spatialisation, referred to as such herein)
  12. Structure - within what small - and large scale moulds musical events are organised.
Jul 21st

SuperCollider London Meetup

By Mark Hamlin

Now you know.  And they are hosting a monthly meetup on the topic of SuperCollider 

The main website lists some other interesting events as well

Jul 11th

Score & Notation in Logic Pro

By Mark Hamlin
Traditional musical score notation represents the culmination of centuries of evolution of written music.  Benefits over the "piano roll" editor familiar to users of modern sequencers include:
  1. A more compact form.
  2. With familiarity, quicker to read.
  3. A massive archive of published score.
Here are some essential but not immediately obvious features of the Notation editor in Apple's Logic Pro.

Sharp, Flats & Accidentals
  1. Sharp (♯) characters can be entered with Alt-3.
  2. Flat (♭) characters are entered with the b character. So bb7 is B Flat 7.
  3. To get the natural (♮) symbol to show on or after an accidental: in the score window select the Attributes -> Accidentals -> Force Accidental option. Natural symbols will then be displayed automagically.
Jun 7th

Theory - Basics

By Mark Hamlin
"To name a thing is to know a thing."

Music Theory primarily offers the student a vocabulary or nomenclature with which you can describe any piece of music.  

Every book and course on Music Theory or Composition will cover these topics in detail.
  1. Chords
  2. Diatonic function
  3. Circle of fifths
And will almost certainly cover these additional topics:
While these articles might seem complex at first sight, all that is required to master these subjects is the ability to count to twenty and primary level addition and subtraction.