Skip to content

Instantly share code, notes, and snippets.

@DiegoVallejoDev
Created May 14, 2026 05:22
Show Gist options
  • Select an option

  • Save DiegoVallejoDev/771423cae5557eff81828d8b86d45b4d to your computer and use it in GitHub Desktop.

Select an option

Save DiegoVallejoDev/771423cae5557eff81828d8b86d45b4d to your computer and use it in GitHub Desktop.
Futurama intro strudel
const loop_length = 30;
const drB = stack("bd ~ sd ~ bd [sd bd] sd ~", "hh hh hh hh hh hh hh ho").gain(0.7);
const drum_matrix = [
s("[hh bd] hh hh hh hh hh hh hh").gain(0.7),
s("sd*16").gain(sine.range(0.14, 0.7)),
...Array(6).fill(drB),
stack("bd ~ sd ~ bd bd sd ~", "hh hh hh hh ho ~ ho ~").gain(0.7),
s("~"),
s("sd*8 ho*2").gain(sine.range(0.28, 0.7)),
...Array(14).fill(drB),
s("sd*16").gain(isaw.range(0.14, 0.7)),
stack("bd ~ sd ~ bd [sd bd] sd ~", "ho ~ ho ~ ho ~ ho ~").gain(0.7),
s("[bd crash] ~ bd ~ bd ~ ~ ~").gain(0.7),
s("[bd crash] ~ ~ ~ ~ ~ ~ ~").gain(0.7),
s("~")
];
const bs_A = "[a1@1.5 a1@0.5 d2 d2]";
const bs_B = "[b1@1.5 b1@0.5 d2@0.5 d2@0.5 e2]";
const bs_C = "[b1@1.5 b1@0.5 g1@0.5 g1@0.5 fs1]";
const bs_D = "[b1@1.5 b1@0.5 g1@0.5 g1@0.5 [fs1 fs1]]";
const bass_matrix = [
"~", "~",
bs_A, bs_B, bs_A, bs_C, bs_A, bs_B, bs_A, bs_D,
bs_A, bs_B, bs_A, bs_C, bs_A, bs_B, bs_A, bs_D,
bs_A, bs_B, bs_A, bs_C, bs_A, bs_B, bs_A, bs_D,
"[e1 [a1 b1] d2 [e1 a1 b1]]", "[e1 ~ b1 [d2 d2 d2]]", "[~ a1 e1 ~]", "~"
];
const bell_matrix = [
"[e4@1.5 e4@0.5 a4 gs4]", "[d4@1.5 d4@0.5 fs4 e4]", "[e4@1.5 e4@0.5 a4 a4]", "[d4@1.5 d4@0.5 e4 e4]",
"[e4@1.5 e4@0.5 a4 a4]", "[d4@1.5 d4@0.5 [d4 d4] cs4]", "[e4@1.5 e4@0.5 a4 gs4]", "[d4@1.5 d4@0.5 fs4 e4]",
"[e4@1.5 e4@0.5 a4 gs4]", ...Array(9).fill("~"),
"[e4@1.5 e4@0.5 a4 a4]", "[d4@1.5 d4@0.5 e4 e4]", "[e4@1.5 e4@0.5 a4 a4]", "[d4@1.5 d4@0.5 [d4 d4] cs4]",
"[e4@1.5 e4@0.5 a4 gs4]", "[d4@1.5 d4@0.5 fs4 e4]", "[e4@1.5 e4@0.5 a4 gs4]", "[b4@1.5 fs4@0.5 [d4 d4] [cs4 cs4]]",
...Array(4).fill("~")
];
const gA = note("e3 e3 a3 gs3 d3 d3 fs3 e3");
const gB = note("e3 e3 a3 gs3 [b3 b3] [g3 g3] [fs3 fs3] ~");
const gL1 = note("fs4 fs4 b4 b4 e4 e4 a4 a4");
const gL2 = note("fs4 fs4 [b4 as4] e4 e4 [a4 gs4] ~");
const guitar_matrix = [
note("~"), note("~"),
gA, gB, gA, gB, gA, gB, gA, gB,
gL1, gL2, gL1, gL2, gL1, gL2, gL1, gL2,
gA, gB, gA, gB, gA, gB, gA, gB,
note("~"), note("~"), note("~"), note("~")
];
stack(
cat(...drum_matrix).bank("RolandTR909"),
note(cat(...bass_matrix)).s("sawtooth").lpf(800).lpq(2).gain(0.45),
note(cat(...bell_matrix)).s("triangle").decay(0.6).sustain(0).delay(0.3).room(0.7).gain(0.8),
cat(...guitar_matrix).s("square").crush(4).gain(0.2).room(0.4).delay(0.2)
).slow(loop_length).cpm(900)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment