Strudelify

Oh Middernacht

Flair

KeyD majorTempo144 bpm
0:00/0:00
// Oh Middernacht — Flair
// 144 bpm, 4/4, key D major. Source: midi.
// Generated by strudelify. One cycle = one bar.
// note: pitch bends are ignored
// note: Full arrangement: all 125 bars on a 16-step grid, each part at one level; ghost notes are separate "_soft" parts. Source detail keeps the original performance.
setcpm(144/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.

// bass · synth bass 2 · "Synth.Bas"
const bass = note(`<
  ~@19 A@2 B@2 C@2 B@2 A@2 B@2 C@2 B@2 A@2 B@2 C@2 B@2 A@2 B@2 C@2 B@2 A@2 B@2 C@2 B@2 A@2 B@2 C@2 B@2 A@2 B@2 C@2 B@2
  A@2 B@2 C@2 B@2 A@2 B@2 C@2 B@2 A@2 B@2 C@2 B@2 A@2 B@2 C@2 B@2 ~@8 A@2 B@2 C D ~@3 E
>`.pickRestart({
  A: "g1 ~ g1!3 ~ g1!3 ~ g1!3 ~ g1!2", B: "d2 ~ d2!3 ~ d2!3 ~ d2!3 ~ d2!2", C: "a1 ~ a1!3 ~ a1!3 ~ a1!3 ~ a1!2",
  D: "a1@3 ~", E: "d2 ~@7",
})).s("gm_synth_bass_2").gain(0.48)

// other · distortion guitar · "#Feedb.Gt"
const distortion_guitar = note("<~@73 A@2 B C@2 D@3 E@2 ~@8 F G H I J K L@2 B M@2 N ~@10 A@2 B C@2 N ~@6>".pickRestart({
  A: "[~@2 d6 ~@3 a5@2 ~@2 e5 [c#5,d5,d#5] [a#4,b4,c5] a4 ~@6 c6@12, ~@7 e5@9]/2", B: "~ d5 b4 a4",
  C: "[g4@19 ~ a4@4 f#4@4 e4@4]/2", D: "[~@7 f#3@2 a3@2 b3 ~ g4 b3 b3@2 a3@2 f#3 a3@4, d4@4 ~@2 b3 ~@5]/3",
  E: "[~@3 c5 e4 d4 b3 d4@9, ~ e4@3 ~@12]/2", F: "~@3 a4@2 c5 a4@2", G: "g4", H: "~@3 e4@2 g4 e4@2", I: "d4@7 ~",
  J: "~@6 b4@4 g5@2 b4@3 a4", K: "b4 a4@6 ~", L: "[~@4 e4@2 c5@2 e4@2 d4@2 b3@2 d4@15 ~@3]/2", M: "[g4@5 a4 f#4 e4]/2",
  N: "d4",
})).s("gm_distortion_guitar").gain(0.33).pan(0.6)

// other · distortion guitar · "#Feedb.Gt" · soft notes · G#maj7 Dmaj7 G#maj7 Dmaj7
const distortion_guitar_soft = note(`<
  ~@73
  [~@13 [g4,g#4] [d#4,e4,f4,f#4] [c#4,d4]]
  ~@39
  [~@13 [g4,g#4] [d#4,e4,f4,f#4] [c#4,d4]]
  ~@11
>`).s("gm_distortion_guitar").gain(0.14).pan(0.6)

// chords · string ensemble 1 · "#St.Strin"
const string_ensemble_1 = note(`<
  ~ A@2 B@4 C@4 D@4 C@4 ~@48 E@2 F@2 G@2 F@2 E@2 F@2 G@2 F@2 ~@16 H@6 I@2 ~@8 J@2 K@2 L@2 M N M ~
>`.pickRestart({
  A: "[d4,f#4,a4]/2", B: "[d4,g4,b4]/4", C: "[d4,f#4,a4]/4", D: "[a3,c#4,e4,a4]/4", E: "[b4,d5,g5,g6]/2",
  F: "[a4,d5,f#5,f#6]/2", G: "[a4,c#5,e5,e6]/2", H: "[[g3,b3]@16 f#3@15 ~ [e3,c#4]@16, d3@21 ~@11, ~@32 a3@63 ~]/6",
  I: "[f#3,a3,d4]/2", J: "[b3,d4,g4,g6]/2", K: "[a3,d4,f#4,f#6]/2", L: "[[a3,c#4,e4], e6@15 ~@17]/2",
  M: "[d3,a3,d4,f#4]", N: "[g2,b3,d4,g4]",
})).s("gm_string_ensemble_1").gain(0.14)

// other · lead 2 sawtooth · "#Dctr.Sol"
const lead_2_sawtooth = note(`<
  ~@19 A@2 B@2 C@2 B@2 A@2 B@2 C@2 B@2 A@2 B@2 C@2 B@2 D@2 E@2 F@2 E@2 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 a5 ~",
})).s("gm_harpsichord").gain(0.25).pan(0.3)

// drums · kick
const kick = s("bd").struct(`<
  ~@19 A@3 B A@3 B A@3 B A@3 B A@3 B A@3 C A@3 B A@3 B A@3 B A@3 C A@3 B A@3 B A@3 B A@3 B A@3 B A@3 B A@3 B A@3 B A@3 B
  A@3 C A@3 B A@3 B A@3 B A@3 C A@3 C A D ~@3 D
>`.pickRestart({
  A: "x!4", B: "x ~ x ~ x ~ x!2", C: "x ~@2 x ~@2 x ~@2 x!2 ~ x ~@3", D: "x",
})).gain(0.57)

// drums · snare
const snare = s("sd").struct(`<
  ~@18 A B@2 C D B@3 E B@2 C D B@3 E B@2 C D B@3 F ~@2 G H ~@4 B@2 C D B@3 E B@2 C D B@3 E B@2 C D B@3 E B@2 C D B@3 I
  ~@2 G H ~@4 B@2 C D B@3 E B@2 C D B@3 E ~@6 F J B@3 K B ~@3 F ~
>`.pickRestart({
  A: "~@4 x ~ x ~ x!2 ~ x ~ x!3", B: "~ x ~ x", C: "~@4 x ~@4 x ~ x!2 ~@3", D: "~ x ~ x!2 ~@4 x ~ x!2 ~@3",
  E: "~ x ~@2 x ~ x ~ x!8", F: "~@14 x!2", G: "~@9 x ~ x ~@4", H: "~ x ~ x ~@5 x ~ x ~@4", I: "~@11 x!5", J: "x!16",
  K: "~ x ~@2 x ~ x!10",
})).gain(0.43)

// drums · snare · soft notes
const snare_soft = s("sd").struct("<~@82 [x!11 ~@5] ~@30 [x!14 ~@2] ~@11>").gain(0.21)

// drums · hihat
const hihat = s("hh").struct("<~ A@18 B@23 C B@31 C B@7 C B@37 D ~@2 A ~>".pickRestart({
  A: "~ x ~ x", B: "x!4", C: "x!3 ~", D: "x",
})).gain(0.57)

// drums · open hat
const open_hat = s("oh").struct("<~@19 A@23 B A@31 B A@7 B A@37 ~@5>".pickRestart({
  A: "~ x ~ x ~ x ~ x", B: "~ x ~ x ~@4",
})).gain(0.57)

// drums · crash
const crash = s("cr").struct(`<
  ~@19 A ~@7 A ~@7 A ~@7 A ~@7 A ~@7 A ~@7 A ~@7 A ~@7 A ~@7 A ~@7 A ~@7 A ~@5 B ~ A ~@3 C A ~@3 A
>`.pickRestart({
  A: "x", B: "~ x ~@3 x ~@2", C: "x!4",
})).gain(0.5)

// drums · shaker
const shaker = s("sh").struct("<~@19 A@31 ~ A@7 ~ A@31 ~ A@7 ~ A@8 ~@8 A@5 B ~@4>".pickRestart({
  A: "x!16", B: "x",
})).gain(0.29)

stack(
  bass, distortion_guitar, distortion_guitar_soft, string_ensemble_1, lead_2_sawtooth, harpsichord, kick, snare,
  snare_soft, hihat, open_hat, crash, shaker
)