Blog Forum Wiki Links Contact Us
 
Translations of this page:

Installing SuperCollider

SuperCollider is an audio/music synthesis environment: a combination of an audio-centric programming language and a highly efficient synthesis server. Website here: http://supercollider.sourceforge.net/

Here's how I installed in on default Xandros (i.e. not even in “advanced” mode):

Enable repositories

In order to make it easy to add the required software, follow these instructions: Adding Additional Software Repositories

Install some pre-requisites

I installed these things by starting a command window (Ctrl+Alt+T) then typing “sudo synpatic” to launch the graphical interface for installing software.

Development tools

(i.e. things for compiling software. I installed the build-essential package for this; some more detailed description at Installing Development Tools

JACK

JACK is a very widely-used audio infrastructure for linux. I installed 4 separate packages:

  • jackd was already installed, I think (it's probably used by other Eee software).
  • libjack helps software talk to jackd.
  • libjack-dev lets you compile software that talks to jackd.
  • qjackctl - this just provides a handy graphical interface for jackd, so it's optional but I find it very handy. Version was 0.101.1-2

Other prerequisites

Some other packages are required, here's what I installed:

  • emacs21 - a text editor (SuperCollider can integrate with this particular text editor) - version was 21.4a+1-3 (blimey!)
  • w3m-el - web browser within emacs. Needed for help file access with emacs/scel.
  • fftw3 and fftw3-dev - required by SuperCollider, it allows frequency analysis - version was 3.1.2-1
  • libsndfile1-dev - required by SuperCollider, allows reading audio files - version was 1.0.16-1
  • libicu36-dev - required for regular expressions
  • libxt-dev - required for the Mouse and Key UGens
  • scons - for building SuperCollider from source - version was 0.96.93-2
  • subversion - for downloading the source code - version was 1.4.2dfsg1-2

Download SuperCollider source-code

You can download the source-code from Sourceforge. Alternatively you can directly get it from the Subversion repository (this gets the latest bleeding-edge version):

svn co https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk SuperCollider3

This creates a folder “SuperCollider3” and downloads the source code into it; takes 30 secs or so.

Compile and install SuperCollider

The “scons” system can build SuperCollider in various configurations (use “scons -h” to see the available options). However, I just did this:

cd SuperCollider3
scons
sudo scons install

The “scons” line does the compilation, and takes about 5 minutes. The last line installs SuperCollider, and takes about 30 seconds.

Installing SwingOSC (OPTIONAL)

SwingOSC is a Java-based GUI system that works nicely with SuperCollider to let you build your own GUIs. You don't need it, it's totally optional, but kinda nice. Download site inc install instructions are at http://www.sciss.de/swingOSC/

Here's how I installed it: after unzipping the download I moved it to /usr/local/SwingOSC - but then, to make sure that SuperCollider could access the SwingOSC-specific files, I created a symlink from SuperCollider's extensions directory to the extensions that SwingOSC provides:

sudo ln -s /usr/local/SwingOSC/SuperCollider /usr/local/share/SuperCollider/Extensions/SwingOSC

In order to make sure SuperCollider connects correctly to SwingOSC I edited my SuperCollider startup file (vim /home/user/.sclang.sc ) and added the following lines:

GUI.swing;
SwingOSC.program = "/usr/local/SwingOSC/build/SwingOSC.jar";
g = SwingOSC.default;
g.boot;

The final line makes the GUI manager boot automatically when I start SuperCollider.

Try out SuperCollider

Firstly make sure you've got jack running. I started it by running this command:

sudo jackstart --realtime --timeout 1000 -d alsa -r 44100 --period 256 -n 4 &

Then you can run the Linux test script (to make some noise) by typing:

sudo sclang linux/examples/onetwoonetwo.sc

That runs SuperCollider from the command-line. Press Ctrl-C when you want it to stop.

Once you've got that working you probably want to use SuperCollider's emacs interface. First, you need to set up a configuration file. Create one in root's homedir by running (eg):

sudo nano /root/.emacs

Type in:

(require 'sclang)

(note that there is only one single quote). Save the file and exit.

Launch SuperCollider by typing:

sudo emacs -sclang

It's unfortunate that sudo is needed, but the Eee doesn't have the “real-time kernel patches” which would allow non-sudo processes to run glitch-free real-time audio threads.

NOTE: (edit by nescivi), using these parameters for JACK:

jackd -p128 -dalsa -r44100 -p2048 -n4

give quite glitch free playback even without starting things as root. Also editing the /etc/security/limits.conf with proper settings for the audio group helps:

@audio  -       rtprio  99
@audio  -       nice    -10
@audio  -       memlock 256000

NOTE (edit by donnek): Although the above allows the emacs interface to be launched, it does not work properly. If you boot SuperCollider's audio engine by typing in:

s.boot

and, keeping the cursor in that line, Ctrl-C, Ctrl-C, and then paste in (eg):

(
        {
                RLPF.ar(
                        in: Saw.ar([200, 202], 0.15),
                        freq: Lag.kr(LFNoise0.kr(4, 700, 1100), 0.8),
                        rq: 0.05
                )
        }.play
)

and run it (by double-clicking on the opening round-bracket to highlight the block, and then Ctrl-C, Ctrl-C) you get:

unmatched ')'
  in file 'selected text' line 1 char 1
ERROR: Parse error
    in file 'selected text'
    line 1 char 1:
  )*
---------------------------------------------
ERROR: Command line parse failed
nil

which means that only the line, instead of the whole block, has been evaluated. It's unclear what the problem is here. Any suggestions welcome!

(edit by nescivi) Executing a block of code is done with C-c C-d. With transient-mark-mode turned on, you can also use C-c C-c for code block execution. In the SClang menu in emacs you can find other options for code evaluation.

Learning SuperCollider

Now the fun begins. Not sure what's best to recommend, but here are a couple of tutorial resources:

Credits

This text is copied from a tutorial by Dan Stowell at http://mcld.co.uk/supercollider/eee/ , with permission from the author. Additions by nescivi (Marije Baalman) rio b and you numero rio

 
howto/installingsupercollider.txt · Last modified: 2012/01/27 19:42 by hello
 
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki