home/ modules/ supercollider-io-analysis-and-integration

SuperCollider: I/O, analysis and integration

  • learner can receive and send MIDI and OSC and remap external data to sound live
  • learner can extract audio features (pitch, amplitude, FFT/MFCC) for responsive systems
  • learner can build GUI controls and sonify external data

Build a SuperCollider instrument driven by live MIDI input and OSC, with a small GUI, whose synthesis parameters are steered in real time by pitch/amplitude/FFT analysis of the incoming audio, and route MIDI out to a DAW.

This module turns SuperCollider from a closed synthesis sandbox into the hub of a real performance rig. On stage — a laptop, a MIDI keyboard, a phone sending OSC over Wi-Fi, and a DAW recording the set — the instrument that matters is the one that listens: to your hands, to the network, and to its own audio. The capstone is exactly that instrument: MIDI-playable, OSC-steerable, self-analysing, GUI-monitored, and feeding MIDI back out to a DAW.

The arc starts with MIDI input. Get notes sounding from a keyboard using the MIDIdef callback pattern, drilling per-note synth tracking so held chords release cleanly (“ADSR gate management requires per-note synth node tracking”). Next, open the network side: send and receive OSC with NetAddr and OSCdef, then practise re-evaluating an OSCdef live to remap phone-sensor data onto synthesis parameters mid-performance. In parallel, wire a machine-listening front end — SoundIn feeding Pitch and Amplitude UGens, then FFT frames for spectral shape (the foundation MFCC analysis builds on) — so the instrument reacts to what it hears. Finally, wrap it in a small Window of sliders and views, and route MIDIOut through a virtual bus to the DAW, minding the channel off-by-one and latency defaults.

Every required atom gates the capstone: without the MIDI procedure (connectAll, per-note tracking, gate management), notes hang; without OSC and live remapping, external data cannot steer sound; without the analysis UGens and mic input, parameters have nothing to follow; without GUI composition and mapping strategy (linear vs exponential scaling from sonification practice), the instrument is neither controllable nor musical. Supporting atoms widen the horizon — earlier MIDIdef concept references, OSC’s design rationale, mouse control as a pre-MIDI stepping stone, reproducible seeds, machine-listening performance systems, spatialization and granular textures — enriching where the instrument can go once it works.

Runnable examples

Generated from the context/ instrument corpus by concept (redistributable idioms only). Do not edit — regenerate with gen-module-examples.mjs.

physical-modeling

Mandolin m => dac; 0.9 => m.pluck; 220 => m.freq;

chuck-0043 · MIT

Atoms in this module

Required — these gate the capstone

SC receives MIDI via MIDIIn.connectAll and MIDIdef callbacks; ADSR gate management requires per-note synth node tracking
Procedure L3 Craft FB
MIDIOut sends MIDI from SuperCollider to a DAW via the macOS IAC Driver virtual MIDI bus
Concept L3 Craft F
SuperCollider sends and receives OSC messages over UDP, enabling integration with other software and hardware
Concept L2 First instrument FN
OSC lets SuperCollider send and receive timestamped musical messages over a network
Concept L3 Craft F
OSCdef triggers a function on incoming OSC and can be re-evaluated live to remap external data to sound
Concept L4 Performance FJN
SuperCollider's Pitch and Amplitude UGens extract frequency and loudness from audio input in real time
Concept L3 Craft FJ
SuperCollider's FFT UGens enable real-time spectral processing in the frequency domain
Concept L3 Craft FB
MFCC UGen extracts 13 spectral shape coefficients from an FFT frame for timbre classification in SuperCollider
Concept L4 Performance FJ
SoundIn.ar reads from the sound card's input buses; use headphones to prevent feedback
Concept L2 First instrument FN
SuperCollider’s GUI redirect system returns the active kit’s class when you request a generic Window
Concept L2 First instrument F
SuperCollider's cross-platform GUI builds windows, sliders, and views by composing View objects in layout managers
Concept L2 First instrument FN
Sonification maps non-audio data to sound parameters to convey information through the ear in SuperCollider
Concept L3 Craft FJ

Supporting — enrichment, not gating

SuperCollider responds to incoming MIDI by registering callback functions on MIDI message types
Concept L2 First instrument FN
SC receives MIDI via MIDIIn.connectAll and MIDIdef, and tracks note on/off pairs using arrays indexed by MIDI note number
Concept L3 Craft FN
OSC (Open Sound Control) is a network-based messaging protocol for real-time musical control, designed to supersede MIDI's limitations
Concept L2 First instrument FJE
MouseX and MouseY turn cursor position into live control signals, making a synth playable in real time
Concept L2 First instrument FN
SuperCollider's RandSeed and RandID make stochastic synthesis reproducible from a given seed
Concept L3 Craft FB
Some live coding systems fold machine learning and machine listening into the performance, letting the coder train and steer models live
Concept L4 Performance FK
Interactive music systems react to performer input in real time, ranging from deterministic score-following to autonomous improvising agents
Concept L3 Craft FJ
Algorithmic spatialization places sounds in virtual acoustic space using channel-based diffusion, object-based rendering (VBAP/Ambisonics/WFS), or binaural techniques
Concept L3 Craft FN
Vocable synthesis maps written phonetic symbols to physical model parameters so short words describe complex instrumental articulations
Concept L4 Performance FB
CTK objects populate a Score-like structure that plays in both real-time and non-real-time synthesis
Concept L3 Craft FN
Granular synthesis constructs sounds from thousands of short grains (10–100 ms) with independent parameters
Concept L3 Craft FB