JavaScript SuperCollider
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Build Status NPM downloads MIT License Dependency Status devDependency Status

The JavaScript client library for SuperCollider.

SuperCollider is an environment and programming language for real time audio synthesis and algorithmic composition. It provides an interpreted object-oriented language which functions as a network client to a state of the art, realtime sound synthesis server.

This library provides functionality for working with:

  • scsynth (the synthesis server)
  • sclang (supercollider language interpreter)


API Guide


  • Send and receive OSC messages

  • Comprehensive support for calling all commands the server understands

  • Call async commands on the server receive results as Promises

  • Synth/Group/Bus/Buffer allocators with clean immutable state implementation

  • Server state and synth/group tracking

  • Just-in-time OSC scheduler

  • Codebase written with Flow (type checking)

  • High unit test coverage

  • Dryadic: declarative DSL for managing component trees.


See also the Examples Repository.


Interpret SuperCollider language code.

var sc = require('supercolliderjs');

sc.lang.boot().then(function(sclang) {

    .then(function(result) {
      // result is a native javascript array
      console.log('= ' + result);
    }, function(error) {
      // syntax or runtime errors
      // are returned as javascript objects

}, function(error) {
  // sclang failed to startup:
  // - executable may be missing
  // - class library may have failed with compile errors


let sc = require('supercolliderjs');

sc.server.boot().then((server) => {

  // Compile synthDef from a file
  // Will recompile and send to server if the file changes.
  let def = server.loadSynthDef('formant', './formant.scd');

  // Create group at the root
  let group =;

  let freqSpec = {
    minval: 100,
    maxval: 8000,
    warp: 'exp'

  // Map 0..1 to an exponential frequency range from 100..8000
  let randFreq = () =>, freqSpec);

  let spawn = (dur) => {
    server.synth(def, {
      fundfreq: randFreq(),
      formantfreq: randFreq(),
      bwfreq: randFreq(),
      pan:, 1, -1, 1, Math.random()),
      timeScale: dur
    }, group);

    let next = Math.random() * 0.25;
    // Schedule this function again:
    setTimeout(() => spawn(next), next * 1000);




Works on Node 4+

Source code is written in ES2015 with Flow type annotations.



MIT license