From Fedora Project Wiki

< User:Crantila‎ | FSC

Revision as of 02:27, 14 June 2010 by Crantila (talk | contribs) (created "Basic Audio Programming... " section and removed Method 2)

What Is SuperCollider

(no algorithms)

Requirements and Installation

(no algorithms)

Requirements

This will be a list of software and intellectual requirements for using SC. Primarily it will be a list, but also I'll put in a brief description of each item.

  • You need JACK, which is pulled in by suppercollider-sclang
        • BUG: supercollider-gedit requires the packages 'gnome-python2-gconf' but didn't pull it in for me

Available SuperCollider Packages

  1. Use PackageKit, KPackageKit, or yum to list the available components of SC
  2. Here's a list of what they do:
    • supercollider-ambiem : "Ambisonics classes for SC"
    • supercollider-debuginfo :
    • supercollider-devel :
    • supercollider-dewdrop : "Dewdrop extrenal collection for SC"
    • supercollider-emacs :
    • supercollider-extras : "Extra plugins and classes for SC"
    • supercollider-gedit :
    • supercollider-libscsynth : "SuperCollider synthesis library"
    • supercollider-quarks : "Local quarks repository for SuperCollider"
    • supercollider-sclang : "SuperCollider language"
    • supercollider-vim :
    • supercollider : (pulls in "minimum requirements" to run SC)
      • -sclang
      • -libscsynth
      • libX11
      • libgcc
      • glibc
      • fftw
      • w3m-el
      • libsndfile
      • emacs
      • libstdc++
    • supercollider-bbcut2-debuginfo :
    • supercollider-mathlib : "Useful classes for SC"
    • supercollider-redclasses : "Frederik Olofsson Red SC classes"
    • suprcollider-redclasses-debuginfo :
    • supercollider-world : (pulls in most SC packages)
      • supercollider
      • abmiem
      • -redclasses
      • -dewdrop
      • -emacs
      • -mathlib
      • -midifile
      • -extras
      • -bbcut2
      • -reduniverse
    • supercollider-midifile : "MIDI file reader for SuperCollider"
    • supercollider-reduniverse : "Sonification and visualization of dynamic systems"
    • supercollider-bbcut2 : "Beat tracking of audio streams"
  3. As a start, I recommend 'yum install supercollider supercollider-gedit'
 -avoids extensions that you might not use
 -avoids emacs
  1. On a 64-bit system, this will bring in many i686 dependencies

The Moduler Nature of SuperCollider

This will explain what the title says, as an explanation for why you can download different packages that do different things, but they aren't all required in order to use SuperCollider. I'll also explain why I've chosen to avoid these extra packages in this tutorial.

Using GEdit to Write and Run Code/Programs/Music

The 'supercollider-gedit' package installs an extension for GEdit that allows editing and running SuperCollider code from within the program. Also explain why I've chosen to avoid the emacs version, which seems to be more heavily suggested by the packaging method.

Enable and Configure SCEd in GEdit

  1. open GEdit
  2. go to 'Edit > Preferences'
  3. 'Plugins' tab
  4. Scroll down to "Sced" and make sure that it's checked
  5. Choose 'Configure Plugin' then select a "Runtime folder" where you'll store files created at runtime. I've got this set to a sub-folder of where I store my SuperCollider code.
  6. Close the Preferences dialogue

Put GEdit into SuperCollider Mode

  1. Under the 'Tools' box, select 'SuperCollider Mode'
  2. Notice that a "SuperCollider" menu appears, and a window at the bottom, saying "SuperCollider output" In this window, it says "for help type ... crtl-U (sced/gedit)" meaning that you can press Ctrl + U at any time, and the help files will be opened in your default browser
    1. If you find code in the help files that you wish to execute, you'll have to copy and paste it into GEdit before using Ctrl + E
  3. When you save a file in GEdit with a *.sc extension, GEdit will automatically display that file in a specific way, coloured to more easily see the meaning of SuperCollider code
  4. In order to evaluate any code, an instance of the server will need to be running. You can start the server with 'SuperCollider > Start Server'
    1. Look through the "SuperCollider output" window (bottom pane; you may have closed it) for any warnings.
    2. The warning: "WARNING: GUI.fromID : The GUI scheme 'swing' is not installed" is okay, but it means that we will not be able to use any of the GUI features of SC, or the SwingOSC GUI server
    3. You should see a message saying "Welcome to SuperCollider, for help... " again, followed by "RESULT = 0" meaning that it started successfully
    4. You should also see messages from "JackDriver"; if JACK is not already started, then you'll see that happening. Either way you'll see messages similar to "JackDriver: connected SuperCollider:out_1 to system:playback_1"
    5. One of the last lines will be "SuperCollider 3 server ready.." (yes, only 2 periods)

N.B. Everything up to "Welcome to SuperCollider... " happens when SuperCollider mode is enabled. The server's boot begins with "booting 57110" and messages from JACK; so, what I wrote above is wrong.

Executing Code in GEdit

  1. Select some code to execute (it must be a complete and playable portion), then press Ctrl + e
  2. to stop the sound, press "esc"
  3. You may want to select the entire document, press Ctrl + a ("select all")before Ctrl + e
  4. If you want to hear only one line of code evaluated, it must still be complete and playable, but you need only put the cursor on that line, and there's no need to select the whole line
  5. If the server successfullly executes the code, then something will appear in the "SuperCollider output" pane; if it's a sound, then something like "Synth("temp_0":1000)" but perhaps "RESULT = 0"

Other Tips for Using GEdit with SuperCollider

  • If you close GEdit while the SuperCollider server is running, then GEdit will automatically shut down the server.
  • Any time that JACK is started by the SuperCollider server, it will be shut down when the SuperCollider server is shut down.
  • It is necessary to go 'Tools > SuperCollider Mode' every time you start GEdit, but the plugin should remain enabled in 'Edit GEdit Preferences'
  • Other Functions in the SuperCollider menu:
    • Find Help (same as Ctrl + U; opens the help documents in the default browser)
    • Find Definition
    • Browse class
    • Inspect Object
    • Restart Interpreter
    • Clear output

The Different Parts of SuperCollider

(no algorithms)

Basic Audio Programming with SuperCollider

If licencing permits, then this will be adapted from Scott Wilson's tutorial that is distributed with SuperCollider. If not, then I might cut out some parts and write this section myself, depending on how much time is available. There are more important programs and topics, though.

Functions, Variables, and Assignment

Sound-Making Functions

ArrayedCollections and Multichannel Audio

The Mixer??

How to Get Help

SynthDefs and Synths

Busses

Groups, Nodes, and Ordering

Buffers??

Scheduling and Clocks

Routines and Tasks

Patterns

Composing with SuperCollider

See Method One and Method One (Short).

Exporting Sound Files

There are two methods. One of them is quite simple, but I still have to do them!