Strudelify
KeyA majorTempo97 bpm
0:00/0:00
// sun — Two Door Cinema Club
// 97 bpm, 4/4, key A major. Source: midi.
// Generated by strudelify. One cycle = one bar.
// note: Transcription provider: pdmx. https://musescore.com/score/5892003; license: https://creativecommons.org/publicdomain/zero/1.0/
// note: Full arrangement: all 71 bars on a 16-step grid, each part at one level. Source detail keeps the original performance.
setcpm(97/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 · piano
const piano = note(`<
  A B A C D E D F G H I J K L K L K L M@2 N@6 O P G H I J K L K L Q L R S T@4 U@4 V W@2 X Y Z@2 AA AB@3 AC@3 AD@2 AE@2
  AD@2 AF AG@2
>`.pickRestart({
  A: "a3@3 b3@3 [a2,c4]@8 a3@2, d3@3 ~@5", B: "e4@3 d4@3 b3@2 a3 g3@5 g3@2, c3@6 e2@9 ~",
  C: "e4@3 d4@3 b3@2 a3 g3@7, c3@6 e2@9 ~", D: "[d3,d5]@6 [a2,c5]@9 ~", E: "[c3,e5]@6 [e2,g5]@9 ~",
  F: "[e2,g2,b2,g4]@11 ~@5", // Em
  G: "[d3,e4]@2 e4!2 b4 ~@2 a4@3 e4@2 e4@2 [a2,g4] [b2,e4], ~ f#3 g3 a2@2 a2@2 ~, ~@5 g4@2 ~@9", // Dsus2 A7 E5
  H: "c3@2 e4!2 b4 ~@2 a4@3 e4@2 [d4,e4]@2 e5!2, ~ c3 d3 e3@2 ~@2 b3, ~@5 g4@2 ~@9", // Dsus2
  I: "d3@2 e4!2 b4 ~@2 a4@3 e4@2 e4@2 a2 b2, ~ f#3 g3 a2@2 a2@2 ~, ~@5 g4@2 ~@7 e4@2",
  J: "[c3,a4]@2 [c3,a4]@2 [d3,a4]@2 a4@2 a4 ~ e4@2 d4@2 e4!2, ~@6 e3@3 b4@3 ~@2 b3@2", // F D5
  K: "[d3,a3]@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~@4 a4@3 g3 ~@4 e4@10 ~ c4 ~ d4 ~@2 g4@10 ~ a3 ~@2 f#4@2 ~]/3", // Gsus2 D C Esus2 A Em
  AD: "[e4@2 g4@2 [e3,e4,g4] ~ b3 e4 e4@2 d4@2 b3@2 [d3,a3] ~ [g2,g3] ~ g3 ~ [g2,g3] ~ g3 ~ [g2,g3] ~ g3 ~ d3 ~ d3 ~, e3 ~ b3 ~@2 f#4@2 ~ e3 ~ b3 ~ d3 ~@2 b3@12 ~@5]/2", // Em D5 G
  AE: "[[c3,c4] ~ c4 ~ [c3,c4] ~ c4 ~ [c3,c4] ~ e4@2 e4@2 [e4,f#4] ~ [a2,a3] ~ a3 ~ [a2,a3] ~ a3 ~ [a2,a3] ~ g4@2 [b3,g4] ~ g3 e4, e4@4 ~@6 c4 ~ d4 ~@2 g4@10 ~ a3 ~@2 f#4@2 ~]/2", // C Esus2 A Em
  AF: "c4 ~ g3 ~ b3 ~ g3 ~ c4 ~ g3 ~ b3 ~ g3 ~", AG: "[c4 ~ g3 ~ b3 ~ g3 ~ c4 ~ g3 ~ b3 g3 e4 d4@5 ~@12]/2",
})).s("gm_piano").gain(0.4)

// drums · kick
const kick = s("bd").struct("<~@8 A@4 ~@8 B@7 C A@4 ~@8 A@15 D A@12 ~@3>".pickRestart({
  A: "x!8", B: "x!4", C: "x ~ x ~ x ~ x!2", D: "~@14 x!2",
})).gain(0.3)

// drums · rim
const rim = s("rim").struct("<~@8 [~ x ~ x]!11 ~@9 [~ x ~ x]!11 ~@32>").gain(0.3)

// drums · snare
const snare = s("sd").struct("<~@40 A@3 B A@3 C ~@8 A@3 B A@3 B A@3 B ~@3>".pickRestart({
  A: "~ x ~ x", B: "~@2 x ~@2 x!2 ~", C: "~@2 x ~@2 x!3",
})).gain(0.3)

// drums · hihat
const hihat = s("hh").struct("<~@20 A B A B A B A B ~@43>".pickRestart({
  A: "x!8", B: "x!7 ~",
})).gain(0.3)

// drums · mid tom
const mid_tom = s("mt").struct("<~@8 A B A B A@3 B A B A@2 ~@8 A B A B A@3 B A B A@2 C@8 ~@8 C@12 ~@3>".pickRestart({
  A: "x!8", B: "x ~ x ~ x ~ x!2 ~ x!2 ~ x ~ x!2", C: "x!2",
})).gain(0.3)

// drums · crash
const crash = s("cr").struct("<~@8 A ~@19 A ~@11 A ~@3 A ~@11 A ~@3 A ~@3 A ~@6>".pickRestart({
  A: "x",
})).gain(0.3)

// drums · ride
const ride = s("rd").struct("<~@21 A ~ A ~ A ~ A ~@43>".pickRestart({
  A: "~@7 x",
})).gain(0.3)

stack(piano, kick, rim, snare, hihat, mid_tom, crash, ride)