Example cookbook

Open an example in the playground to hear it, adjust its controls, and edit the code. The examples cover instruments, effects, soundscapes, and more advanced DSP techniques. Use the language guide and standard-library reference when you want to understand a particular feature or module.

Instruments

Example Description
Acid bassline A resonant 16-step bass line with accents and slides
Additive synth A plucked arpeggio with eight editable partials, spectral shimmer, harmonic stretch, and stereo echo
Drum machine Synthesized kick, snare, and metallic hats
FM bells A spacious polyphonic struck-metal pattern
Formant percussion Vowel-like resonant percussion
Karplus–Strong Warm plucked strings from short delay lines

The polyphonic instruments play automatically and expose events for triggering individual notes.

Effects

Example Description
Compressor Stereo-linked soft-knee compression
FDN reverb A dense eight-line matrix tail
Live tape looper Capture, varispeed, reverse, and overdub on a virtual tape
Schroeder reverb A bright classic comb-and-allpass room
Shimmer echo Cross-fed echoes with octave-shifted regeneration
Stereo chorus Fractional-delay ensemble motion
Tape echo Dark saturated repeats with wow and flutter
Wavefolder Wavefolded harmonics

Effects play a built-in sound by default. To process your own audio, select an input and set live_input to true. The Schroeder and FDN examples also show how to connect processors with a graph block.

Soundscapes and experimental systems

Example Description
Aurora Pad A minor chord spread across a gently detuned stereo field and a slowly opening filter
Benjolin A Hordijk-inspired eight-bit rungler instrument
Chaotic delay matrix Burst-driven unstable resonances
Deep-space drone A slowly changing low-frequency chord
Diffuse delay matrix A soft, slowly evolving resonant cloud
Granular cloud A live tape resampled as a stereo grain cloud
Orbital FM An evolving phase-modulation drone with detuned carriers, sub-octave body, and orbiting shimmer
Neural synth A self-oscillating neural network with resonant feedback
Polyphonic saw An eight-voice randomized saw cascade
Resonant delay matrix Four nonlinear cross-coupled delays
Wind chimes Irregular modal chimes over filtered air

Advanced DSP and graph syntax

Example Description
Cybernetic feedback graph Cross-coupled graph cycles made causal with >>[1] delayed edges
Dual FM oscillator, 8× A compact musical use of local oversampling and feedback phase modulation
PaulStretch Extreme time stretching of a supplied recording, with adjustable playback position
Spectral delay Delays and feedback across frequency bins for evolving stereo echoes
Spectral freeze Freeze a sound’s spectrum, with smearing and transposition

MIDI and DAW examples

These patches are shared with the Onda VST3 plugin. Open either instrument with onda run to play it using the piano, computer keyboard, or a connected MIDI device. The computer keyboard is active by default. In the browser, choose Connect MIDI device… for hardware MIDI or play the on-screen keys.

Example Description
MIDI FM bells Velocity-sensitive FM bells
MIDI poly saw An eight-voice saw synth with per-channel pitch bend
Orbit flanger Stereo live input with quadrature modulation
Reactive wavefolder Stereo live input with envelope-driven folding
Tempo ping-pong DAW tempo in a plug-in; 120 BPM fallback elsewhere
Transient sculptor Stereo live input with fast/slow envelope separation

The four effects require a selected audio input or browser microphone. A DAW supplies tempo and transport inputs through the plug-in; those inputs are inactive in standalone playback.

Self-contained projects

These projects include the source files and data needed to play them. Each link opens the project folder in the repository:

Project Description
Embedded Room Room reverb using an included stereo impulse response
Score-driven Resonator A modal instrument played by an included note sequence
Wavetable Garden Morphing between four included wavetables

From a repository checkout, open a project’s .ondaproject file with Onda Run:

onda run examples/projects/embedded_room/embedded-room.ondaproject

In the playground, use Open project with a ZIP containing the complete project. See opening projects in the browser for packaging instructions.