Strudelify
KeyA majorTempo120 bpm
0:00/0:00
// Refugee — Tom Petty and The Heartbreakers
// 120 bpm, 4/4, key A major. Source: midi.
// Generated by strudelify. One cycle = one bar.
// note: pitch bends are ignored
// note: Full arrangement: all 85 bars on a 16-step grid, each part at one level. Source detail keeps the original performance.
setcpm(120/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 · reed organ · "organ"
const reed_organ = note("<~ A@2 ~ B ~ B ~ B ~@68 C@8>".pickRestart({
  A: "[~ [e5,a5]@5 [g#4,b4,e5]!2, ~ c#5@6 ~]/2", B: "[e5,a5]@2 [g#4,b4,e5]!2, c#5@3 ~",
  C: "[f#5 f#5@2 f#5@2 e5@2 e5]/2",
})).s("gm_reed_organ").gain(0.64).pan(1)

// other · distortion guitar · "funky guitar"
const distortion_guitar = note(`<
  ~@5 A@2 B@2 ~@12 C@2 D@2 ~@12 C@2 E@2 ~@8 F@2 G@2 ~@12 C@2 E@2 H I J@2 C@2 D@2 ~@8
>`.pickRestart({
  A: "[f#4@10 f#4@2 g#4@2 a4@7 ~ e4 ~ g#4 ~ a4 ~ e4@4]/2", B: "[f#4@8 ~@2 f#4@2 g#4@2 a4@7 ~ e4 ~ e4 ~ e4 ~ e4@4]/2",
  C: "[[f#4,c#5] ~ [f#4,c#5]@3 f#4 g#4 a4@5 [e4,b4]@4]/2", D: "[f#4 ~ f#4@3 f#4 g#4 a4@4 e4!3 e4@2]/2",
  E: "[f#4 ~ f#4@3 f#4 g#4 a4@4 e4 [e4,b4]@4]/2", F: "[d4,a4,d5]/2", G: "[e4,b4,e5]",
  H: "[f#4,c#5]@2 [f#4,c#5]@3 f#4 g#4 a4", I: "~ [e4,b4]", J: "[f#4@2 f#4@3 f#4 g#4 a4@4 e4 [e4,b4]@4]/2",
})).s("gm_distortion_guitar").gain(0.8).pan(1)

// other · lead 8 bass lead · "bass booster( lead synth)"
const lead_8_bass_lead = note(`<
  ~@37 A@2 B@2 C@2 D@2 E@4 F@2 G@2 H I J K H I J L M@2 N@2 A@2 B@2 C@2 O@2 A@2 P@10
>`.pickRestart({
  A: "[[f#2,c#3] ~ [f#2,c#3]@3 f#2 g#2 a2@5 [e2,b2]@4]/2", B: "[f#2 ~ f#2@3 f#2 g#2 a2@4 e2 [e2,b2]@4]/2",
  C: "[[f#2,c#3]@2 [f#2,c#3]@3 f#2 g#2 a2@5 [e2,b2]@4]/2", D: "[f#2@2 f#2@3 f#2 g#2 a2@4 e2!3 e2@2]/2",
  E: "[[e2,b2] [e2,b2]@7 [a2,e3]@8]/4", F: "[d2,a2,d3]/2", G: "[e2,b2,e3]", H: "[f#2,c#3]", I: "[a2,e3] [e2,b2]",
  J: "f#2@3 c#2 f#2@3 e2", K: "a2@3 e2 e2@2 e2@2", L: "a2@3 e2 e2@4", M: "[d3,f#3,a3]/2", N: "[b2,f#3,a3]/2",
  O: "[f#2@2 f#2@3 f#2 g#2 a2@4 e2 [e2,b2]@4]/2", P: "[f#2 ~ f#2@3 f#2 g#2 a2@4 e2!3 e2@2]/2",
})).s("gm_lead_8_bass_lead").gain(0.72)

// bass · synth bass 2 · "bass"
const bass = note(`<
  ~ A@8 B C D E B C D F G@2 H@2 I@2 J@2 B C D E B C D F G@2 H@2 I@2 K@2 L M N@2 O@4 P@2 Q@2 B C D E B C D F G@2 H@2 I@2
  K@2 L M R@2 I@2 J@10
>`.pickRestart({
  A: "[f#2 ~@3 f#2@5 ~ f#2@2 g#2@2 a2@7 ~ e2 ~ e2 ~ e2 ~ e2@4]/2", B: "[f#2,c#3]", C: "[a2,e3] [e2,b2]",
  D: "f#2@3 c#2 f#2@3 e2", E: "a2@3 e2 e2@2 e2@2", F: "a2@3 e2 e2@4", G: "[d3,f#3,a3]/2", H: "[b2,f#3,a3]/2",
  I: "[[f#2,c#3] ~ [f#2,c#3]@3 f#2 g#2 a2@5 [e2,b2]@4]/2", J: "[f#2 ~ f#2@3 f#2 g#2 a2@4 e2!3 e2@2]/2",
  K: "[f#2 ~ f#2@3 f#2 g#2 a2@4 e2 [e2,b2]@4]/2", L: "[f#2,c#3]@2 [f#2,c#3]@3 f#2 g#2 a2", M: "~ [e2,b2]",
  N: "[f#2@2 f#2@3 f#2 g#2 a2@4 e2!3 e2@2]/2", O: "[[e2,b2] [e2,b2]@7 [a2,e3]@8]/4", P: "[d2,a2,d3]/2", Q: "[e2,b2,e3]",
  R: "[f#2@2 f#2@3 f#2 g#2 a2@4 e2 [e2,b2]@4]/2", // E5
})).s("gm_synth_bass_2").gain(0.8).pan(0)

// other · clavinet · "melody (clavinet)"
const clavinet = note(`<
  ~@9 A B C ~ D E F G H I J K L M ~@2 A B C ~ D E F G H I J K L M ~ N O P Q ~ R S T U V@2 W X@2 B C ~ D E F G H I J K L
  M ~ N O P Q Y O Z ~@10
>`.pickRestart({
  A: "~@2 c#4@2 b3@4 c#4 b3 c#4@2 b3@4", B: "c#4 b3 c#4@2 b3@2 c#4@2 b3@2 b3@2 a3@2 b3@2", C: "f#3!2 ~@6",
  D: "~@2 c#4@2 c#4@2 c#4 b3 c#4@4 c#4@2 b3@2", E: "c#4@2 b3@2 c#4@2 b3@2 b3@4 b3!2 c#4@2", F: "f#3!2 ~@2",
  G: "~@6 a4 e4", H: "~@4 f#4!3 e4", I: "f#4@2 f#4@2 e4@2 f#4@5 ~ f#4@2 f#4@2", J: "~@2 f#4 e4!2 f#4!2 e4",
  K: "f#4!2 e4 a4@2 f#4 a4 f#4", L: "a4 f#4 ~@2 a4 f#4 ~ a4", M: "a4@2 a4 f#4 e4!3 f#4", N: "~@10 a4@2 a4!2 f#4@2",
  O: "a4@2 f#4 ~ a4 f#4 ~ a4", P: "a4@4 g#4@2 f#4@2 e4@2 e4@2 e4@2 f#4 e4", Q: "c#4 ~@3", R: "~@6 e4 c#4",
  S: "e4@2 e4@2 c#4@2 f#4@5 ~@5", T: "~ e4!4 d4!3", U: "d4@2 c#4@2 c#4@4 c#4 b3 a3@2 ~@4",
  V: "[~@2 f#4@4 f#4@2 f#4@2 f#4@4 f#4@5 ~ e4@2 g4@4 f#4@2 d4@2 ~@2]/2", W: "g#4!2 e4 g#4 f#4 a4 f#4 g#4",
  X: "[f#4@2 a4@4 b4@12 c#4@2 b3@4 c#4 b3 c#4@2 b3@4]/2", Y: "~@12 a4!2 f#4@2", Z: "a4@2 a4 f#4 a4 f#4 f#4@2",
})).s("gm_clavinet").gain(0.72)

// chords · electric guitar clean · "rhythm guitar"
const electric_guitar_clean = note(`<
  ~ A@8 B C@2 D E F G H I J K L M N O@2 B C@2 D E F G H I J K L M N P@2 Q R@3 S T U V W@2 X Y B C@2 D E F G H I J K L M
  N P@2 Q Z@3 AA AB AC@10
>`.pickRestart({
  A: "[[a3,c#4,f#4]@3 ~ [a3,c#4,f#4]@7 ~@3 [c#4,e4,a4]@5 ~ [c#4,e4,a4]@4 [g#3,b3,c#4,e4]@4 [g#3,b3,e4]@4]/2", // F#m A C#m7 E
  B: "~@2 c#4@2 b3@4 c#4 b3 c#4@2 b3@4",
  C: "[c#4 b3 c#4@2 b3@2 c#4@2 b3@2 b3@2 a3@2 f#3@4 f#3@13 ~, ~@7 [a3,c#4]@8 ~]/2", D: "[a3,c#4]@7 ~ [g#3,b3]@7 ~",
  E: "~@2 c#4@2 c#4@2 c#4 b3 c#4@4 c#4@2 b3@2", F: "c#4@2 b3@2 c#4@2 b3@2 b3@4 b3!2 b3@2",
  G: "f#3@4 f#3@11 ~, [a3,c#4]@7 ~", H: "[a3,c#4,e4]@11 ~ a4@2 e4@2, ~@3 [g#3,b3]", I: "~@4 f#4!4",
  J: "f#4@2 f#4@2 e4@2 f#4@5 ~ f#4@2 f#4@2", K: "~@2 f#4 e4 f#4@2 f#4 e4", L: "f#4!2 e4 a4@2 f#4 a4 f#4",
  M: "a4@2 f#4@5 ~ a4@2 f#4@4 a4@2, c#4@7 ~ c#4@5 ~@3", N: "[c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e4]@2]/2", // F#m A E
})).s("gm_electric_guitar_clean").gain(0.72)

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

// drums · snare
const snare = s("sd").struct(`<
  A B@3 C B@3 D B@3 D B@3 D B@3 D B@3 E B@3 D B@3 D B@3 D B@3 D B@2 D B@3 D B@3 D E B@3 D B@3 D B@3 D B@3 D B@3 D B@3 D
  ~@8
>`.pickRestart({
  A: "~@8 x ~@2 x!2 ~ x!2", B: "~ x ~ x", C: "~@4 x ~@7 x!4", D: "x ~@2 x!2 ~ x ~ x ~@3 x ~@3", E: "~ x ~@2",
})).gain(0.8)

// drums · low tom
const low_tom = s("lt").struct(`<
  A B@3 C B@3 D B@3 D B@3 D B@3 D B@3 E B@3 D B@3 D B@3 D B@3 D B@2 D B@3 D B@3 D E B@3 D B@3 D B@3 D B@3 D B@3 D B@3 D
  ~@8
>`.pickRestart({
  A: "~@8 x ~@2 x!2 ~ x!2", B: "x!4", C: "x ~@3 x ~@3 x ~@3 x!4", D: "x ~@2 x!2 ~ x ~ x ~@3 x ~@3",
  E: "x ~@3 x ~@3 x ~@4 x!3",
})).gain(0.8)

// drums · mid tom
const mid_tom = s("mt").struct("<~@24 [~@3 x] ~@27 [~@3 x] ~@32>").gain(0.8)

// drums · high tom
const high_tom = s("ht").struct("<~@24 [~@10 x!2 ~@4] ~@27 [~@10 x!2 ~@4] ~@32>").gain(0.8)

// drums · crash
const crash = s("cr").struct("<~ A ~ A ~ A ~ A ~@45 B ~@31>".pickRestart({
  A: "~ x ~@2", B: "x",
})).gain(0.64)

// drums · tambourine
const tambourine = s("tb").struct(`<
  A ~@7 B ~@3 B ~@3 B ~@3 B ~@7 B ~@3 B ~@3 B ~@3 B ~@2 B ~@3 B ~@3 B ~@4 B ~@3 B ~@3 B ~@3 B ~@3 B ~@3 B ~@8
>`.pickRestart({
  A: "~@8 x ~@2 x!2 ~ x!2", B: "x ~@2 x!2 ~ x ~ x ~@3 x ~@3",
})).gain(0.8)

// drums · shaker
const shaker = s("sh").struct("<~@9 A@3 ~ A@3 ~ A@7 B A@27 B A@24 ~@8>".pickRestart({
  A: "x!8", B: "x!6 ~@2",
})).gain(0.8)

// drums · jingle bells
const jingle_bells = s("sleighbells:4").struct("<~ x ~@83>").gain(2.76)

stack(
  reed_organ, distortion_guitar, lead_8_bass_lead, bass, clavinet, electric_guitar_clean, kick, snare, low_tom, mid_tom,
  high_tom, crash, tambourine, shaker, jingle_bells
)

More by Tom Petty and The Heartbreakers