home/ modules/ developing-an-audio-plugin-with-remote-control

Developing an Audio Plugin with Remote Control

  • learner can architect a plugin around a single-source-of-truth state (JUCE ValueTree / XML preset schema) and CSV-driven parameter code generation
  • learner can separate an audio tool into engine, sensor I/O, and API processes communicating over OSC/WebSockets
  • learner can expose an OSC/WebSockets control surface so external UIs and scripts drive the plugin at runtime

Build a small networked audio plugin/instrument: define parameters in a CSV schema and generate the boilerplate, back its state with a ValueTree (or an XML preset schema mirroring the class hierarchy), split engine/sensor/API into separate processes, and expose an OSC/WebSockets interface a web page or script can drive live.

This module is about building the kind of instrument you can put on stage without a laptop screen: a sampler or synth whose audio core runs headless — on a Raspberry Pi, an Elk board, or inside a DAW — while phones, web pages, hardware knobs, and live-coding environments all drive it over the network. The SOURCE sampler is the running case study, and its architecture is the target skill: state, code, and control designed so the same engine survives every deployment.

The arc starts supported. First you study how a single ValueTree can act as the plugin’s entire state — presets, UI, and in-memory objects all reading one tree — using the XML preset hierarchy (PRESET > SOUND > SOUND_SAMPLE) as a concrete map of state mirroring class structure. Then you practice the specification-first loop: add a row to a CSV parameter schema, regenerate the boilerplate, and watch the parameter appear everywhere at once. This regenerate loop and the message-sending habit (fire an OSC or WebSocket command, observe the state push back) are the two drills worth repeating until automatic, because you will do both dozens of times while building the capstone.

The unsupported step is architectural: splitting engine, sensor I/O, and glue/API into separate processes so the audio thread never touches the network, then exposing a small named-command control plane any client can speak. Every required atom gates that build — drop one and the capstone degrades into a monolith with hand-written parameter plumbing. The supporting atoms enrich rather than gate: sample playback and the MIDI protocol ground what your engine actually renders and receives, while music-centred design sharpens judgment about what your control surface should feel like for performers and audiences.

Atoms in this module

Required — these gate the capstone

JUCE's ValueTree structure can serve as a single source of truth for a plugin's complete state, driving all object creation
Concept L3 Craft NB
Audio plugin parameters can be defined in a CSV schema and the parameter boilerplate auto-generated to reduce repetition
Principle L3 Craft N
SOURCE presets are XML files where PRESET > SOUND > SOUND_SAMPLE hierarchy mirrors the sampler's class structure
Fact L3 Craft NC
SOURCE separates audio engine, sensor I/O, and API communication into three independent processes connected by OSC/WebSockets
Concept L3 Craft NC
Exposing a WebSockets and OSC interface lets any UI — web page, hardware controller, script — control an audio plugin at runtime
Concept L3 Craft NF

Supporting — enrichment, not gating

Sample playback reproduces a stored recording at variable rate to change pitch, trading flexibility for sound quality and memory
Concept L1 Foundations BC
MIDI is a 7-bit serial protocol sending note and control events on up to 16 channels, not audio
Concept L1 Foundations BNEF
Music-centred design extends user-centred design to privilege the needs of performers, audiences, and musical flow — not just usability metrics
Concept L3 Craft NF