Sonic Pi · 6 live_loops · one root · 7 minutes
One note, six layers, seven minutes. Everything built from A4.
A drone in A with a random pentatonic melody, a delayed major chord, and a sub-octave bass.
What this is
A long-form ambient piece built around a single note — A4 (440 Hz). No chord changes, no melody in the traditional sense. Six live_loops run at different speeds and create movement through texture, not through harmony.
I wanted something that could run for seven minutes without getting boring, using only one root note and a small set of synths. The whole thing is ~40 lines of code.
Audio
[вставь плеер SoundCloud / Bandcamp / локальный файл]
Или: Link to audio — [URL]
Structure
| Loop | Synth | Role | Sleep |
|---|---|---|---|
:sun_core | :sine | Sustained drone on A4 | 12 |
:child | :pretty_bell | Random notes from A major pentatonic | rrand(4, 8) |
:bloom | :hollow | Major chord, delayed entry | 14 |
:ground | :dark_ambience | Sub-octave drone (A3) | 16 |
:pulses | :mod_sine | Random note + cutoff modulation | 10 + 10 |
:sky | — | Mixer fade and stop | 300 |
All loops run inside two global effects: :reverb (room 0.9, mix 0.5) and :echo (phase 4, decay 6, mix 0.15).
Key decisions
Why one root note
ROOT = :a4 — everything builds from this. Melody comes from scale(ROOT, :major_pentatonic), harmony from chord(ROOT, :major), bass from ROOT - 12. No modulation, no key changes. The interest comes from layering and timing, not from notes.
Why sleep rrand(4, 8) in :child
The melody loop shouldn’t be predictable. A random interval between 4 and 8 beats makes it feel like it’s breathing rather than looping. Combined with pan: rrand(-0.5, 0.5), each note lands in a slightly different place in the stereo field.
Why sleep 60 if tick == 0 in :bloom
The pad shouldn’t enter at the start. tick counts loop iterations; on the first one, the loop waits 60 beats before playing the chord. This creates an entrance — the harmony arrives after the drone has already established itself.
Why control s, cutoff: ... after sleep 10 in :pulses
The :mod_sine note is played, then after 10 beats the cutoff is modulated. This changes the timbre of the note while it’s still sounding, rather than shaping it only at the attack. It creates movement inside a single note.
Why set_mixer_control in :sky
The piece ends by reducing the master amplitude slightly (0.9), restoring it (1.0), then calling stop. This gives a short fade rather than an abrupt cut.
Full code
ruby
# ==========================================================
# PRIMAL CLARITY
# Duration ~7 minutes
# ==========================================================
use_bpm 96
ROOT = :a4 # ≈440.00 Hz
with_fx :reverb, room: 0.9, mix: 0.5, damp: 0.4 do
with_fx :echo, phase: 4, decay: 6, mix: 0.15 do
# ------------------------------------------------------
# DRONE — sustained sine at root
# ------------------------------------------------------
live_loop :sun_core do
use_synth :sine
play ROOT,
attack: 6,
sustain: 10,
release: 12,
amp: 0.3
sleep 12
end
# ------------------------------------------------------
# MELODY — random notes from major pentatonic
# ------------------------------------------------------
live_loop :child do
use_synth :pretty_bell
play choose(scale(ROOT, :major_pentatonic, num_octaves: 2)),
attack: 1,
release: 6,
amp: 0.08,
pan: rrand(-0.5, 0.5)
sleep rrand(4, 8)
end
# ------------------------------------------------------
# PAD — major chord, delayed entry
# ------------------------------------------------------
live_loop :bloom do
sleep 60 if tick == 0
use_synth :hollow
play chord(ROOT, :major),
attack: 4,
sustain: 6,
release: 10,
amp: 0.1,
cutoff: 85
sleep 14
end
# ------------------------------------------------------
# BASS — sub-octave drone
# ------------------------------------------------------
live_loop :ground do
use_synth :dark_ambience
play ROOT - 12,
attack: 5,
sustain: 8,
release: 14,
amp: 0.28,
cutoff: 70
sleep 16
end
# ------------------------------------------------------
# PULSES — random note, cutoff modulated after onset
# ------------------------------------------------------
live_loop :pulses do
sleep 120 if tick == 0
use_synth :mod_sine
n = choose(scale(ROOT, :major_pentatonic, num_octaves: 2))
s = play n,
attack: 3,
sustain: 3,
release: 8,
mod_range: 0.12,
amp: 0.07
sleep 10
control s, cutoff: rrand(70, 100)
sleep 10
end
# ------------------------------------------------------
# MIXER FADE — reduces amp, then restores, then stops
# ------------------------------------------------------
live_loop :sky do
sleep 300
set_mixer_control amp: 0.9
sleep 25
set_mixer_control amp: 1.0
stop
end
end
end
What I’d change next
- Try a different root. Change
ROOT = :a4to:c4,:e4or:d4— same code, different feel. - Longer reverb.
room: 0.95anddamp: 0.3would push it further into ambient territory. - More movement in
:child. Adding a second pentatonic scale (e.g.:minor_pentatonic) and switching between them every 30 seconds. - Remove
:sky. The fade is fine, but a hard stop after 7 minutes might be more honest.
Notes
- No external samples. Everything comes from Sonic Pi’s built-in synths.
- The code runs as-is in Sonic Pi 4.x.
- If you change the BPM, the whole piece stretches —
sleepvalues are in beats, not seconds.
License
Code: MIT Audio: all rights reserved Text: CC BY 4.0
If you use the code link back to this post. If you want to use the audio ask first.