SuperCollider sound generator
Beyond the IDE
As mentioned elsewhere, SuperCollider is a means to an end. Apart from an extensive vocabulary for sound, sclang
offers a complete toolset that allows you to create your own interfaces. Listing 3, for example, creates the interface shown in Figure 4.
Listing 3
guiexample.scd
This program recycles the sinewave
SynthDef seen earlier and, from lines 9 to 31, creates a simple window with three elements – a slider, a knob, and a button – to control the wave. Line 12 creates the window with FlowView
, setting the title to Example
.
EZSlider
in line 13 creates the volume slider, and its parameters set the parent window (i.e., the window that contains it), the values it can take (between 0 and 1), the action it controls (a volume change of x
, which is an "object" of the sinewave
SynthDef, set in line 22), and the initial value (0.5
).
The EZKnob
widget in line 14 is virtually the same as EZSlider, except it controls the frequency of x
.
The Button
widget in line 16 creates a multistate button (with the values "Off"
and "On"
) and starts and stops the sound depending on whether it transitions from one state to the other or vice versa. Finally, line 30 sets the button's initial state; otherwise, the button will not show up in the window.
To run this program, first execute the sinewave
SynthDef (place your cursor somewhere within the brackets and press Ctrl+Enter) then the program proper (move to line 10, for example, and press Ctrl+Enter again). At this point, the window will pop up. Press the On/Off button to start and stop the sound, drag the slider to change its volume, or twist the knob to change the pitch.
Quarks and Plugins
Extensions are called Quarks in the SuperCollider lingo. These comprise anything from musical games (e.g., Chordtris, a musical Tetris played with a midi keyboard; Figure 5) to graphical interfaces for live performances.
SuperCollider comes with its own package manager, also named Quarks (Figure 6). To get a list of Quarks, type Quarks.gui
in the SC IDE, press Ctrl+Enter, and click the Update Quarks Listing button in the window. If nothing happens in a reasonable stretch of time, check the SC IDE Post window for errors. It may instruct you to erase a directory, such as /home/[user]/.local/share/SuperCollider/quarks
and run Quarks.gui
again. After installing or deleting Quarks, you might have to update the libraries and help systems by clicking Language | Recompile Class Library.
Plugins enhance the environment and add functionality to the language. To download the latest set of plugins from GitHub, use
$ git clone https://github.com/supercollider/sc3-plugins.git
and then compile as you would any source code program.
Conclusion
SuperCollider is not for the faint of heart. As with particle physics, sound creation and manipulation are difficult. Also, SuperCollider is immense, and I have only covered the bare basics in this article. SuperCollider broaches literally everything you will ever need for sound engineering, allowing you to use it at nearly any level of competence.
SuperCollider is useful for educational purposes (plot
and scope
are great to show students what happens when a sound is being produced), composing, and live performances. If you want to experiment, check out the MouseX
and MouseY
functions to create a two-dimensional virtual theremin on your screen with a couple of lines of code. Also, see how easy it is to create a Vocoder or to develop your own tools for your personal recording studio.
Infos
- SuperCollider official site: http://supercollider.github.io/
- SuperCollider download page: http://supercollider.github.io/download.html
- Jack sound server: http://jackaudio.org/
- SuperCollider programming language tutorial: http://docs.fedoraproject.org/en-US/Fedora/15/html/Musicians_Guide/sect-Musicians_Guide-SuperCollider-Basic_Programming.html
« Previous 1 2 3
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.