Skip to content

Instantly share code, notes, and snippets.

@neopunisher
Created December 3, 2025 19:02
Show Gist options
  • Select an option

  • Save neopunisher/0705fdcf88c11635f1eb2cb96d2b2b8b to your computer and use it in GitHub Desktop.

Select an option

Save neopunisher/0705fdcf88c11635f1eb2cb96d2b2b8b to your computer and use it in GitHub Desktop.
// "Euphoric Trance Journey"
// Inspired by Switch Angel's style
// 138 BPM classic trance vibes
setcps(138/60/4) // 138 BPM trance tempo
// Define trance chord progression (i-VI-III-VII in A minor)
let chords = "<Am F C G>"
stack(
// ===== KICK DRUM =====
// Classic 4-on-the-floor trance kick with slight variations
s("bd:3*4")
.gain(1.2)
.lpf(200) // Low-pass to keep it punchy
.room(0.05),
// ===== BASS LINE =====
// Driving trance bassline that follows the chord progression
// Classic rolling 16th note pattern
note("<a2 f2 c2 g2>*16")
.s("sawtooth")
.lpf(sine.range(400, 800).slow(4)) // Sweeping low-pass filter
.gain(0.7)
.cutoff(perlin.range(0.3, 0.6)) // Add movement
.decay(0.15),
// ===== ARPEGGIO LEAD =====
// Uplifting 16th note arpeggio (trance signature sound)
note(chords)
.chord("m7") // Minor 7th chords for that emotional trance feel
.arpWith("{0 2 4 2 0 4 2 4}%8")
.struct("1*16") // 16th notes
.add(12) // Up an octave
.s("square")
.lpf(sine.range(2000, 4000).slow(8)) // Classic trance filter sweep
.lpq(10) // High resonance
.room(0.3)
.size(3)
.gain(0.4)
.delay(0.5)
.delaytime(0.375)
.delayfeedback(0.3),
// ===== PAD =====
// Lush atmospheric pad to fill out the sound
note(chords)
.chord("M9") // Major 9th for warmth
.voicing()
.s("sawtooth")
.lpf(1200)
.attack(1.5) // Slow attack for pad
.release(2)
.room(0.8)
.size(4)
.gain(0.25)
.slow(2), // Evolves slower than other elements
// ===== PLUCK MELODY =====
// Euphoric lead melody that enters mid-section
note("<[a4 c5 e5 a5] [f4 a4 c5 f5] [c4 e4 g4 c5] [g4 b4 d5 g5]>")
.s("triangle")
.lpf(3000)
.attack(0.01)
.decay(0.3)
.sustain(0.1)
.gain(0.5)
.delay(0.5)
.delaytime(0.25)
.room(0.4)
.sometimes(rev), // Occasionally reverse for variation
// ===== HI-HATS =====
// Open and closed hi-hats for groove
s("[~ hh:0]*4") // Closed hats on offbeats
.gain(0.5)
.hpf(8000), // High-pass to keep them crispy
s("hh:1*2") // Open hats for emphasis
.gain(0.3)
.every(4, fast(2)), // Variation every 4 bars
// ===== CRASH CYMBAL =====
// Crash on downbeat for energy
s("cr:2")
.gain(0.6)
.room(0.6)
.hpf(4000),
// ===== SNARE/CLAP =====
// Snare on 2 and 4 for that dance floor energy
s("~ sd:4 ~ sd:4")
.gain(0.9)
.room(0.2),
// ===== RIDE CYMBAL =====
// Subtle ride pattern for movement
s("~ ~ ~ [~ rid:0]")
.gain(0.25)
.hpf(6000)
.sometimes(ply(2)), // Double-hit sometimes
// ===== NOISE RISER =====
// White noise sweep for builds (classic trance element)
s("~").rarely(s("wind"))
.lpf(sine.range(200, 8000).slow(4))
.hpf(sine.range(100, 2000).slow(4))
.gain(0.3)
.room(0.5)
)
// Global effects for that big trance sound
.room(0.2) // Overall reverb
.delay(0.1) // Subtle delay
.shape(0.3) // Light distortion for warmth
// --- SWITCH ANGEL TRANCE (FIXED) --- //
// 1. Tempo: 138 BPM
setcps(138/60/4)
// 2. The Mix
// I had to set the $stuff to make it play
$stuff: stack(
// -- KICK --
// Standard Trance Kick (4 on the floor)
s("bd:8*4")
.bank("RolandTR909") // Use the classic 909 kit
.gain(1.2)
.shape(0.6), // Add distortion
// -- ROLLING BASS --
// The "gallop" rhythm typical of Switch Angel
note("~ g1 ~ g1 ~ g1 ~ g1")
.s("superdough") // The best trance synth in Strudel
.cutoff(600) // Darker sound
.resonance(5)
.gain(0.9),
// -- ACID LEAD --
// Fast 16th notes with a moving filter
note("g2 bb2 d3 g3 f3 eb3 d3 bb2".fast(2))
.s("sawtooth")
.lpf(sine.range(400, 3000).slow(8)) // Filter opens and closes slowly
.lpq(8) // High Resonance for "squelch"
.delay(0.5).delaytime(0.25) // Echo
.gain(0.6),
// -- SUPERSAW PADS --
// Big chords in the background
chord("<Gm Eb Bb F>")
.s("superdough")
.attack(0.5).release(1)
.lpf(2000)
.gain(0.5)
.room(1).size(0.9) // Massive Reverb
)
// Inspired by Switch Angel's livecoding trance vibes in Strudel!
// Elements: Pulsating sub bass, acid synth lines, supersaw chords, driving 4/4 drums,
// and ethereal pads for that uplifting, mind-melting trance feel.
// Key: G minor (like her "Coding Trance" nod), tempo 138 BPM.
// Structure: Intro build -> Main drop with arps -> Breakdown -> Outro fade.
// Paste this into https://strudel.cc/ and hit play! Tweak as you like.
// Set tempo to classic trance speed
setcps(138/60);
// Load Dirt samples for drums (standard pack)
samples('github:tidalcycles/dirt-samples');
// Main stack: Drums + Bass + Acid + Chords + Pads + Arp
stack(
// Drums: Classic 4/4 kick, open hats on offbeats, claps/snare on 2&4
s("bd*4, [~ cp]2*2, hh*16")
.speed("[0.8 1.2]*4") // Slight variation in kick punch
.gain(0.8)
.room(0.2) // Subtle reverb for space
,
// Sub bass: Deep, pulsating G minor root notes with sidechain feel
note("g1*4")
.s("sawtooth")
.lpf(100) // Low-pass filter for sub rumble
.gain(perlin.range(0.6, 0.9)) // Breathing amplitude
.superimpose(x => x.offset(0.25).gain(0.7)) // Layered pulse
,
// Acid line: TB-303 style squelch, inspired by Switch Angel's acid envelopes
// Fast 16th notes, modulating cutoff for that wobble
note("g2 a2 bb2 c3 g3 f3 eb3 d3".fast(4))
.s("tb303") // Use built-in acid synth if available, or square
.cutoff(sine.range(400, 4000).fast(8)) // Sweeping filter
.resonance(0.7)
.gain(0.6)
.degradeBy(0.2) // Occasional drops for glitchy fun
,
// Supersaw chords: Uplifting G minor progressions, lairy trance stabs
// Chords: Gm -> Bb -> Eb -> F, held for 1 bar each, with detune
chord("<Gm Bb Eb F>*4")
.s("supersaw")
.attack(0.1).release(0.8) // Soft envelope for pads
.detune(0.05) // Chorus-like spread
.gain(0.5)
.hpf(200) // High-pass to sit above bass
,
// Arp melody: Fast ascending/descending runs for energy, Switch Angel flair
note("g3 bb3 d4 g4 f4 d4 bb3 g3".euclid(5,8).fast(2))
.s("triangle")
.delay(0.3) // Echo for trance trails
.delaytime(0.125)
.gain(0.4)
.off(1/16, x => x.add(rand.range(-0.05, 0.05))) // Micro pitch wobble
,
// Ethereal pads: Slow, atmospheric layer for build-ups
note("g2 bb2 d3 f3".slow(2))
.s("sawtooth")
.orbit(2) // Spread across stereo
.lpf(sine.range(300, 2000).slow(4))
.gain(0.3)
.room(0.5).size(0.8) // Big reverb hall
).slow(16) // Overall cycle length for 16-bar feel
// To evolve it live: Add .sometimes(x => x.rev()) to arps for breakdowns,
// or .fadeIn(8).fadeOut(8) for smooth intro/outro.
// Fixed version: Swapped tb303 for square wave with acid-style envelope and filter sweep.
// Strudel doesn't have a built-in tb303 sampler, so we emulate the acid squelch using
// square synth + cutoff modulation + decay envelope. Should sound closer to classic 303.
// Kept the rest intact for that Switch Angel-inspired trance flow.
// Paste into https://strudel.cc/ and play—let me know how the acid bites now!
// Set tempo to classic trance speed
setcps(138/60);
// Load Dirt samples for drums (standard pack)
samples('github:tidalcycles/dirt-samples');
// Main stack: Drums + Bass + Acid + Chords + Pads + Arp
stack(
// Drums: Classic 4/4 kick, open hats on offbeats, claps/snare on 2&4
s("bd*4, [~ cp]2*2, hh*16")
.speed("[0.8 1.2]*4") // Slight variation in kick punch
.gain(0.8)
.room(0.2) // Subtle reverb for space
,
// Sub bass: Deep, pulsating G minor root notes with sidechain feel
note("g1*4")
.s("sawtooth")
.lpf(100) // Low-pass filter for sub rumble
.gain(perlin.range(0.6, 0.9)) // Breathing amplitude
.superimpose(x => x.offset(0.25).gain(0.7)) // Layered pulse
,
// Acid line: Emulated TB-303 squelch with square wave, fast 16th notes, modulating cutoff
// Fixed: Use 'square' synth (built-in), add decay for envelope punch
note("g2 a2 bb2 c3 g3 f3 eb3 d3".fast(4))
.s("square")
.cutoff(sine.range(400, 4000).fast(8)) // Sweeping filter for wobble
.resonance(0.7)
.decay(0.2) // Short decay for 303-like plucks
.gain(0.6)
.degradeBy(0.2) // Occasional drops for glitchy fun
,
// Supersaw chords: Uplifting G minor progressions, lairy trance stabs
// Chords: Gm -> Bb -> Eb -> F, held for 1 bar each, with detune
// Fixed: Use 'sawtooth' as base for supersaw emulation (multiple layers)
chord("<Gm Bb Eb F>*4")
.s("sawtooth")
.attack(0.1).release(0.8) // Soft envelope for pads
.detune(0.05) // Chorus-like spread
.gain(0.5)
.hpf(200) // High-pass to sit above bass
.superimpose(x => x.detune(0.02).gain(0.8)) // Layer for thicker supersaw
,
// Arp melody: Fast ascending/descending runs for energy, Switch Angel flair
// Fixed: Use 'add' instead of arithmetic on pattern for pitch wobble
note("g3 bb3 d4 g4 f4 d4 bb3 g3".euclid(5,8).fast(2))
.s("triangle")
.delay(0.3) // Echo for trance trails
.delaytime(0.125)
.gain(0.4)
.off(1/16, x => x.add(rand.range(-0.05, 0.05))) // Micro pitch wobble (now safe)
,
// Ethereal pads: Slow, atmospheric layer for build-ups
note("g2 bb2 d3 f3".slow(2))
.s("sawtooth")
.orbit(2) // Spread across stereo
.lpf(sine.range(300, 2000).slow(4))
.gain(0.3)
.room(0.5).size(0.8) // Big reverb hall
).slow(16) // Overall cycle length for 16-bar feel
// Pro tip: If you want real 303 samples, try loading a custom pack like:
// samples('github:tedthetrumpet/303-samples') — but stick to basics for now.
// For more supersaw, experiment with .n(5) on sawtooth for unison.
// Evolve live: .sometimes(x => x.rev()) on arps for breakdowns.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment