<<Tutorial Table Of Contents

'Monoming With SuperCollider' Tutorial: APPENDIX


Patience is a virtue.

You will run into many errors as you experiment. At first, they seem cryptic, but they'll become familiar quickly.

The most common error is known as a 'parse error'. It will read in the 'post' window, something like this:

...ERROR: Command line parse failed

This error will often tell you where it failed by pointing to the place after which it fails. Should you run into this error, the first thing you could look for is properly closed parentheses and brackets. Otherwise, it likely refers to other syntactical errors such as missed semicolons(to signify end of statement), commas(in argument lists), etc.

Another common error is referring to an object which doesn't exist, or to a method which an object doesn't understand, for example, if you execute this line:


you'll get an error like this:

...ERROR: Class not defined...

Because we misspelled the class 'DiskIn' :-P Now we try the proper object name:


and we get an error message like this:

ERROR: Message 'yerface' not understood...

because the object 'DiskIn' has no method 'yerface'. LOL (Should you run into an error like this, look for the object in your code(labelled as the 'Receiver' in the error message), and make sure you haven't misspelled anything or check the helpfile or classfile for the object to learn what messages/methods it understands.

Another common error is when you experiment by tweaking SynthDefs, and use a wrong rate of control, for example:

ERROR:...input was not audio rate:...

In this case, look for the objects in question mentioned in the error message(here replaced by ellipsis). In the particular case of the above example, if you are using a '.ar' UGen, make sure the appropriate inputs within the UGen are also '.ar'.

Sometimes, using certain audio drivers(particularly built-in options on Windows) will fail to start the Server properly. Try quitting out of and then reopening SuperCollider(even several times if necessary) to resolve this issue. Other times, the Server will have a mismatched sample rate or will display a similar message about its inability to start. If you get the sample-rate mismatch error, the audio input and output of your audio driver may be mismatched in terms of sample rates(open up audio settings/preferences specific to your OS(for example, on OSX, open the “Audio MIDI Setup” utility app) to adjust your audio-driver's input/output settings). OR, your audio driver's sample rate may be mismatched to SuperCollider's. Still other times, SC will not be able to boot a server(or even if it does, will be straining on CPU) because its control-rate is set too fast, or perhaps its latency is set too short. See the 'ServerOptions' helpfile to learn different preferences/settings to streamline and customize SC Server performance.

On some systems, you must have administrator access or permission to write to the class library folder. If you run into problems because of this, or anything else file-saving related, try opening a new file from within SuperCollider, copying and pasting code from the original file into this new file, and then saving that new file from within SuperCollider into the appropriate place(SC will most likely have permission to write to its own class library folder).

Get used to reading the output in the 'post' window no matter what. Most often, at the least, it will either tell you where in your code it fails, or let you know the name of the object which did not respond as expected(“RECEIVER:…”), allowing you to start from there. When you narrow it down, try to isolate just the single line and execute tests with the available methods to the object in question. Each time you successfully locate and fix an error, you'll get quicker at recognizing it the next time. At the same time, you'll get quicker at reading error messages in general, learning to trace more unfamiliar ones at a faster and faster rate.

Recording Output To Disk:

There are many ways to do this, for example, see the 'Recording Support' section of the 'Server' helpfile for description of a couple ways. You can even just use the 'record' button on the Server window.

But here is one way(which you can use to apply in different ways for free or synced triggering…)… For a simple unsynced recording, first you run the code for your own app or whatever code will produce the sound you'd like to record, and then run this code, all lines at once, afterwards, so that it creates the synth '\recorderer' at the very tail of all nodes on the server:

SynthDef(\recorderer, {arg bufnum;, (,2) * 0.5)).postln; 
b= Buffer.alloc(s, 131072, 2); 
      //^allocate a disk i/o buffer
                              "aiff", "int16", 0, 0, true);
//^create an output file for this buffer, leave it open
~recbufr = Synth.tail(nil, \recorderer, ["bufnum", b]); 
     //^create the diskout node... 
    //...making sure it comes after the source

It will start recording to the path on your harddrive specified within quotes for the first argument to 'b.write'(in the above example, you'd replace ”~/Desktop/…” with whatever filepath you want(see 'PathName' and 'String' helpfiles for help on the '.standardizePath' method and other options for specifying paths; also see the 'Platform' helpfile if you need further help on locating/specifying paths catered to your particular OS; i.e. 'Platform.userHomeDir', etc…).

When you'd like to end the recording, you can execute this code, once again, all lines at once:; //<-free recording synth node
b.close;       //<-close the soundfile;        //<-free the buffer from the server

Streams, Patterns, and Events:

This tutorial will not be able to cover this subject as copiously and properly as the 'Getting Started' tutorial series and other tutorials referenced within SC's included helpfiles. You should get to 'Patterns' from within the 'Getting Started' tutorial series first, then in the 'Patterns' chapter there(the very last: Chapter 16), at the very end of the page, in the 'Further Reading' section, is listed even more detailed reference materials for the subject: “Streams”, “Streams-Patterns-Events”, and “Practical Guide to Patterns”. Of course you should read through and experiment with all of the help there. But for monome-specific control of Patterns, check out the 'Practical Guide to Patterns'. There, within the 'Pattern Cookbook' section of its Intro/Contents page, pay particular attention to the linked chapter: “Pattern Guide Cookbook 03: External Control”.

Streams, Patterns, and Events comprise more than half of SuperCollider's very powerful algorithmic-composition and sequencing capabilities.

Here's a version of MLR made in SuperCollider that shows a basic example of using SuperCollider 'Patterns' to handle stutter-cuts:

Problems-With/Questions-About These Tutorials: