Audio Gallery
Every clip below was rendered offline by the platform itself from the linked source -- the code shown is the code you hear. Clips are re-rendered from source on every site deploy, so they can never drift out of date.
Bubbles
The cookbook's first synth: two LFOs glissando a sine wave through a comb-filter echo. Eight lines, compiled to a native plugin.
-- An LFO-driven sine through a comb filter. `nnhz` converts a MIDI-style
-- note number to Hz; `|>` pipes the left value in as the last argument.
fn bubbles() S =
0.4 lfsaw * 24
+ [8, 7.23] lfsaw * 3
+ 81
|> nnhz sinosc * 0.04
|> combn(0.2, 4) outlet;
Fraction Sequencer
A just-intonation pattern written as exact Fractions, stepped at three tempos by three detuned smooth-saw layers into a comb echo.
-- Three detuned smooth-saw layers step through a just-intonation pattern
-- (frequency ratios as exact Fractions) at three tempos, into a comb echo.
fn seqTest() S {
let middleC = 256;
let pattern = [1/1, 6/5, 3/2, 9/5, 2/1, 12/5, 3, 18/5] * middleC;
let detune = [-0.04, 0.04];
(
(1 lfimp seq(pattern * 0.25, 8) + detune) smoothSaw(5) * 1.4
+ (2 lfimp seq(pattern * 1.0, 8) + detune) smoothSaw(4)
+ (4 lfimp seq(pattern * 2.0, 8) + detune) smoothSaw(3) * 0.7
) combn(3/8, 4) * 0.2 |> outlet
}
Blip Sweep
A detuned pair of band-limited impulse trains whose harmonic count breathes with a slow sine.
-- A band-limited impulse pair whose harmonic count sweeps with a slow
-- sine, fading in over a tenth of a second.
fn blipTest() S {
let h = 1/20 sinosc(0.75) bilin(1, 48);
[36, 36.13] blip(0, h) fadein(0.1) * 0.2 |> outlet
}
Sine Cloud
Sixteen randomly tuned sines, each pulsing on its own slow LFO -- the whole cloud built by auto-mapping over array-shaped arguments.
-- Sixteen sines at init-time random frequencies, each amplitude-modulated
-- by its own slow random LFO, mixed down to stereo. Auto-mapping builds
-- all sixteen channels from array-shaped arguments.
fn sineCloud() S {
let chans = 16;
let detune = [-1, 1] vec;
let freqs = exprand(100, 600, 8, Rate.init) + detune;
let ampPhases = urand(chans, Rate.init);
let ampFreqs = exprand(0.1, 0.5, chans, Rate.init);
let amps = ampFreqs fsinosc(ampPhases) uni;
let oscs = freqs fsinosc cb * amps;
oscs sum(2) * 0.1 |> outlet
}
Music Libraries Demo
A demo of the music libraries: three instruments (wavetable lead, Karplus-Strong pluck, resonator bank) each through its own effect chain into a shared reverb bus, playing a multi-section piece in each composition dialect -- a weighted-random groove in music.pat, a six-section canon built by the temporal-media algebra of music.media, and Bohlen-Pierce euclidean patterns in music.spans. About 3.5 minutes.
-- A (0-32): weighted random degrees with breathing rests, cycled
-- durations that cross the bar, brownian dynamics
let melodyA = bind(
wpicks([degree(0), degree(1), degree(2), degree(3),
degree(4), degree(6), rest()],
[3.0, 2.0, 3.0, 1.5, 2.5, 1.0, 2.0]),
List(0.5, 0.25, 0.25, 0.5, 0.5, 1.0) cyc,
browns(0.25, 0.6, 0.08),
List(0.85) cyc);
let bassA = bind(
List(-14, -14, -10, -14, -14, -11) cyc degree,
List(0.75, 0.75, 0.5) cyc,
List(0.6) cyc,
List(0.9) cyc);
let padsA = padTriads(List(0, -1, 1, -3) cyc, 4.0, 0.26);