leach.studio
← back

Morning Bells

Sparse FM bell plucks over A major pentatonic. Delays and a wash of reverb.

seed
morning-bells-preview
by
stuart
year
2026
tags
bells · arpeggiated · bright

source

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

const morningBells: Patch = {
  id: 'morning-bells',
  title: 'Morning Bells',
  author: 'stuart',
  year: 2026,
  tags: ['bells', 'arpeggiated', 'bright'],
  description:
    'Sparse FM bell plucks over A major pentatonic. Delays and a wash of reverb.',

  audio: ({ tone, rng, initialTick, dispose }) => {
    const reverb = new tone.Reverb({ decay: 8, wet: 0.45 }).toDestination()
    const delay = new tone.FeedbackDelay({
      delayTime: '8n.',
      feedback: 0.35,
      wet: 0.35,
    }).connect(reverb)
    const synth = new tone.PolySynth(tone.FMSynth, {
      harmonicity: 3,
      modulationIndex: 6,
      envelope: { attack: 0.01, decay: 0.4, sustain: 0, release: 2 },
    }).connect(delay)
    synth.volume.value = -18

    const notes = ['A4', 'B4', 'C#5', 'E5', 'F#5', 'A5', 'B5', 'E6']
    const interval = tone.Time('4n').toSeconds()

    let tick = initialTick(interval)
    tone.getTransport().scheduleRepeat((time) => {
      if (rng.at(tick, 0) > 0.6) {
        const note = rng.pick(notes, tick, 1)
        synth.triggerAttackRelease(note, '8n', time)
      }
      tick++
    }, interval)

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

export default morningBells