leach.studio
← back

Still Water

Slow notes drifting in D Phrygian. Sine-based poly pad through a long reverb.

seed
still-water-preview
by
stuart
year
2026
tags
ambient · drone

source

import type { Patch } from '@/lib/engine/types'

const stillWater: Patch = {
  id: 'still-water',
  title: 'Still Water',
  author: 'stuart',
  year: 2026,
  tags: ['ambient', 'drone'],
  description:
    'Slow notes drifting in D Phrygian. Sine-based poly pad through a long reverb.',

  audio: ({ tone, rng, initialTick, dispose }) => {
    const reverb = new tone.Reverb({ decay: 12, wet: 0.6 }).toDestination()
    const synth = new tone.PolySynth(tone.Synth, {
      oscillator: { type: 'sine' },
      envelope: { attack: 2, decay: 1, sustain: 0.6, release: 6 },
    }).connect(reverb)
    synth.volume.value = -14

    const notes = ['D3', 'Eb3', 'F3', 'G3', 'A3', 'Bb3', 'C4', 'D4', 'F4']
    const interval = tone.Time('2m').toSeconds()

    let tick = initialTick(interval)
    tone.getTransport().scheduleRepeat((time) => {
      const note = rng.pick(notes, tick, 0)
      const dur = rng.range(2, 6, tick, 1)
      synth.triggerAttackRelease(note, dur, time)
      if (rng.at(tick, 2) > 0.55) {
        const harmony = rng.pick(notes, tick, 3)
        synth.triggerAttackRelease(harmony, dur * 0.8, time + 0.3)
      }
      tick++
    }, interval)

    dispose(() => {
      synth.dispose()
      reverb.dispose()
    })
  },
}

export default stillWater