Strudelify
Rock in the Casbah cover art

1982 · Combat Rock

Rock in the Casbah

The Clash

KeyA minorTempo130 bpm
0:00/0:00
// Rock in the Casbah — The Clash
// 130 bpm, 4/4, key A minor. Source: midi.
// Generated by strudelify. One cycle = one bar.
// note: pitch bends are ignored
// note: Full arrangement: all 114 bars on a 16-step grid, each part at one level. Source detail keeps the original performance.
setcpm(130/4)

// Notation: c3@3 lasts 3 steps · ~ is a rest · [c3,e3] is a chord · [...]/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.

// other · piano · ""Rock the Casbah""
const piano = note(`<
  A B C D E F G H E I J K@2 L M N O P Q R S P Q R T B C D E F G H E I J K@2 L M N O P Q R S P Q R T L U V E W X Y Z AA U
  AB AC AD AE AF AG P Q R S P Q R T B C D E F G H E I J K@2 L M N O P Q R S P Q R S P Q R S P Q R S P Q R S P Q R T ~
>`.pickRestart({
  A: "~@12 e5 ~ a4 ~", B: "a4@3 ~ a4 ~ a4 ~ c5 ~ a4 ~ a4@3 ~", C: "e4@5 ~@5 c5 ~ a4 ~ a4 ~",
  D: "a4 ~ a4 ~ a4 ~ a4 ~@3 e5@3 ~ a4 ~", E: "~@14 a4 ~", F: "a4@3 ~ a4 ~ a4 ~ c5 ~ a4 ~ a4 ~ g4 ~",
  G: "a4@8 ~@4 a4 ~ g4 ~", H: "a4 ~ a4 ~ a4 ~ a4 ~@3 d5@3 ~ c5 ~", I: "a4 ~ a4 ~ a4 ~ a4 ~ c5 ~ a4 ~ a4@3 ~",
  J: "e4@5 ~@5 c5 ~ a4 ~ g4 ~", K: "[a4 ~ a4 ~ a4 ~ a4 ~ e5 ~ b4 ~ a4@16 ~@2 a4 ~]/2",
  L: "a4 ~ a4 ~ a4 ~ a4 ~ c5 ~ a4@5 ~", M: "e4@8 ~@4 a4 ~ g4 ~", N: "a4 ~ a4 ~ a4 ~ a4 ~ d5 ~ a4@3 ~ g4 ~",
  O: "a4@12 ~@2 e5 ~", P: "f5 ~ e5 ~ d5 ~ c5 ~ e5@3 ~ d5 ~ c5 ~", Q: "e5 ~ e5 ~ e5 ~ d5@3 ~ d5@3 ~ d5 ~",
  R: "e5 ~ g4 ~ g4 ~ a4@3 ~ a4@5 ~", S: "e5@3 ~ g4 ~ a4@3 ~ a4@3 ~ e5 ~", T: "e5@3 ~ g4 ~ a4@3 ~ a4@3 ~ a4 ~",
  U: "~@10 a4@3 ~ g4 ~", V: "a4 ~ a4 ~ a4 ~ a4 ~ a4@5 ~@3", W: "a4 ~ a4@3 ~ a4!2 c5@5 ~@3", X: "~@10 a4 ~ a4 ~ a4 ~",
  Y: "a4@3 ~ a4@3 ~ a4@5 ~@3", Z: "~@10 a4 ~ a4 ~ g4 ~", AA: "a4@3 ~ a4 ~ a4 ~ c5@3 ~ a4@3 ~",
  AB: "a4 ~ a4 ~ a4@3 ~ a4@3 ~ a4@3 ~", AC: "~@8 b3@4 ~@2 g4 ~", AD: "a4@3 ~ a4 ~ a4 ~ c5 ~ a4@5 ~",
  AE: "~@10 a4@3 ~ a4 ~", AF: "a5 ~ a4@3 ~ a5@3 ~ a5@5 ~", AG: "a5@8 ~@6 e5 ~",
})).s("gm_piano").gain(0.3)

// chords · piano
const piano_2 = note(`<
  ~ A B C D E F C G A B C H A I J K L M N O L M N O A B C D E F C G A B C H A I J K L M N O L M N O A ~ A ~ A ~ A ~ P ~
  P Q A ~ R S L M N O L M N O A B C D E F C G A B C H A I J K L M N O L M N O L M N O L M N O L M N O L M N O ~
>`.pickRestart({
  A: "[c4,e4,g4]@11 ~@5", B: "[g3,b3,d4]@5 ~@11", C: "[b3,d4,f4]@5 ~@11", D: "[a3,c4,f4]@3 ~", E: "[c4,e4,g4]@5 ~@11",
  F: "[b3,d4,g4] ~", G: "[c4,f4,a4]@3 ~", H: "[a3,c4,f4]@11 ~@5", I: "[g3,b3,d4] ~", J: "[c4,e4]@5 ~@11",
  K: "[c4,e4,f4]@3 ~", L: "[a4,c5] ~@15",
  M: "[g4,a4,c5] ~ [a4,c5] g4 [a4,c5] ~ [f4,g4,b4]@3 ~ [f4,g4,b4]@3 ~ [f4,g4,b4] ~", // Am7 Am G7
  N: "[g4,b4,d5] ~@5 [c4,e4]@3 ~ [c4,e4]@5 ~", O: "[g4,b4,d5]@3 ~@3 [c4,e4]@3 ~ [c4,e4]@3 ~@3", P: "[c4,e4]@11 ~@5",
  Q: "~@2 [d3,f3,g3] ~", R: "[c5,e5,g5] ~@5 [c5,e5,g5]@3 ~ [c5,e5,g5]@5 ~", S: "[c5,e5,g5] ~",
})).s("gm_piano").gain(0.24)

// bass · piano · "Norma Williams of"
const bass = note(`<
  ~ A B C D A B C D A B C D A E F G H I J K H I J L A B C D A B C D A B C D A E F G H I J K H I J L M N M N M N M N O P
  O Q M N R ~ H I J K H I J L A B C D A B C D A B C D A E F G H I J K H I J K H I J K H I J K H I J K H I J L@2
>`.pickRestart({
  A: "a1 ~ a1@3 ~ a2 ~ a1 ~ a1@3 ~ e2 ~", B: "e1 ~ e1@3 ~ e2 ~ e1 ~ e1@3 ~ g2 ~",
  C: "g1 ~ g1@3 ~ g2 ~ g1 ~ g1@3 ~ g2 ~", D: "d2 ~ d2@3 ~ c2 ~ d2 ~ d2@3 ~ a2 ~",
  E: "e1 ~ e1@3 ~ e2 ~ e1 ~ e1@3 ~ e1 ~", F: "f1@3 ~ f1@3 ~@5 f1@3 ~", G: "~@2 e1 ~ f1 ~ e1 ~ f1@3 ~ e1@3 ~",
  H: "d2@3 ~ d3 ~ c3 ~ d3 ~ g3 ~ f3@3 ~", I: "a2@4 ~@2 g2@5 ~ g2 ~ g2 ~", J: "e2@4 ~@2 f2@5 ~ f2 ~ f2 ~",
  K: "e2@4 ~@2 c2@3 ~ a1 ~ c2 ~ c2 ~", L: "e2@4 ~@2 c2@3 ~ a1 ~ c2 ~ a2 ~", M: "a1 ~ a1@3 ~ a2 ~ a1 ~ a1 ~@5",
  N: "a1@3 ~ a1@3 ~ a1@3 ~ a1 ~ a2 ~", O: "f1 ~ f1@3 ~ f2 ~ f1 ~ f1 ~@5", P: "f1@3 ~ f1@3 ~ f1@3 ~ f1 ~ f2 ~",
  Q: "f1@3 ~ f1@3 ~ g1@3 ~ g1 ~ g2 ~", R: "a1 ~ a1 ~@3 a2 ~ a1 ~ a1 ~@5",
})).s("gm_piano").gain(0.35)

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

// drums · snare
const snare = s("sd").struct("<[~@3 x] [~ x ~ x]!113>").gain(0.58)

// drums · crash
const crash = s("cr").struct("<A ~@16 B ~@7 B ~@15 B ~@7 B ~@15 B ~@7 B ~@15 B ~@7 B ~@7 B ~@8>".pickRestart({
  A: "~@3 x", B: "x",
})).gain(0.46)

// drums · shaker
const shaker = s("sh").struct("x ~ x!3 ~ x!3 ~ x!3 ~ x!2").gain(0.4)

stack(piano, piano_2, bass, kick, snare, crash, shaker)

More by The Clash