Velocity
Strongly based off of tutorials from @Switch-Angel. Cool stuff. This sounds likea techo song I might jump rope or go jogging to. High energy.
setcpm(136/4)
// registers a custom function called acidenv
// creates a classic acid house filter envelope effect
register('acidenv', (x, pat) => pat.lpf(100)
.lpenv(x * 9).lps(.2).lpd(.12)
)
// main melody with pattern AND sound variation
$: n("<<0 4 0 9 7> <0 4 0 9 7> <0 7 4 11 9> <0 4 0 9 7>>*16").scale("g:minor").trans(-12)
.octave(3)
.s("<sawtooth z_sawtooth triangle sawtooth>".slow(4))
.acidenv(slider(0.295))
.lpf("<1500 1500 2500 1500>".slow(4)) // NEW: Filter opens on 3rd
.gain("<0.7 0.7 0.8 0.7>".slow(4))
._pianoroll()
// Counter-melody - plays ONLY when bass is quiet (every 3rd cycle)
$: n("<<~ ~ <7 9 11 9>*8 ~> <~ ~ <[7 11] [9 14] [11 14] [9 11]>*4 ~> <~ ~ <7 9 11 14 11 9>*6 ~>>").scale("g:minor").trans(-12)
.octave(4)
.s("<triangle triangle gm_bassoon>".slow(4))
.lpf("<2000 2500 2200>".slow(4))
.gain("<0.5 0.45 0.5>".slow(4))
._pianoroll()
// Base Loop - NEW: octave jump on 4th
$: n("<0>*16").scale("g:minor").trans(-24)
.octave("<3 3 3 4>".slow(4)) // NEW: Jump up
.s("supersaw")
.acidenv(slider(0.864))
.gain("<0.4 0.4 0.4 0.5>".slow(4)) // NEW: Louder on jump
._pianoroll()
// Kick
$: s("<bd:2!4 bd:2!4 [bd:2 bd:2 ~ bd:2 bd:2] [bd:2*2 ~ bd:2 bd:2]>")
// NEW: Crash on transitions
$: s("<~!7 crash:2>").gain(0.5)
// Add snare/clap variation
$: s("~ cp:2 ~ <cp:2 [cp:2 cp:2]>").gain(0.3)
// Hi-hat pattern changes
$: s("hh:3*8").gain("<<0.3 0.6 0.4 0.7> <0.3 0.6 0.3 0.6>>")