// Load standard drum samples samples('github:tidalcycles/dirt-samples'); // Base patterns for reuse across sections const kick = s("bd").struct("x@4").gain("0.85").lpf(110).room(0.3).rsize(1.5); const clap = s("cp").struct("~ x ~ x").gain("0.55").lpf(250).delay(0.2).delaytime(0.25).delayfeedback(0.6).vowel("u"); const hats = s("hh").struct("~ x ~ [x x]").gain("0.45").lpf(350).pan("<0.4 0.6>").speed("1.1").sometimesBy(0.2, x => x.gain("0.6")); const subBass = n("0 2 [3 1] 0").scale("C:minor").s("sine").lpf(90).lpenv(1).lpq(1).gain(saw.range(0.4, 0.7)).octave(1); // Sidechain to kick const bass = n("0 3 [2 4] 1").scale("C:minor").s("sawtooth").lpf(200).lpenv(1.5).lpq(1).gain("0.65").octave(2).bpf(150).bpq(0.5); // Notch at kick freq const chords = chord("").voicing().s("sawtooth").lpf(450).lpenv(3).release(0.35).delay(0.25).delaytime(0.2).octave(3).gain("0.45"); const pad = n("0 2 4").scale("C:minor").s("sine").lpf(350).gain("0.25").octave(3).slow(3).room(0.5); const fx = s("bytebeat").bbexpr('t*(t>>10^t>>6)').bbst(8000).gain("0.2").lpf(300).room(0.6).pan(brand); // Song structure with sections arrange( // Intro (8 cycles / ~16s): dark, sub-heavy start [8, stack( pad.gain("0.3").noise(0.05), // Reduced noise subBass.gain("0.3").lpf(80).every(4, x => x.gain("0.5")), // Softer sub-bass fx.slow(4).gain("0.15"), // Subtle FX hats.gain("0").every(4, x => x.gain("0.25").lpf(250)) // Muted hats )], // Buildup (8 cycles / ~16s): add drums, bass, and filter sweep [8, stack( kick.gain("0.65").lpf(sine.range(90, 130)), // Softer, filtered kick clap.gain("0.45").every(2, x => x.vowel("o")), hats, subBass.gain("0.5"), bass.lpf(sine.range(180, 250)).gain("0.55"), // Smoother filter sweep pad, chords.gain("0").every(4, x => x.gain(saw.range(0.15, 0.35))) // Subtle chord fade )], // Main Groove (16 cycles / ~32s): full, clean groove [16, stack( kick, clap, hats, subBass, bass, chords.gain(saw.range(0.25, 0.5)), // Gentle sidechain pad.leslie(0.3).lrate(0.5), // Subtle Leslie fx.slow(2).every(4, x => x.gain("0.25").lpf(350)) // Controlled FX )], // Breakdown (8 cycles / ~16s): minimal, atmospheric [8, stack( kick.gain("0.35").lpf(80), // Muffled, clean kick clap.degradeBy(0.5).gain("0.35").room(0.6), hats.gain("0.25").lpf(sine.range(250, 400)).speed("1.4"), subBass.gain("0.6").vib(0.5).vibmod(0.2), chords.gain("0.4").lpf(sine.range(400, 550)).phaser(0.8).phaserdepth(0.6), // Softer phaser pad.gain("0.35").noise(0.07), fx.slow(3).gain("0.2") )], // Outro (8 cycles / ~16s): fade out, sub-bass focus [8, stack( kick.gain(saw.range(0.5, 0)), clap.gain("0.25").delay(0.3).delaytime(0.3), hats.gain("0.25").lpf(saw.range(350, 150)), subBass.gain("0.5").lpf(80), bass.gain("0.35").lpf(180), chords.gain("0.25").release(0.5).lpf(400), pad.gain("0.25").slow(4).noise(0.05), fx.gain(saw.range(0.2, 0)) )] ) .cpm(60) // 120 BPM .room(0.25).roomsize(1.5) // Reduced reverb .compressor("-35:8:5:0.01:0.1") // More headroom .pianoroll({ labels: 1, cycles: 8, autorange: true, background: "#111111", active: "#cc0000", inactive: "#444444" })