No matter how feature laden hardware synths and desktop music programs become, there comes a time when you bump up against these products' design limitations.
Publish date:
Social count:
No matter how feature laden hardware synths and desktop music programs become, there comes a time when you bump up against these products' design limitations.

No matter how feature laden hardware synths and desktop music programs become, there comes a time when you bump up against these products' design limitations. With a sound-programming language such as James McCartney's SuperCollider 2.0, however, you can add nearly any function you want to your arsenal of music-making tools. Need a 40-operator FM sound? No problem. How about a 128-oscillator additive patch? That's easy enough.

There must be a catch, you say, and indeed there is. Instead of the familiar graphic interface and menu options found in modern desktop music programs, sound-programming languages present you with lines and lines of code that are used by the computer to create the sound you design. If you misspell a single word, the routine won't run, and if you forget to include even one value that a particular function needs, you also end up with nothing. Once you begin to work with such a language, however, you'll have incredible sound synthesis and compositional resources at your fingertips.

SuperCollider is an object-oriented programming language designed for software synthesis and signal processing in real time. It is fully MIDI integrated and virtually unlimited in its extensibility. The result of five years of development, SuperCollider is a remarkable achievement: it's fast, amazingly efficient, versatile, and expressive. It brings the benefits of modern programming languages such as SmallTalk and C++ to software synthesis (see the sidebar "Software Synthesis 101"). SuperCollider 2.0 is a major rewrite, not just a features-added rerelease of version 1.0. At the time of this writing, the current revision (and the subject of this review) is version 2.0.

GOING SOFTSoftware synthesis uses a computer to generate waveforms that can be stored on disk or played back in real time. In the early days of software synthesis, the only "interface" was a computer terminal or card punch through which the synthesist/composer entered the lines of code that specified sounds and durations-not exactly the most efficient system for capturing musical ideas and performance gestures. With SuperCollider, a good bit of typing is still required, but you can also build your own graphic interfaces to control different parameters in real time, or even use your mouse to "perform" the sounds you've designed.

Many software synthesis languages are based on analog synth concepts and architecture, and the analog synth analogy is a good model for understanding SuperCollider. In place of the synth module however, synthesis languages like SuperCollider use unit generators, which are algorithms or functions that generate or process sound. Imagine all the different sound building blocks in your hardware synthesizer (filters, LFOs, oscillators, delays, and the like), and you'll have a good idea of the types of things you can use to build sounds with SuperCollider. Now add dozens of other sound-generating and sound-processing tools, mathematical functions for altering data, and the ability to patch together any of these functions in series or parallel. (See the sidebar "SuperCollider's Toolkit" for a summary of the available unit generators. A complete list can be found at the developer's Web site.)

Using SuperCollider, you build very complex synth "networks" by linking small components. In many cases, just a few lines of code can result in a very elaborate sound. You can easily generate an entire piece using this method, or you could create just a single sound of any duration. You could also transfer your SuperCollider sounds to a sampler or load them into a multitrack audio editor to assemble your final composition.

Of course, there are other sound-programming languages around today, most importantly Barry Vercoe's Csound. It, too, requires considerable typing and a good knowledge of modern synthesis techniques. But working with Csound compared with using SuperCollider is like programming in assembly language (in which every task must be broken down to its simplest components) compared with programming in a modern, high-level language. Csound does have the advantage of running on nearly any current computer platform, whereas SuperCollider is (for now) a Mac-only application. Csound is also a public-domain application and, as such, is available free of charge.

SHOW ME THE CODESo what does a unit generator look like? How do you actually program a sound? We'll take a close look at two fairly simple examples and then cover some of the many functions SuperCollider provides. To get started, here's the code that would produce a 5-second sine wave at 800 Hz with a relative amplitude of 0.1:

The left parenthesis above and the right parenthesis below the code are strictly for convenience: in SuperCollider, clicking immediately to the right of the top parenthesis highlights the code in between the parentheses. To have SuperCollider create the sound defined by this code, you highlight these lines and press Enter. This instructs SuperCollider to evaluate the code, generate the samples for the sound, and play it back. (You can specify that new sounds not play back automatically, if you prefer.) As the sound plays, a graph shows the percentage of CPU resources being used, elapsed synthesis time, signal level, and the number of unit generators in use, as shown in the status line at the top of Figure 1. SuperCollider is quite efficient and can handle very complex sounds in real time on most modern systems. Of course, as with any synthesis language, the faster your computer, the more complexity and polyphony you can expect.

To create the sine wave, our example uses the FSinOsc (fast sine-wave oscillator) object. The letters "ar" appended to "FSinOsc" indicate that it is an audio-rate sine wave unit generator. (Oscillators can also be used for control purposes-for example, as LFOs-in which case they would not need to generate audio- frequency signals.) The FSinOsc has two values (or arguments) that must be specified. These are its frequency in hertz, shown here as 800, and its amplitude, which is given as a decimal value (0.1) relative to a maximum value of 1. Both the frequency and the amplitude are enclosed in parentheses. In order to hear the FSinOsc.ar unit generator, we "enclose" it in a Synth object with the message "play" appended. This causes SuperCollider to evaluate the oscillator function inside the Synth object and play it in real time.

In addition to the FSinOsc function, the Synth object in this example has one additional argument, which is the duration in seconds, shown here as 5. The duration is optional; without it, the sound will continue to play until you press Command-Period to stop it. (A duration is required when you want SuperCollider to write a sound to disk.) Notice the use of curly brackets and parentheses: the FSinOsc is enclosed with its values in curly brackets, and the entire Synth object is enclosed in parentheses. These symbols clarify the structure of the code, which makes it easier to understand.

You can add comments to your code by using two forward slashes (//); the rest of the line after the slashes is ignored by the program during execution. Documenting code is often as important as writing it in the first place. It helps you understand your own code when you revisit it, and it helps others who want to learn by hacking your creations. In fact, learning by example is one of the best ways to become familiar with SuperCollider coding. I strongly recommend that you download the demo version of the program and try out some simple examples. (The demo runs for only 30 minutes and synthesizes for only one minute. Function calls to save files are disabled, but text files may be saved in the application.)

BEYOND THE BASICSMoving to a slightly more complex example, we'll create some code to generate and play the output of a gated (enveloped) sine-wave oscillator (see Fig. 2). This patch adds a new type of unit generator, called a variable. A variable is a string of text that serves as shorthand for some longer function. In this case, we use "env" instead of writing out "Env.linen(1,1,1)." In order to assign this meaning to the variable, we must first declare the variable. We use an audio-rate envelope generator (EnvGen.ar) to control the sine wave (SinOsc), which in this example has a fixed frequency of 440 Hz and an amplitude of 0.3 (three-tenths of maximum). This example also incorporates extensive comments.

After declaring the variable "env," we use it to pass the envelope shape to the envelope generator (EnvGen). Next, as we saw above, the Synth.play object creates a new Synth and plays it. Here, Synth is a "container" for the EnvGen unit generator, which in turn uses the SinOsc unit generator. In this example, Synth has only one argument: the unit generator that it plays. We did not specify a duration.

In this case, EnvGen requires two arguments: an envelope shape ("env") and an input signal (a sine wave). The sine wave is created by appending the "ar" suffix to the SinOsc generator. As one would expect, the SinOsc's arguments are frequency, phase, amplitude, and offset.

TIRED OF TYPING?If all this typing puts you off a bit, keep in mind that you can control many sound parameters using graphic faders and sliders. In fact, SuperCollider provides a number of routines for building graphic user interfaces (GUIs) to control synthesis procedures. A built-in GUI editor lets users create custom GUIs and will generate the appropriate code. A set of utilities created for this purpose by SuperCollider user Iannis Zannos takes the existing GUI capabilities even further. (Users routinely make significant contributions to SuperCollider's library of resources.)

Figure 3 shows a user-designed interface for an additive-synthesis program that provides control of harmonic number, amplitude, and phase. You select a harmonic number and its amplitude by clicking at the desired point in the bottom-left pane of the Harmonics window; you specify phase similarly in the right pane. The resultant waveform is shown at far right. (The code used to create this example is found in Figure 1.)

REAL-LIFE POSSIBILITIESNo doubt you're wondering what SuperCollider might offer that you wouldn't find in your sampler or effects unit. Here's a hint: it offers about forty types of filters and delay lines, as well as modules for compression, limiting, expansion, ducking, gating, and pitch shifting. You'll also find functions for distortion, granulation, and ring modulation, along with all the common synthesis methods in various forms. Each of these modules can be hacked easily and combined to build your own personalized SuperCollider processing and effects toolbox. (In this area, some type of graphic interface for building patches, such as those found in Opcode Max or Cycling '74 MSP, would be a big help to some users.)

You could press a single note on your keyboard controller that tells SuperCollider to start a multichannel algorithmic patch containing 10 or 15 layers of sound files (or several such patches simultaneously) with panning and other time-varying changes in the sound. Talk about "multisample groove machines"! This sort of material is right up SuperCollider's alley.

SuperCollider's facility to create copies of patches to incredible depths of duplication makes it a natural for basic sample-to-key mapping. Its processing speed (depending on your CPU, of course) lets you layer and transform sounds. You can also do multichannel work that is unheard of in hardware synths and would bog down many graphics-driven software-synthesis programs.

Of course, sample playback via MIDI key commands is nothing to write home about. But what if you could add morphing and other types of real-time spectral manipulation, and as many effects for each sample as you like, all with MIDI, mouse, or Wacom graphics tablet control? Those are all possibilities offered by SuperCollider.

To bring you back to Earth, SuperCollider does not have a turnkey sampling "module" (though you may find one in the many user-contributed examples). And to reach the level of mastery where you can build sounds like those described above definitely requires a large time investment. For me, however, SuperCollider radiates possibilities that are downright inspiring. Moreover, the SuperCollider package includes several intriguing examples that could be taken on the road or onstage with great effect.

SOUND CHECKSuperCollider provides an impressive stock of audio and MIDI I/O options. I tested the program with a Korg 1212 I/O board as well as with Sound Manager and a Digidesign Audiomedia III card. The Sonorus StudI/O card is also supported.

The program worked flawlessly with the Korg board in all kinds of multichannel tests, and it worked similarly with Sound Manager. The Audiomedia III also worked successfully; in fact, all Digidesign cards are supported and have been verified by Digidesign to work with SuperCollider.

SuperCollider's MIDI-processing capabilities are extensive. The only problem I noted was a delay in real- time instrument triggering using Sound Manager I/O. This delay can be shortened, but only at the expense of general performance. With some MIDI-controlled patches, latency was still noticeable even with the Korg board.

Working with a sequencer running on the same computer is possible, but you could encounter problems if SuperCollider is stressing the CPU. Because the Mac OS does not allow the sequencer's timing interrupts to occur while the audio interrupt is happening, the sequencer could become choppy if SuperCollider's CPU usage is high. (Other real-time audio programs have the same problem on the Mac, so there's no reason to fault SuperCollider for this.)

SuperCollider has a few other limitations, as well. As powerful and robust a programming language as it is, SuperCollider doesn't yet offer some of the functions you find in other modern synthesis languages. For example, it doesn't have much in the way of physical modeling, and it doesn't yet have the range of spectral analysis and resynthesis tools you can find in a hardware-assisted package like Symbolic Sound's Kyma system. But these are minor concerns in a program so powerful, and you can be sure that many of these functions will show up in time.

LEARNING BY EXAMPLEWhen I first heard them more than a year ago, the highly interesting sound examples included with SuperCollider version 1.0 made a strong impression on me. Version 2.0 is even better in this respect. In a relatively short time, you should be able to find the significant parameters in many of these examples and create totally new sounds by changing them just a bit. You'll also enjoy "performing" many of the examples that can be controlled in real time by movements of your mouse (see Fig. 4). You'll also find a number of sounds in RealAudio format selected from the SuperCollider tutorial, as well as examples at www.sss.arts.ohio-state .edu, a Web site that is maintained by this author.

SuperCollider 1.0 received a tremendous boost with the appearance of a 135-page book written by veteran sound-synthesis author, programmer, and educator Steven Pope (available at www.create.ucsb.edu/htmls/sc.book .html). Unfortunately, Pope's examples won't run under the new version without some informed tweaking. A new, user-friendly, 2.0-compatible book by Alberto de Campo and Pope is in preparation, however; I have seen an advance copy, and I'm very impressed with its effective pedagogy and thoroughness of scope. (You can e-mail inquiries to de Campo at alberto@ create.ucsb.edu.) Excerpts from the text are included free with the SuperCollider release.

You'll also find excellent help within the program. If you forget the arguments to a unit generator, SuperCollider offers ready assistance. For example, if you select SinOsc and type Command-H, you'll get very thorough and sympathetically written help in the form of text and working examples. If you forget which parenthesis or bracket balances which, you can go to the very end of the example, delete the right parenthesis or bracket, and retype it. SuperCollider highlights the complementary mark in the lines of code above. The program abounds with such useful debugging shortcuts.

ONE IN EVERY POT?Will SuperCollider affect the price of potatoes in the general sound-synthesis community? Certainly, many of the program's beautifully worked-out details, its profound capabilities, and the fluidity of the language will be more apparent to those with the background to appreciate them, or who need them for their work. As McCartney puts it, "SuperCollider is probably not for beginners at programming or audio synthesis. It is easier to use than Csound but more technical than [Digidesign] TurboSynth."

On one level, users of Csound, cmusic, or cmix will feel comfortable with the general layout of SuperCollider and will appreciate its speed, brevity, and versatility. But SuperCollider goes far beyond a simple "modernization" of the Music N family. The integration of real-time synthesis with programming in a high-level language is an important and remarkable accomplishment. Certainly, if SuperCollider catches on, we will see archives of GUI-based SuperCollider applications comparable to those currently available for Csound.

At present, it's difficult to prognosticate about SuperCollider's future. I can't imagine a university or conservatory program in sound synthesis that would not include instruction in SuperCollider. For desktop composers who want to add a huge range of sound generating and processing options to their arsenal, it's one of the best bargains around. As of this writing, the sound-synthesis world is abuzz with things SuperCollider, and I believe it is rapidly becoming one of the premier software-synthesis programming environments. Will it eventually be ported to other platforms? McCartney won't make a commitment, but he says it's under consideration. For now, if you own a Macintosh, you can try out a sound-programming language that I feel certain will be around for a long time to come.

Thomas Wells is a composer, author, and professor at Ohio State University. He has been involved with electronic music and audio production for more than 25 years.

Computer sound generation has taken many forms, the earliest of which, software synthesis, was developed at Bell Laboratories in the late 1950s by the father of computer music, Max Matthews. Matthews documented his work in his book The Technology of Computer Music (MIT Press, 1969).

Matthews described a process by which a waveform could be calculated in very fine, evenly spaced time "slices" as a series of numerical values (samples), saved on some storage medium, and turned into sound by routing the stream of numbers through a digital-to-analog converter. Real-time software synthesis came into general use in the late 1980s with the advent of fast-enough computers.

Matthews recognized the need for a core library of programs and subroutines that performed the actions of oscillators, writing to disk, and other functions; he called these subroutines unit generators. Unit generators may be patched together to form what he called orchestras, or synthesis algorithms. The composer using particular unit generators had to memorize the arguments, usually a list of values separated by commas, that the generator required for setting pitch, loudness, phase, and other parameters. The output of a unit generator could be "patched" to other generators using variables that hold the value of the generator at each sample instant, giving the process a signal flow like that in an analog studio.

In the early days of software synthesis, limited computing power made possible only simple signal- generating and processing operations. As a result, many computer-music works from the 1960s and 1970s had a dry, unanimated, Hammond-organ-without-the-vibrato quality when compared with works produced in the analog studios of the time. Also, in the early days, sampling was rarely used because conversion equipment was unsophisticated and data storage capacity was limited. In addition, many of the synthesis algorithms we take for granted today had not been discovered.

Composers and researchers such as John Chowning, F. Richard Moore, Barry Vercoe, and many others throughout the '60s, '70s, and '80s created the software necessary for computer music to develop as an

19 types of oscillators

36 unary operators (square root, transcendental functions, etc.)

31 binary operators (+, >, =, etc.)

14 types of noise generators

27 types of filters

19 types of controls

11 types of amplitude operators (limiters, compressors, etc.)

20 types of delays


5 types of audio I/O

10 types of event spawning

5 miscellaneous unit generators