SuperSonic - SuperCollider's Synthesis Engine in the Browser

2 min read Original article ↗
SuperSonic

SuperCollider audio goodness baked into your browser

SuperCollider's powerful audio synthesis engine scsynth running in the browser as an AudioWorklet.

Zero installation.

  • AudioWorklet runs in a dedicated high priority audio thread
  • WebAssembly scsynth's original C++ code compiled for the web
  • OSC API trigger synths with sample-accurate timing
Back in the late 90s James McCartney designed a series of live audio programming environments called SuperCollider...

These were systems with both programming languages and audio runtimes carefully designed for live realtime modification at every level — from high sweeping programming language abstractions all the way down to the fine control of the low-level synthesis components of the audio chain.

One of the many gifts from this work is scsynth — the core synthesis engine James created for version 3 of SuperCollider. It was at this point when he formally separated the language from the synth engine.

This split made it possible to combine scsynth's powerful audio synthesis capabilities with any existing — or yet to exist — programming language.

This then led to a suite of powerful new live coding languages using scsynth for audio synthesis.

What if you didn't just bring your language to scsynth? What if you brought scsynth to your environment?

This is SuperSonic. All the synthesis power of scsynth — modified and augmented to run in your web browser.

Get Started

import { SuperSonic } from 'https://unpkg.com/supersonic-scsynth';
const sonic = new SuperSonic({ baseURL: '...' });
await sonic.init();
await sonic.loadSynthDef('sonic-pi-prophet');
sonic.send('/s_new', 'sonic-pi-prophet',
             -1, 0, 0, 'note', 60);
sonic.loadSynthDef('sonic-pi-basic_stereo_player');
sonic.loadSample(0, 'bd_haus.flac');
await sonic.sync();
sonic.send('/s_new', 'sonic-pi-basic_stereo_player',
             -1, 0, 0, 'buf', 0);

SuperSonic exposes scsynth's full, powerful message-based OSC API.

This is a simple playful demo of SuperSonic's audio engine - have fun making noise!

Click/Tap & Drag

X: 0.00

Reverb: 0.30

Y: 0.00

Cutoff: 130

Beat Arp

OSC Out

sent0

bytes0 B

bypass0

lost0

Bypass

msg0

imm0

near0

late0

OSC In

received0

bytes0 B

dropped0

corrupted0

Presched Flow

pending0 | 0

scheduled0

dispatched0

min slack- ms

Presched Health

lates0 (0ms max)

cancelled0

retried0 | 0 | 0

retry queue0 | 0

scsynth Scheduler

queue0 | 0

dropped0

lates0

max | last0 | 0 ms

scsynth

processed0

dropped0

synthdefs0

clock drift0ms

Ring Buffer Level

direct write fails0

AudioWorklet

audio-

ticks0

WASM errors0

debug0 (0 B)

Audio Buffers

used0 B

free0 B

allocs0