Strudelify
Cocaine cover art

1983 · Troubadour

Cocaine

J.J. Cale

KeyC majorTempo104 bpm
0:00/0:00
// Cocaine — J.J. Cale
// 104 bpm, 4/4, key C major. Source: midi.
// Generated by strudelify. One cycle = one bar.
// note: pitch bends are ignored
// note: duplicate parts dropped: ch 4 "E.PIANO 2" epiano2 (copy of ch 3 "BRASS 1" brass section)
// note: Full arrangement: all 85 bars on a 16-step grid, each part at one level; ghost notes are separate "_soft" parts. Source detail keeps the original performance.
setcpm(104/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.

// bass · electric bass finger · "FINGERDBAS"
const bass = note(`<
  A B A C A B A D A E A F G H G I@3 A E A J A E A F G H G I@3 A E A J A K A K A C G H A K A K A L A K A B A M A N A I@3
  A O A I@3 P Q R S P Q R S P Q R S P Q R S T
>`.pickRestart({
  A: "d2@5 ~ d2!2 a1@5 ~ a1!2", B: "c2@6 c2 ~ g1@4 a1@4", C: "c2@5 ~ c2!2 g1@3 ~ g#1@2 a1 ~",
  D: "c2@5 ~ c2 ~ a1@4 c2@3 ~", E: "c2@3 c2 g1@2 g#1 a1", F: "c2@5 ~ c2@2 d2@4 c2@2 b1@2", G: "d2@5 ~ d2!2 a1@6 a1!2",
  H: "c2@5 ~ c2@2 g1@4 g#1@2 a1@2", I: "[c2@5 ~ c2!2 a1@3 ~ c2@2 d2@8 c2@8 a#1@10 a1 ~@7]/3", J: "c2@3 c2 a1@2 c2 c#2",
  K: "c2@5 ~ c2!2 a1@3 ~ g#1@2 g1 ~", L: "g1@5 ~ g#1@2 a1@2 c2@3 ~ c#2@2", M: "c2@5 ~ c2!2 a1@2 g1@4 a1 ~",
  N: "c2@5 ~ c2!2 a1@3 ~ g#1@2 g1@2", O: "c2@6 c2!2 a1@4 g#1@2 g1@2", P: "d2@5 ~ d2!2 a1@3 ~ c2@2 a1@2",
  Q: "g1@2 g#1@2 a1@2 c2 c#2", R: "d2@5 ~ d2!2 a1@3 ~ c2@2 d2@2", S: "c2@3 ~ a1@2 c2@2 a1@2 g1@2 a1@2 c2@2",
  T: "d2@5 ~ d2!2 c2@2 a1@2 c2@2 d2@2",
})).s("gm_electric_bass_finger").gain(0.36)

// chords · brass section · "BRASS 1"
const brass_section = note("<A@14 B@4 A@10 B@4 A@26 B@4 A@2 B@4 A@16 C>".pickRestart({
  A: "[[f#4,a4,d5]@2 [f#4,a4,d5]@2 [e4,g4,c5]@2 [f#4,a4,d5] ~@7 [e4,g4,c5]@14 ~@4]/2", // D C D C
  B: "[[f#4,a4,d5]@2 [f#4,a4,d5]@2 [e4,g4,c5]@2 [f#4,a4,d5] ~@7 [e4,g4,c5]@14 ~@2 [f#4,a4,d5]@6 ~@2 [e4,g4,c5]@7 ~ [d4,f4,a#4]@9 ~ [c#4,e4,a4] ~@7]/4", // D C D C D C A# A
  C: "[f#4,a4,d5]@5 ~ [f#4,a4,d5]!2 [e4,g4,c5] ~ [e4,g4,a4] ~ [e4,g4,c5] ~ [f#4,a4,d5] ~", // D C A7 C D
})).s("gm_brass_section").gain(0.25)

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

// drums · snare
const snare = s("sd").struct("<A@7 B A@7 C D E A@11 C D E A@3 F A@7 G A@7 ~ A@5 H A C D E A@3 C D E A@17>".pickRestart({
  A: "~ x ~ x", B: "~@4 x ~@3 x!5 ~ x ~", C: "~@4 x ~ x!7 ~ x ~", D: "~@3 x ~@3 x", E: "~ x", F: "~@4 x ~@3 x!5 ~ x!2",
  G: "~@2 x ~@2 x!2 ~", H: "~@4 x ~@7 x ~ x!2",
})).gain(0.59)

// drums · low tom
const low_tom = s("lt").struct("<~@51 [~@10 x ~ x!3 ~] ~@20 [~@3 x]!4 ~@4 [~@3 x]!5>").gain(0.52)

// drums · hihat
const hihat = s("hh").struct("<A@15 B C D A@11 B C D A@4 E@7 F E@7 G A@3 D A H A B C D A@3 B C D A@17>".pickRestart({
  A: "~ x ~ x ~ x ~ x", B: "~ x ~ x ~ x ~@2", C: "~@5 x ~@2", D: "~ x ~@6", E: "x ~ x ~ x ~ x ~ x ~ x!3 ~ x ~",
  F: "x ~ x ~ x ~@2 x ~ x ~ x ~ x ~ x", G: "x!2 ~ x ~ x ~ x", H: "~@2 x ~@3 x ~@3 x!2 ~@2 x ~",
})).gain(0.46)

// drums · hihat · soft notes
const hihat_soft = s("hh").struct("<~@16 A ~@13 A ~@5 B@7 C B@7 D ~@3 E F ~@3 A ~@5 A ~@18>".pickRestart({
  A: "~ x ~@6", B: "~ x ~ x ~ x ~ x ~ x ~@3 x ~ x", C: "~ x ~ x ~ x ~@10", D: "~ x ~ x ~@12", E: "~@2 x!2", F: "x",
})).gain(0.26)

// drums · mid tom
const mid_tom = s("mt").struct("<~@43 A ~@3 B ~@3 C ~@20 D@4 ~@4 D@5>".pickRestart({
  A: "~@6 x ~ x ~@4 x ~@2", B: "~@6 x!2", C: "~@4 x!3 ~ x!2 ~@6", D: "~@2 x ~@2 x ~@2",
})).gain(0.52)

// drums · open hat
const open_hat = s("oh").struct("<~@15 A B C ~@11 A B C ~@23 D ~@3 A B C ~@3 A B C ~@17>".pickRestart({
  A: "~@7 x", B: "~@3 x ~@3 x", C: "~ x", D: "~@3 x ~ x ~ x",
})).gain(0.46)

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

// drums · ride
const ride = s("rd").struct("<~@68 [x!4]!17>").gain(0.46)

// drums · tambourine
const tambourine = s("tb").struct("~ x ~ x").gain(0.46)

stack(bass, brass_section, kick, snare, low_tom, hihat, hihat_soft, mid_tom, open_hat, crash, ride, tambourine)