Strudelify

Rub You the Right Way

Johnny Gill

KeyD minorTempo120 bpm
0:00/0:00
// Rub You the Right Way — Johnny Gill
// 120 bpm, 4/4, key D minor. Source: midi.
// Generated by strudelify. One cycle = one bar.
// note: pitch bends are ignored
// note: sustain pedal (CC 64) lengthens the held notes
// note: Full arrangement: all 118 bars on a 16-step grid, each part at one level; ghost notes are separate "_soft" parts. 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.

// bass · slap bass 1 · "SLAPBASS 1"
const bass = note(`<
  ~@9 A B A B A B A B A B A B A B A C D E F G D E H I A B A B A B A B A B A B A B A C D E F G D E H I A B A B A B A B J
  ~@7 K ~@11 A B A B A B A B A B A B A B A B L ~@7 A B A B A B A B M
>`.pickRestart({
  A: "d3@2 d2 d3@2 d2 d3@2 g2@2 ab2@2 a2@2 c3 ~", B: "a2 a1 a2@3 a1 a2 ~ c3 ~ c3@2 db3 ~ db3 ~",
  C: "a2 g2 a2@3 g2 a2 ~ e3 d3 e3@2 f3@2 g3 ~", D: "g1@3 d3@2 g2 d3 g2 c3@2 g2@2 a2@2 g2 ~",
  E: "a1@3 e3@2 a2 e3 a2 d3@2 a2@2 c3@2 g2 ~", F: "g1@4 g3 d3 g2@2 d3@2 g2 c3@2 g2 bb2 a2",
  G: "d2@3 a1 a2@2 a1@2 a2@2 g2@2 e2@2 a1 ~", H: "bb1@4 ~ d2 bb2@2 a2@2 g2@2 f2@2 d2 ~",
  I: "c2@3 ~@3 [c2,c3] ~ bb2@2 a2@2 g2@2 f2 ~", J: "d2 ~@7", K: "d1@3 d2 ~ d1 d2 ~@9", L: "d2 ~@15", M: "d2@3 ~@13",
})).s("gm_slap_bass_1").gain(0.64)

// chords · epiano2 · "E.PIANO 2"
const epiano2 = note(`<
  ~ A@3 B C D E@2 F G H I J K L M N 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[d4,f4] ~, g4 ~@3 g4 ~@3", // Dm
  Y: "d5 [a4,c5] c5 [ab4,a4] g4 [d4,f4] db4 [a3,c4] g3 [f3,gb3] ~@5 [a2,b2], ~@5 c4@2 [c3,d3], ~@10 d3@3 [e3,f3]@3, ~@11 b3@5, ~@3 [g3,a3]", // Am Amaj7 Dm Am Gbmaj7 Asus2 Csus2 Fmaj7 …
  Z: "[e2,f2,g2] ~@15", AA: "~@4 f4@2 bb4 ~, bb3@7 ~, ~@2 db4@5 ~", AB: "~@9 a3 a4@2 a3 ~@3",
  AC: "[a3,a4] [a2,a3] [a3,a4]@3 [a2,a3] [a3,a4] ~ [c4,c5] ~ [c4,c5]@2 [db4,db5] ~ [db4,db5] ~", // A C Db
})).s("gm_epiano2").gain(0.64)

// chords · string ensemble 1 · "STRINGS"
const string_ensemble_1 = note(`<
  ~ A B A C D@4 A B A C E@4 ~@8 F G F H F G I J A B A C E@4 ~@8 F G F H F G I J A B A C E@4 A B A C E@4 ~@4 F G F K F G
  I L A B A C E@4 A B A C E@4 A B A C E@4 A B A C E@4 ~
>`.pickRestart({
  A: "[g3,a3,c4,d4]", B: "[g3,bb3,db4,e4]", C: "[bb3,db4,e4,g4]",
  D: "[[g3,a3,c4,d4]@16 [g3,c4,e4]@15 ~ [a3,d4,f4]@15 ~ [a3,e4,a4]@5 ~@11, [d5,d6]@49 ~@15]/4", // Gsus4 C Dm A5 D
  E: "[[g3,a3,c4,d4]@16 [g3,c4,e4]@15 ~ [a3,d4,f4]@15 ~ [a3,e4,a4]@14 ~@2, [d5,d6]@49 ~@15]/4", // Gsus4 C Dm A5 D
  F: "[a3,bb3,d4,f4]@9 ~@7", G: "[g3,a3,c4,e4,g4]@9 ~@7", H: "[a3,d4,e4]@15 ~", I: "[a3,bb3,d4,f4,a4]@15 ~",
  J: "[c3,bb3,d4,f4,a4]@15 ~", K: "d5@4 d6@4 c6@4 a5@3 ~, [g3,a3,c4,e4]@15 ~", L: "[g4,bb4,db5,f5]@15 ~",
})).s("gm_string_ensemble_1").gain(0.14)

// drums · kick
const kick = s("bd").struct(`<
  ~
  x!7
  [x!3 ~@5]
  [x ~@2 x ~ x ~@2]!56
  [x ~@2 x ~@4]!7
  [x ~@5 x ~@6 x ~@2]
  [x ~@2 x ~ x ~@2]!44
  x
>`).gain(0.71)

// drums · kick · soft notes
const kick_soft = s("bd").struct("<~@9 [~@7 x ~ x ~@6]!56 [~@7 x ~ x!2 ~@5]!8 [~@7 x ~ x ~@6]!44 ~>").gain(0.29)

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

// drums · snare · soft notes
const snare_soft = s("sd").struct("<~ A B A B A B A C ~@7 D ~@7 D ~@7 D ~@15 D ~@35 E ~@23 D ~@7 E ~>".pickRestart({
  A: "~@7 x ~ x ~ x ~@4", B: "~@6 x!2 ~ x ~ x ~@4", C: "~@5 x ~@3 x ~ x ~@4", D: "~@12 x!3 ~",
  E: "~ x ~ x ~ x ~ x ~ x ~ x!3 ~@2",
})).gain(0.14)

// drums · clap
const clap = s("cp").struct("<~ [~ x ~ x]!7 [x!3 ~@3 x ~] [~ x ~ x]!108 ~>").gain(0.71)

// drums · low tom
const low_tom = s("lt").struct("<~@8 [~@3 x] ~@107 [~ x] x>").gain(0.71)

// drums · hihat
const hihat = s("hh").struct("<~ [x!4]!7 [~@3 x!2 ~@3] [x!4]!108 ~>").gain(0.71)

// drums · hihat · soft notes
const hihat_soft = s("hh").struct("<~ [~ x ~ x ~ x ~@2]!7 [~@4 x!2 ~@10] [~ x ~ x ~ x ~@2]!108 ~>").gain(0.21)

// drums · mid tom
const mid_tom = s("mt").struct("<~@116 [~ x ~@2] ~>").gain(0.71)

// drums · open hat
const open_hat = s("oh").struct("<~ [~@7 x]!7 [~@7 x ~@8] [~@7 x]!108 ~>").gain(0.71)

// drums · high tom
const high_tom = s("ht").struct("<~@116 x ~>").gain(0.71)

// drums · tambourine
const tambourine = s("tb").struct("<~ [x!16]!116 ~>").gain(0.21)

// drums · cabasa
const cabasa = s("cabasa:4").struct("<~ [x!16]!116 ~>").gain(1.09)

stack(
  bass, epiano2, string_ensemble_1, kick, kick_soft, snare, snare_soft, clap, low_tom, hihat, hihat_soft, mid_tom,
  open_hat, high_tom, tambourine, cabasa
)