Strudelify

The Downward Spiral

Nine Inch Nails

KeyC majorTempo60 bpm
0:00/0:00
// The Downward Spiral — Nine Inch Nails
// 60 bpm, 4/4, key C major. Source: midi.
// Generated by strudelify. One cycle = one bar.
// note: Full arrangement: all 55 bars on a 32-step grid, each part at one level. Source detail keeps the original performance.
setcpm(60/4)

// Notation: c3@3 lasts 3 steps · ~ is a rest · [c3,e3] is a chord · "a, b" plays two voices at once · [...]/2 spreads a riff over 2 bars.
// A part's distinct bars are riffs (A, B, C...) played in order: edit a riff to change every repeat.

// chords · acoustic guitar steel · "Acoustic Guitar"
const acoustic_guitar_steel = note("<~@8 A B@4 C@4 D@8 ~@3 E F G H E I J K A L@4 M@4 N@4 O@4 ~@2>".pickRestart({
  A: "~@8 a#3@23 ~, c4",
  B: "[~@40 f3@23 ~ d#3@4 ~@9 e3@4 ~@23 a#3@23 ~, a#3@32 g3@37 ~@3 d3@31 ~@25, ~@8 a3@40 ~@20 d#3@12 ~ e3@41 ~@6, ~@3 c4]/4",
  C: "[~@40 f3@23 ~ d#3@4 ~@9 e3@4 ~@23 a#3@23 ~, a#3@32 g3@37 ~@3 d3@31 ~@25, ~@8 a3@40 ~@20 d#3@12 ~ e3@38 ~@9, ~@3 c4]/4",
  D: "[~@40 f3@23 ~ d#3@4 ~@9 e3@4 ~@24 a#3@23 ~@40 f3@23 ~ d#3@4 ~@9 e3@4 e3@47, a#3@32 g3@37 ~@3 d3@31 ~@25 a#3@32 ~ g3@37 ~@3 d3@31 ~@24, ~@8 a3@40 ~@20 d#3@12 ~ e3@55 ~@61 d#3@12 ~@47, ~@97 c4@32 ~@8 a3@40 ~@79]/8",
  E: "~ f#2@4 [f#2,e3,a#3]@4 [f#2,e3,a#3]@4 [f#2,e3,a#3]@4 [f#2,e3,a#3]@4 [f#2,e3,a#3]@4 f#2@4 f#2@3, [e3,a#3] ~@7", // F#7 Edim
  F: "~ [f#2,d#3,a3]@4 [f#2,d#3,a3]@4 [f#2,d#3,a3]@4 [f#2,d#3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24, ~@9 a3@40 ~@20 d#3@12 e3@40 ~@7, ~@97 c4@31]/4",
  O: "[~@40 f3@23 ~ d#3@4 ~@9 e3@4 e3@40 ~@7, a#3@32 ~ g3@37 ~@3 d3@31 ~@24, ~@9 a3@40 ~@20 d#3@12 ~@47]/4",
})).s("gm_acoustic_guitar_steel").gain(0.64)

// bass · electric bass finger · "Bass Guitar"
const bass = note("<~@36 [c2@6 c2@3 c2@3 c2@3 d2@3 c2@3 c2@3 d#2@3 d2@3 c#2@2]!16 ~@3>")
  .s("gm_electric_bass_finger").gain(0.64)

// chords · brass section · "Toilet Flush 1" · Bm Cmaj7 Bm Cmaj7 Bm Cmaj7 Bm
const brass_section = note(`<
  [[b-1,c0,d0]@4 [b-1,c0,d0]@4 [b-1,c0,d0]@4 [b-1,c0,d0]@3 ~ [b-1,c0,d0]@4 [b-1,c0,d0]@3 ~ [b-1,c0,d0]@4 [b-1,c0,d0]@4]!6
  [~ d0@3 ~ d0@3 [b-1,c0,d0]@4 ~ d0@3 [b-1,c0,d0]@4 ~ d0@3 ~ d0@3 ~ d0@3, [b-1,c0]@4 [b-1,c0]@4 ~@4 [b-1,c0]@3 ~@5 [b-1,c0]@3 ~ [b-1,c0]@4 [b-1,c0]@3 ~]
  [[b-1,c0,d0]@4 [b-1,c0,d0]@4 [b-1,c0,d0]@4 [b-1,c0,d0]@3 ~ [b-1,c0,d0]@4 [b-1,c0,d0]@3 ~ [b-1,c0,d0]@4 [b-1,c0,d0]@4]!7
  [~ d0@3 ~ d0@3 [b-1,c0,d0]@4 ~ d0@3 [b-1,c0,d0]@4 ~ d0@3 ~ d0@3 ~ d0@3, [b-1,c0]@4 [b-1,c0]@4 ~@4 [b-1,c0]@3 ~@5 [b-1,c0]@3 ~ [b-1,c0]@4 [b-1,c0]@3 ~]
  [[b-1,c0,d0]@4 [b-1,c0,d0]@4 [b-1,c0,d0]@4 [b-1,c0,d0]@3 ~ [b-1,c0,d0]@4 [b-1,c0,d0]@3 ~ [b-1,c0,d0]@4 [b-1,c0,d0]@4]!7
  [~ d0@3 ~ d0@3 [b-1,c0,d0]@4 ~ d0@3 [b-1,c0,d0]@4 ~ d0@3 ~ d0@3 ~ d0@3, [b-1,c0]@4 [b-1,c0]@4 ~@4 [b-1,c0]@3 ~@5 [b-1,c0]@3 ~ [b-1,c0]@4 [b-1,c0]@3 ~]
  [[b-1,c0,d0]@4 [b-1,c0,d0]@4 [b-1,c0,d0]@4 [b-1,c0,d0]@3 ~ [b-1,c0,d0]@4 [b-1,c0,d0]@3 ~ [b-1,c0,d0]@4 [b-1,c0,d0]@4]!5
  ~@27
>`).s("gm_brass_section").gain(0.64)

// chords · muted trumpet · "Toilet Flush 2"
const muted_trumpet = note("<A@2 B C D E F@22 G@2 ~@25>".pickRestart({
  A: "[[b-1,c0]@2 ~@6 [b-1,c0]!2 ~@2 [a-1,b-1,c0,d0]@2 ~@2, ~ [g#-1,d#0]@2 ~]/2", // Cmaj7 D7 G#5
  B: "~ [a-1,b-1,d0]@8 ~@8 [a-1,b-1,d0]@8 ~@7, c0 ~ c0 ~", C: "~ [a-1,b-1,d0]@8 ~@23, c0 ~@3", D: "[a-1,b-1,c0,d0]!4",
  E: "~ [a-1,b-1,d0]@8 [a-1,b-1,c0,d0]@8 [a-1,b-1,c0,d0]@8 [a-1,b-1,c0,d0]@7, [d-1,a0], c0 ~@3", // Bm7 D7 D5
  F: "[~@5 [g-1,e0] [f-1,a-1,d0,f0] [g-1,e0], [e-1,f-1,g0] ~, ~ [a-1,d0]@4 ~@3, ~@3 [b-1,c0]@4 ~]/2", // C Dm C Em D5 Cmaj7
  G: "[~@3 [b-1,c0]@4 ~, [e-1,f-1,g0] ~, ~ [a-1,d0]@4 ~@3]/2", // Cmaj7 Em D5
})).s("gm_muted_trumpet").gain(0.64)

// drums · kick
const kick = s("bd").struct("<~@36 [~ x ~@5 x ~@2 x ~@8 x ~@2 x ~@2 x ~@6]!16 ~@3>").gain(0.64)

// drums · snare
const snare = s("sd").struct("<~@36 A@2 B A@3 B A@3 B A@3 B A ~@3>".pickRestart({
  A: "~@13 x ~@13 x ~@2 x ~", B: "~@13 x ~@14 x ~@2 x",
})).gain(0.64)

// drums · open hat
const open_hat = s("oh").struct("<~@40 A@2 B A ~@7 C D E ~>".pickRestart({
  A: "~@13 x ~@13 x ~@4", B: "~@13 x ~@14 x ~@3", C: "~@27 x ~@2 x ~",
  D: "~ x ~@3 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2", E: "x",
})).gain(0.64)

// drums · crash
const crash = s("cr").struct("<~@44 A@2 B A@3 B A C D ~>".pickRestart({
  A: "~@13 x ~@13 x ~@2 x ~", B: "~@13 x ~@14 x ~@2 x",
  C: "~ x ~@3 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2", D: "x",
})).gain(0.64)

stack(acoustic_guitar_steel, bass, brass_section, muted_trumpet, kick, snare, open_hat, crash)

More by Nine Inch Nails