Introduction: SuperCollider: Your First Oscillator

Supercollider lyrics

The Superconducting Super Collider (SSC) (also nicknamed the Desertron) was a particle accelerator complex under construction in the vicinity of Waxahachie, Texas, that was set to be the world's largest and most energetic, surpassing the current record held by the Large Hadron Collider. The Help system that comes bundled with SuperCollider includes hundreds of documents, covering all the classes plus some useful overviews and tutorial material. You can browse the Help documentation online or download it as a single PDF. At Supercollider, we smash things together to make new, heretofore unknown things. Tiny budgets and big dreams. Smart ideas and weird people. Weird ideas and smart people. SuperCollider can be used on embedded platforms, including Raspberry Pi and Beagle Bone Black. See the project READMEs for more information.

This tutorial provides a very basic introduction to generating sound in SuperCollider. SuperCollider is an open source language and environment for sound synthesis. In this tutorial, you will learn how to install SuperCollider, boot the sound synthesis server, execute lines of code, and stop running code. By the end of this tutorial you'll have your very own 440Hz sine tone!

For more information about SuperCollider, please visit the SuperCollider website.

Step 1: Download and Install SuperCollider

In order to successfully use SuperCollider, you're going to need to get SuperCollider! SuperCollider is available on most operating systems including Mac (intel and PPC) and Windows, as well for a few distributions of Linux. You can download Supercollider HERE.

Once you have successfully downloaded SuperCollider, go ahead and navigate to wherever it is you have installed it (if you are on a Mac, the Applications Folder, in a Folder named SuperCollider). To open, click the SuperCollider icon.

SuperCollider's workspace consists of three major parts: the code editor, help browser, and post window. The code editor is where you will type new lines of code and execute them. The help browser is a useful resource for finding out more about various parts of syntax and functions that are built into SuperCollider. The post window is where the result of whatever you execute is printed, and is useful for debugging and making sure everything is working as it should.

And there you have it! SuperCollider!

Step 2: Boot Server

In order to execute sound synthesis code in SuperCollider (and to hear sound), you must boot the server. As explained in the intro, SuperCollider is an object-oriented language which functions as a network client to a realtime sound synthesis server.

The default server can booted in two ways, through an executable line of code or through a key command. For the sake of working across different operating systems, I will demonstrate the code version of starting the server.

This will be your first line of code in SuperCollider!

Once you've typed that code into the code editor section, you will need to execute it. To execute your first line of code, click just after the semicolon. Once the line is selected press COMMAND+RETURN (if using a Mac) or CTRL+ENTER if using Windows or Linux.

If all went according to plan, something akin to the following (your I/O devices may differ) should have printed in the post window:

booting 57110
localhost Number of Devices: 2 0 : 'Built-in Microph' 1 : 'Built-in Output'
'Built-in Microph' Input Device Streams: 1 0 channels 2
'Built-in Output' Output Device Streams: 1 0 channels 2 SC_AudioDriver: sample rate = 44100.000000, driver's block size = 512

Supercollider Movie

SuperCollider 3 server ready. Receiving notification messages from server localhost Shared memory server interface initialized

Once your server is booted, you're ready to code your first oscillator!

Step 3: Hello Sound: Your First Line of Code

Now that the synthesis server is running, you can finally code your first sine oscillator! Your second line of SuperCollider code will be just as exciting as your first!

Supercollider tutorial

Supercollider Ide

But what does it mean!?

Let's break it down part by part:

  • The enclosing curly brackets ({}) signify that this is a function: a block of code that will do something.
  • SinOsc is a UGen or Unit Generator. Unit Generators are the basic building blocks of synths on the server, and are used to generate or process audio or control signals. SinOsc takes four arguments (Frequency, Phase, Multiply, and Add)
  • .ar specifies that we are generating an 'Audio Rate' signal (.ir stands for information rate)
  • Inside this set of parentheses are our arguments
  • Our Frequency is currently set to 440Hz, you can set this number to any Frequency within the audible range
  • Phase is set to 0. You can offset the phase of your sine wave signal if you so desire (this will not be particularly impactful if you only have one waveform)
  • Multiply designates what our output is multiplied, I do not recommend going above 1 here as you may encounter clipping. This argument essentially controls the amplitude of the output.
  • Add is the value to be added to the output signal. We won't worry too much about this for now.

Okay! Now you're almost ready! Let's go on...

Step 4: Execute Code

Now it's time to make some noise! But before you start your fancy new oscillator oscillating, I am going to tell you how to stop it (this was a lesson hard won for me in my infinite stubbornness). If you are using a Mac, to stop any signal in SuperCollider at any time, click within the SuperCollider window and press COMMAND+. (period). If you are using a PC, press CTRL+. (period).

I tell you this ahead of time because the first time I made sound in SuperCollider I spent 5 minutes listening to insanely high frequency tones while I frantically googled how to stop them.

Okay! Let's execute that code! As you may remember from when you booted the server, you have to select your code to execute it. Since this code is only one line, you can simply click on the same line anywhere after the semicolon, or doubleclick to highlight your code.

Now that you have your code selected, Mac users, press COMMAND+RETURN, Windows users, press CTRL+ENTER.

You should hear a nice 440Hz tone! Hooray! Your first oscillator!

Step 5: Next Steps

Texas

Now you've done it! You've made your first Oscillator! So what next? Well, there's a lot you can do with just the SinOsc UGen in SuperCollider. For instance, you could make multiple oscillators at different frequencies (perhaps harmonically related). You can also shift the phase of two Oscillators at the same or harmonically related frequencies (try setting the phase to 1, see what happens in either case).

You can also save your awesome oscillator so you can play with it again later! Click under File and select Save or Save As. Choose where to save your file. I recommend saving your file as a .scd file.

That's it! Stay tuned for more.

Be the First to Share

Supercollider Switzerland

Recommendations

2.1 Bluetooth Sound System - Fully Printable in Audio
3 Ways to Make Cardboard PinBall Sensors in Sensors
19 3.6K
200 12K
  • STEM Contest

  • Role Playing Game Challenge

  • CNC Contest

Supercollider Texas

Mac

Current Version

  • . 3.11.2 - signed, notarized (macOS 10.13-10.15) (sn*)
  • . 3.11.2 - legacy (macOS 10.10-10.12) (sn*)
  • . 3.11.2+BigSur.aed25fa - signed, notarized (macOS 11) (sn*)
CAUTION: macOS system volume doesn’t effectively limit audio applications’ maximum volume. Extra care has to be put in working on this platform, especially with headphones, because programs can produce unexpectedly loud sounds regardless of system volume settings, potentially causing ear damage. As a safety measure, we highly recommend to install the SafetyNet quark. See Using Quarks for Quarks installation instruction.

Previous Releases

  • . 3.10.4 - signed (sn*)
  • . 3.10.4 (sn*)

Bleeding Edge

  • . Latest build (sn*)
    This is the latest build of the development branch.

Linux

Current Version

Builds with gcc >= 4.9

Official Linux Packages

Community packages and repositories

  • Fedora (PlanetCCRMA)
  • openSUSE (Open Build Service)

Bleeding Edge

These are the latest builds of the development branch.

Windows

Current Version

  • . 3.11.2, 64-bit
  • . 3.11.2, 32-bit

Supports Windows 7, 8, 10

Previous releases

  • . 3.10.4, 64-bit
  • . 3.10.4, 32-bit
  • . 3.9.3, 64-bit
  • . 3.9.3, 32-bit
  • . 3.8.1, 64-bit
  • . 3.8.0, 32-bit (sn*)
  • . 3.8.0, 32-bit (Sonic Pi build)
  • . 3.7.2 (sn*, Win XP)

Bleeding Edge

These are the latest builds of the development branch.

  • . Latest build (x64) (sn*)
  • . Latest build (x86) (sn*)

*) Builds marked 'sn' include the supernova server.

Supercollider Radiohead

Other platforms

SuperCollider can be used on embedded platforms, including Raspberry Pi and Beagle Bone Black. See the projectREADMEs for more information.

Releases

SuperCollider Releases (including Stable Releases, Betas, and Release Candidates)

Building from source

Build instructions are included in the source code, and can be found in the README corresponding to your system. These instructions, as well as some platform specific build guides, can also be found on the Building from source page.

Plugins and Extensions

Supercollider Movie

  • The sc3-plugins are extension plugins for the SuperCollider audio synthesis server. These third-party plugins provide additional synthesis, analysis, and other capabilities for the sound server.

  • Quarks are packages containing classes, extension methods, documentation and UGens. The integrated Quarks package system is used to download and manage these packages on your system.

Coments are closed

Recent News

  • Handy Converter
  • CalendarPro
  • Double PDF
  • Ondesoft ITunes DRM Media Converter
  • MacClean360

Scroll to top