Posted Monday, 28 May 2012
In this article I'll give you a lightning overview of SuperCollider (SC). I'll point you to the best tutorials I've found, and give you some advice on how to learn SC -- so if you're ready let's get started!
What is SuperCollider?
SuperCollider allows you to type in code and output sound. The code you type describes how the sound-generating objects should behave. It's interpreted in realtime, and you hear the results straight away through your speakers.
That's a lot to process - to get a quick sense of what that means, try watching this 60-second video by mcldx:
How does it work?
When you download and install SuperCollider it creates a client-server pair of applications - sclang and scsynth - which communicate via OSC.
The job of scsynth (the server) is to handle all the sound generators, filters, and waveforms it has been told about and to calculate values to send to the sound card.
|SuperCollider. Your laptop. You|
The job of sclang (the client) is to interpret the commands you give as written code, and to send instructions to scsynth on your behalf. The objects you instantiate and manipulate from sclang are abstractions, each of which is designed to allow you to manipulate an actual sound-generating object on scsynth.
Why have two applications - scsynth and sclang?
Well, they each do very different types of work. The world of scsynth is about hardware-accelerated, low-latency calculations - DSP. Everything must run on a regular clock and be timed perfectly. It needs to be fed information in a way which can be quickly digested and acted upon.
The world of sclang is about providing a human-friendly editing experience - interpreting written OO code. We don't want to burden scsynth's clock cycles with that.
You can think of scsynth as the musician, actively playing from a song sheet, and sclang as the song sheet itself. You can manipulate the score, pull things out, switch instruments and effects. The musician will continue playing as you change the score, and will switch to the new score in realtime.
Why write code - can't I use a GUI?
Coding in an OO client like sclang means you have full flexibility to build (and screw up) anything you want. No catches, no restrictions. You can literally build as many virtual synthesizers as your CPU can handle, and connect them in a seemingly infinite variety of ways. A GUI, though easier to learn, wouldn't be able to provide anything like that flexibility.
|Multiple clients, same server|
However, because scsynth will accept any communications via OSC, you could technically use any client you want. Anything which understands how to generate OSC commands for scsynth can act as a client -- sclang is just the one that comes bundled in the SuperCollider application (more on that here). People write their own GUIs to help them interact with scsynth in different ways. The thing to remember is that when you start using a GUI, there is inevitably a restricted subset of things you can use it to do.
So what does sclang look like?
The SuperCollider language is based on SmallTalk and so will be familiar to Ruby programmers. If you are already a coder, the real work is in learning about the plethora of sound-producing objects, what they each do, and how you can combine them.
I am going to put you onto some learning resources below, but this gives you a quick taste:
|A quick bit of code|
|The visual output|
Luckily, SC is designed to be really simple to use, once you understand some basics. It aims to be expressive, polymorphic, user-friendly and compact. Coding is quick, rather than strict -- the framework is littered with static object references for quick object instantiations, uses short-form naming conventions for class methods, and is syntactically minimal.
You can get a sense of just how compact and expressive SC is by looking at / playing some of these tracks. Each was generated using under 140 characters of SC code -- just the right size to fit inside a tweet.
Please note - this is NOT how you would normally write SC code! So don't be put off by the short-hand they used to get the code inside the tweets!
|Thor Magnusson at SC2012|
(Photo: Steve Welburn)
In a moment I will point you to the best guide to help you get started. But first off, I want to point out this SC-bundled help landing page. You'll want to come back to that link again and again once you get underway.
The best place to get started is the tutorial by Scott Wilson and James Harkins. You can find this tutorial on the Sourceforge learning page, alongside a couple of other 'getting started' options. The tutorial takes you through the language basics, and gently guides you through firing up the server and making some sounds.
EDIT: I have now written a QuickRef for all the topics covered in that tutorial. So my advice is to take a look through the tutorial at your leisure, get an understanding, then refer to my QuickRef once you start hacking code.
There is also now a really helpful video tutorial series by Eli Fieldsteel - highly recommended!
A quick aside for Windows users - often these tutorials are written for Mac. When you want to execute some code, they always tell you to hit
ENTER (and not
RETURN). If you are using Windows, and therefore probably gedit, you will actually need to hit
CTRL + E, or some other environment-specific execution command.
But as is often the case with creative software, you will find the whole experience easier if you switch to Mac.
Learning about OO and DSP
If you don't have experience with either OO (for coding sclang), or DSP (for understanding scsynth), it's still a good tutorial and will guide you through. However it might seem to breeze through some stuff a bit quickly, in which case you could take an aside to study OO and DSP separately - they are useful subjects and worth studying in their own right.
If you are impatient and want to learn OO and DSP in the context of SC, one option is The SuperCollider Book by Scott Wilson et al. I haven't read it but it looks comprehensive and will doubtless go at an easier pace, and give you time to experiment with examples before jumping on to new topics.
Beyond the basics: IXI Software tutorials
Once you are past the building blocks, it can be a little daunting to find you have all this creative power at your fingertips, but don't know where to start. My friend Gene recommended these IXI Software tutorials (seemingly written by Thor Magnusson):
"This tutorial is not about programming SuperCollider, there are other tutorials that address that question. This tutorial is more about how to explore digital sound and synthesis using Supercollider as our tool. "
They start with a primer-style quick reference guide to the language and how to interact with the server (the same stuff you get from the introductory tutorials, but much quicker and with some good fleshing out). They go on to contextually discuss:
- Additive Synthesis
- Subtractive Synthesis
- AM, RM and FM Synthesis
- Envelopes - MIDI Keyboard
- Buffers and Samples
- Granular Synthesis
- Physical Modelling
- Fast Fourier Transform (FFT)
- Audio Effects and Filters
- Busses, Nodes, Groups and Signal Flow
- Musical Patterns on SCServer
- Musical Patterns in the SCLang
- Tuning Systems and Scales
- Graphical User Interfaces
This is much further than I have got yet, so I'll leave that there.
Beyond the basics: Designing Sound in SuperCollider
This WikiBook is a really interesting resource: Designing Sound in SuperCollider. In their own words:
"This book is an independent project based on Designing Sound by Andy Farnell, all about the principles and techniques needed to design sound effects for real-time synthesis. The original book provides examples in the PureData language - here we have re-created some of the examples using SuperCollider."
You may find it easier to browse the print version of the book, as you can copy and paste excerpts into SC to quickly try them out. Telephone bells, bouncing balls, rolling cans, fire, bubbles, water, rain - it sounds great and I'll certainly be back here soon to play with some of these examples.
Beyond the basics: Tour of UGens
This is a categorised quickref on all (well not all, but many) of the available unit generators in the SC release: Tour of Unit Generators. (There is also the UGen page).
It is actually one of the links off of the 'help landing page' mentioned earlier, but I've highlighted it here in it's own right as I have a feeling it will be an incredibly useful backbone to exploring how to construct your own custom SynthDefs. I haven't tried it yet, but just scrolling through the page: periodic sound sources, aperiodic sound sources, pulse, saw, blip, reverb, crackle, dust, LFO, pan, fade, delay, PlayBuf, granular synthesis, decay, EnvGen, FFT, gate...
...it's already starting to give me some ideas.
It mentions on that page that another way to tour the UGens is to use
Help.gui. However there appears to be a problem with loading the help files under Windows in this release, and it is seemingly not resolved. Windows users seem to be an afterthought in some of the Open Source media environments, and I'll be switching to Mac as soon as my new hardware arrives next week.
Anyway - there's a bit tacked on the end of that page about 'building a sense of [artificial] space into a sound by setting up phase differences between the speakers'... and another one about so-called 'parallel structures'. Could be interesting.
Less useful in the beginning, but I'm sure could come in handy later... Someone has (automagically) collated all the help files from the standard SuperCollider distribution into one big PDF, The SuperCollider Help Book, which I'm sure could be useful at some stage to scroll through.
I'm still new here myself so I'll leave it there for now, but I'll come back and edit this page if and when I find more links that could be useful for getting started.
- Thor Magnusson
- Designing Sound
- Andy Farnell
- James Harkins
- Learning Resources
- Scott Wilson
- IXI Software
- Jaaga Residency (17)
- Jaaga (15)
- I-Park Residency (12)
- Process (12)
- Personal Development (11)
- RGBDToolkit (11)
- V4W (10)
- Installation (10)
- VVVV (9)
- Field Research (8)
- CAC Residency (7)
- Tutorial (7)
- Freemote Threshold (7)
- SuperCollider (7)
- Kinect (7)
- Freemote (7)
- Long (7)
- Audio / Visual (6)
- Reflections (6)
- Influence (5)
- Projection Mapping (5)
- Max/MSP (5)
- Arduino (5)
- Gravity (4)
- Motor (4)
- openFrameworks (4)
- Jaaga Sound and Lights (4)
- Portable Projection (4)
- Asus Xtion (3)
- ThoughtWorks (3)
- Land Art (3)
- James George (3)
- michael fairfax (3)
- RGBDToolkit Visualizer (3)
- Roman Moshensky (3)
- Rocks (3)
- Jee Soo Shin (3)
- Presentation (2)
- Sketch (2)
- Volumetric Lab (2)
- Calibration (2)
- Phenomenology (2)
- Git (2)
- Cosm (2)
- Picture This (2)
- Memo Akten (2)
- Tess Martin (2)
- Boaz Aharonovitch (2)
- Volumetric Society (2)
- Mac (2)
- Measure (2)
- Generative Art (2)
- Depth (2)
- Projection Bombing (2)
- Creative Context (2)
- Depth Video (2)
- Total Space (2)
- CultureHub (2)
- C# (2)
- Review (2)
- Eyebeam (2)
- Ralph Crispino (2)
- 3D (2)
- Mobile Projection (2)
- Judith Stein (2)
- Apple (2)
- Untitled (Picture This) (2)
- Scott Wilson (2)
- Natural Textures (2)
- Brian Eno (2)
- Alpha-Ville (2)
- Study (2)
- The Visual Art of Brian Eno
- RGBDToolkit Sketch at The Sampler
- The Artist-Geek Hybrid
- RGBDToolkit Calibration Tutorial
- How a Depth Sensor Works - in 5 Minutes
- Residency Begins at CAC Troy
- Installation Sketch at Open Studios
- Roman Moshensky's Mirror World
- Open Studios at I-Park
- Perception as a Creative Process
- The I-Park Graveyard
- Scoping Out the Land
- Residency Begins at I-Park
- Residency at Contemporary Artists Center
- Stephen Lumenta's SC TextMate Bundle
- Adding OF Addons (ofxSuperCollider)
- Setting up SuperCollider with TextMate
- Switching to MacBook Pro
- QuickRef for SuperCollider
- Getting Started with SuperCollider
- Getting Started with OpenFrameworks
- Overtones, Harmonics and Additive Synthesis
- Visit to Cold Spring
- The Final Exhibition
- Playing with Particles
- Responsive Granular Sound
- Kinecting to the Network
- First Working Day
- Designs for Freemote
- Freemote Utrecht
- Untitled - Picture This (2011)
- The Wider Context?
- Trading Time for Space
- Talk at Goldsmiths Digital Studios
- Intro to Marius Watz
- Practical Guide to Generative Art
- Cosm, Collision Detection and Volume
- Vector-Base Amplitude Panning
- Intuition, and Direction of the Project
- Reflections: What is Jaaga?
- Going Further with Ambisonics
- Introduction to Ambisonics
- Surface (2010)
- Servo Motors and Transistors
- Spinning a 12V DC Motor
- Spinning a 5V DC Motor
- First Week at Jaaga
- Presentation Style
- Beginning the Jaaga Fellowship