Skip to content

Instantly share code, notes, and snippets.

@hasantayyar
Last active July 29, 2026 14:47
Show Gist options
  • Select an option

  • Save hasantayyar/8afa7d1799b7741d405c44454ce19333 to your computer and use it in GitHub Desktop.

Select an option

Save hasantayyar/8afa7d1799b7741d405c44454ce19333 to your computer and use it in GitHub Desktop.
Strudel.cc meditation and ficus melody
// "Geography of Afterlight"
// Original generative ambient study
// Inspired by broad characteristics of Rafael Anton Irisarri's work.
//
// Start with low headphone/speaker volume.
// One complete harmonic journey takes several minutes.
// VISUALS — slow fog, erosion and distant light
await initHydra({ detectAudio: true })
a.setBins(4)
a.setSmooth(0.92)
noise(2.5, 0.035)
.color(0.18, 0.28, 0.42)
.contrast(1.25)
.modulate(
noise(1.1, 0.018),
() => 0.08 + a.fft[0] * 0.12
)
.add(
osc(3, 0.012, 0.8)
.rotate(Math.PI / 2)
.color(0.18, 0.24, 0.36)
.luma(0.45, 0.25),
() => 0.16 + a.fft[2] * 0.12
)
.add(
osc(12, -0.006, 0.3)
.rotate(() => Math.sin(time * 0.025) * 0.15)
.color(0.04, 0.08, 0.14)
.luma(0.55, 0.18),
0.08
)
.saturate(0.7)
.brightness(-0.04)
.out(o0)
render(o0)
//////////////////////////////////////
setcps(0.12)
const harmony =
"<[d2,a2,d3,e3] [bb1,f2,c3,d3] [f2,c3,g3,a3] [c2,g2,d3,e3]>/8"
// MAIN HARMONIC MASS
const drone = note(harmony)
.sound("sawtooth")
.attack(4)
.decay(3)
.sustain(0.75)
.release(10)
.lpf(sine.range(450, 1150).slow(16))
.lpq(1.2)
.vib(0.09)
.vibmod(0.06)
.shape(0.12)
.room(0.92)
.roomsize(8)
.roomlp(4200)
.roomdim(1500)
.gain(0.22)
.orbit(2)
// SOFTER FUNDAMENTAL BENEATH THE MAIN DRONE
const undertow = note(
"<d1 d1 bb0 bb0 f1 f1 c1 c1>/8"
)
.sound("sine")
.attack(5)
.release(12)
.lpf(260)
.vib(0.05)
.vibmod(0.035)
.room(0.72)
.roomsize(7)
.roomlp(1000)
.gain(0.30)
.orbit(3)
const fragments = note(
"<d4 ~ a4 ~ [f4,a4] ~ e5 ~ d4 ~ c5 ~ a4 ~ f4 ~>/4"
)
.sound("triangle")
.fm(0.7)
.fmh(1.5)
.fmattack(0.8)
.fmdecay(4)
.fmsustain(0.05)
.attack(0.08)
.decay(3)
.sustain(0)
.release(6)
.lpf(2400)
.delay(0.32)
.delaytime(0.75)
.delayfeedback(0.58)
.room(0.90)
.roomsize(9)
.roomlp(6000)
.pan(sine.slow(12))
.gain(0.18)
.orbit(4)
// HIGH SHIMMER
const shimmer = note(
"<~ d6 ~ a5 ~ e6 ~ ~ f5 ~ c6 ~ a5 ~ e6 ~>/8"
)
.sound("sine")
.fm(1.2)
.fmh(2.01)
.attack(1.5)
.decay(5)
.sustain(0)
.release(9)
.hpf(900)
.lpf(6200)
.delay(0.42)
.delaytime(1.25)
.delayfeedback(0.64)
.room(0.96)
.roomsize(10)
.roomlp(7200)
.pan(cosine.slow(16))
.gain(0.11)
.orbit(5)
// FOG: FILTERED PINK NOISE, RETRIGGERED FOR SLOW MOVEMENT
const fog = sound("pink")
.seg(8)
.attack(1.8)
.decay(2)
.sustain(0.35)
.release(4)
.hpf(sine.range(90, 280).slow(12))
.lpf(sine.range(700, 2300).slow(20))
.bpq(0.7)
.room(0.88)
.roomsize(8)
.roomlp(3600)
.pan(sine.slow(9))
.gain(0.026)
.orbit(6)
// DECAYED SURFACE NOISE
const erosion = sound("crackle")
.density("<0.008 0.025 0.012 0.045>/8")
.bpf(sine.range(700, 3600).slow(17))
.bpq(1.4)
.delay(0.28)
.delaytime(0.5)
.delayfeedback(0.44)
.room(0.78)
.roomsize(6)
.roomlp(5000)
.pan(rand)
.gain(0.055)
.orbit(7)
// OCCASIONAL LOW PRESSURE WAVE
const pressure = note(
"<d1 ~ ~ ~ bb0 ~ ~ ~ f1 ~ ~ ~ c1 ~ ~ ~>/4"
)
.sound("triangle")
.attack(2.5)
.decay(4)
.sustain(0.2)
.release(8)
.lpf(190)
.penv(-0.18)
.pattack(3)
.distort("0.7:0.45")
.room(0.55)
.roomsize(5)
.roomlp(900)
.gain(0.19)
.orbit(8)
stack(
drone,
undertow,
fragments,
shimmer,
fog,
erosion,
pressure
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment