Strudelify

Drift Away

Dobie Gray

KeyB majorTempo73 bpm
0:00/0:00
// Drift Away — Dobie Gray
// 73 bpm, 4/4, key B major. Source: midi.
// Generated by strudelify. One cycle = one bar.
// note: pitch bends are ignored
// note: Full arrangement: all 78 bars on a 16-step grid, each part at one level; ghost notes are separate "_soft" parts. Source detail keeps the original performance.
setcpm(73/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 · electric bass finger · "BASS"
const bass = note(`<
  ~@2 A B C D E F G H I J K L J K L M N@2 B C D E F G H I J K L J K L M O@2 P Q R P S T B C D E F G H I ~@4 U V W X J K
  L M J K L M J K L M J K L M ~ Y@2
>`.pickRestart({
  A: "~@3 [b0,b1]", B: "[e0,e1]@7 [e0,e1] [e0,e1]@6 ~ [a#0,a#1]", C: "[b0,b1]@7 [b0,b1] [b0,b1]@5 ~ [f#0,f#1]@2",
  D: "[e0,e1]@7 [g#0,g#1] [f#0,f#1]@7 [c#1,c#2]", E: "[b0,b1]@6 ~ [b0,b1] [b0,b1]@4 ~ [b0,b1] [f#0,f#1]@2",
  F: "[e0,e1]@6 ~ [e0,e1] [e0,e1]@4 ~ [e0,e1] [a#0,a#1]@2", // E A#
  G: "[b0,b1]@7 [b0,b1] [b0,b1]@4 ~ [b0,b1] [d#1,d#2]@2, ~@14 [c#1,c#2] ~", // B D# C#
  H: "[c#1,c#2]@7 [c#1,c#2] [c#1,c#2]@4 ~ [c#1,c#2] [d#1,d#2]@2", // C# D#
  I: "[e1,e2]@7 ~ [e1,e2] ~ [e1,e2] ~@2 [e1,e2] [f#1,f#2]@2", // E F#
  J: "[b0,b1]@2 [f#0,f#1]@2 [b0,b1]@3 [f#0,f#1] [b0,b1] [f#0,f#1] [b0,b1] ~ [b0,b1] [f#0,f#1] [d#1,d#2] [e1,e2]", // B F# B F# B F# B F# …
  K: "[f#1,f#2]@2 [c#1,c#2] ~ [f#1,f#2]@2 [c#1,c#2] [e1,e2] [f#1,f#2] [c#1,c#2] [f#1,f#2] ~ [f#1,f#2] [c#1,c#2] [f#1,f#2] [f1,f2]", // F# C# F# C# E F# C# F# …
  L: "[e1,e2]@3 ~ [e1,e2]@3 [b0,b1] [e1,e2] ~ [e1,e2] ~ [e1,e2]@3 [b0,b1]", // E B E B
  M: "[e1,e2] ~ [e1,e2] [c#1,c#2] ~ [c#1,c#2] [b0,b1]@2 ~ [g#0,g#1] ~ [g#0,g#1] [f#0,f#1]@2 [e0,e1]@2", // E C# B G# F# E
  N: "[[b0,b1]@27 ~@5]/2", O: "[[b0,b1]@27 ~@5, [e0,e1] ~@31]/2", P: "[c#1,c#2]@13 ~ [c#1,c#2] [d#1,d#2]",
  Q: "[e1,e2]@14 [e1,e2] [f#1,f#2]", R: "[b0,b1]@14 [d#1,d#2] [e1,e2]", S: "[e1,e2]@14 ~ [e1,e2]", T: "[f#1,f#2]@7 ~",
  U: "[b1,b2]@14 [f#1,f#2] [b1,b2]", V: "[a#1,a#2]@13 [f#1,f#2] [a#1,a#2]@2", W: "[g#1,g#2]@13 [b0,b1] [f#1,f#2]@2",
  X: "[e1,e2]@3 [c#1,c#2] ~ [c#1,c#2] [b0,b1]@3 [g#0,g#1] ~ [g#0,g#1] [f#0,f#1]@2 [e0,e1]@2", // E C# B G# F# E
  Y: "[~@3 [f#1,f#2]@5 [b0,b1]@19 ~@5]/2", // F# B
})).s("gm_electric_bass_finger").gain(0.35)

// chords · electric guitar clean · "GUITAR"
const electric_guitar_clean = note(`<
  A@2 B C D E F@2 G H I J K L M N O P Q B R S R T U V W@2 J K L M N O P X Y ~@5 Z AA ~@7 AB AC AD@2 AB AC AE AF M N O P
  M N O P M N O P M N O P X AG@2
>`.pickRestart({
  A: "[~@18 f#3 ~@2 a#3 ~@2 b3 ~@2 a#3 ~@2 f#3@2, ~@15 b2@4 [d#3,f#4]@4 ~@2 [d#3,f#4]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#3,b3]@9 ~@3, f#2@3 b3@3 ~@26, ~ c#3@5 ~@26, ~@2 f#3@3 ~@27]/2", // B5
})).s("gm_electric_guitar_clean").gain(0.37)

// drums · kick
const kick = s("bd").struct(`<
  ~@3 A B A C A B@2 D E F E@3 G H I D A B A C A B@2 D E F E@3 G H I D J ~@5 A B A C A B@2 D ~@2 K I@4 L E@2 M N E@2 G O
  E@2 G P E@2 G H J Q ~
>`.pickRestart({
  A: "x!2", B: "x ~@6 x!2 ~@7", C: "x ~@7 x ~@6 x", D: "x ~@6 x!2 ~ x ~@2 x ~@2", E: "x ~@6 x!2 ~ x ~@5",
  F: "x ~@3 x!2 ~@2", G: "x ~@6 x!2 ~ x ~@4 x", H: "x ~@3 x ~@5 x ~@2 x ~@2", I: "x ~@6 x!2 ~@6 x", J: "x",
  K: "~@7 x!2 ~@6 x", L: "x!5 ~ x!10", M: "x ~@2 x!2 ~ x!2 ~ x!2 ~ x!2 ~@2", N: "x ~@6 x ~@7 x",
  O: "x!4 ~ x!4 ~ x!2 ~ x!3", P: "x ~@2 x ~@4", Q: "~@3 x ~@4 x ~@7",
})).gain(0.5)

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

// drums · clap
const clap = s("cp").struct("<~@51 [~ x ~ x]!3 [~ x ~@2] ~@23>").gain(0.45)

// drums · low tom
const low_tom = s("lt").struct("<~@17 A ~@16 A ~@23 B ~@2 C D ~@11 A ~@3>".pickRestart({
  A: "~@11 x!2 ~@3", B: "~@9 x!7", C: "x", D: "~@11 x ~ x!3",
})).gain(0.5)

// drums · low tom · soft notes
const low_tom_soft = s("lt").struct("<~@58 [~ x!4 ~ x!3 ~@7] ~@19>").gain(0.25)

// drums · hihat
const hihat = s("hh").struct(`<
  ~@3 A@8 B C D C@2 D E ~@2 A@8 B C D C@2 D E ~@2 F G H I J K A@8 L M@2 N O P Q ~ C@2 D ~ C@2 D ~ C@2 D ~ C@2 D E ~@3
>`.pickRestart({
  A: "~ x ~ x", B: "x!15 ~", C: "x!14 ~@2", D: "x!16", E: "x!3 ~@6 x!2 ~ x ~@3", F: "~ x!3",
  G: "x ~@2 x!2 ~@3 x ~@2 x!2 ~@3", H: "x ~@2 x!2 ~@3 x ~@2 x!2 ~ x ~", I: "x ~@3 x ~@2 x!2 ~@3 x ~@3",
  J: "x ~@3 x ~@3 x ~@2 x!2 ~ x ~", K: "x ~@2 x!2 ~ x ~", L: "x!2 ~ x!3 ~ x!3 ~ x!2 ~ x!2",
  M: "x ~@2 x!2 ~ x!4 ~ x!2 ~ x!2", N: "x ~ x!3 ~ x!2 ~ x ~ x!2 ~ x!2", O: "x ~ x!3 ~@2 x!2 ~@2 x!2 ~ x!2",
  P: "x ~@2 x!2 ~@2 x!2 ~@2 x!2 ~ x!2", Q: "x ~ x!3 ~ x!10",
})).gain(0.4)

// drums · mid tom
const mid_tom = s("mt").struct("<~@17 A ~@16 A ~@23 B ~@3 C ~@11 A ~@3>".pickRestart({
  A: "~@5 x ~@2 x ~@7", B: "~@15 x", C: "~@3 x!2 ~ x ~@2 x!6 ~",
})).gain(0.5)

// drums · open hat
const open_hat = s("oh").struct(`<
  ~@11 A B ~ B@2 ~ C ~@10 A B ~ B@2 ~ C ~@24 B@2 D E B@2 E F B@2 ~@2 D G H C ~@3
>`.pickRestart({
  A: "~@15 x", B: "~@7 x", C: "~ x!3 ~ x!3", D: "~@3 x ~ x ~ x", E: "~ x ~ x ~ x ~ x", F: "~ x ~@6", G: "~ x ~@3 x ~ x",
  H: "~@5 x ~ x",
})).gain(0.35)

// drums · high tom
const high_tom = s("ht").struct("<~@17 A ~@16 A ~@27 B ~@11 A ~@3>".pickRestart({
  A: "~ x ~@14", B: "~@5 x ~@2 x ~ x ~ x ~@3",
})).gain(0.5)

// drums · crash
const crash = s("cr").struct("<~@39 A ~@2 A ~@15 A@2 ~@2 B A ~@2 C A ~@2 D A ~@3 A E ~>".pickRestart({
  A: "x", B: "x ~@6 x ~@8", C: "~@4 x ~@4 x ~@2 x ~@2 x", D: "~ x ~ x ~ x ~ x ~ x ~ x ~ x ~@2", E: "~@3 x ~@4 x ~@7",
})).gain(0.5)

// drums · ride
const ride = s("rd").struct("<~@37 x!2 ~ x!2 ~@36>").gain(0.35)

// drums · tambourine
const tambourine = s("tb").struct("<~@59 A B C D B@2 D E B@4 C F G D H ~@2>".pickRestart({
  A: "~@4 x!12", B: "x!16", C: "x!6 ~ x!3 ~ x!3 ~ x", D: "x!2 ~ x!3 ~ x!3 ~ x!3 ~ x", E: "x!2 ~ x!13",
  F: "x!2 ~ x!7 ~ x!3 ~ x", G: "x!10 ~ x!3 ~ x", H: "x!3 ~@13",
})).gain(0.2)

// drums · cowbell
const cowbell = s("cb").struct("<~@59 [x!4]!16 ~@3>").gain(0.3)

stack(
  bass, electric_guitar_clean, kick, snare, clap, low_tom, low_tom_soft, hihat, mid_tom, open_hat, high_tom, crash,
  ride, tambourine, cowbell
)