Strudelify

Sun King

The Beatles

KeyE majorTempo75 bpm
0:00/0:00
// Sun King — The Beatles
// 75 bpm, 4/4, key E major. Source: midi.
// Generated by strudelify. One cycle = one bar.
// note: Full arrangement: all 47 bars on a 16-step grid, each part at one level. Source detail keeps the original performance.
setcpm(75/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 · rock organ · "organ"
const rock_organ = note("<~@25 A B C D C E F G@2 H ~@12>".pickRestart({
  A: "~@3 [g4,g#4] a4@2 g4@2 f4@2 e4@2 d4@2 e4@2", B: "c#4 d4 e4 f4 g4 f#4 f4 e4", C: "[f5,a5,c6]",
  D: "~@4 g4 f#4 f4 e4, [c5,f#5,a5]", // F#dim
  E: "f#5@2 d4 [c#4,e5] [d4,f5]@2 [a3,d5]@2 [f#3,e5] [a3,d5] e3 [d3,d5] [d3,f5] [d3,d5] [e3,e5] [f#3,d5], a5, c5@5 c5@3, ~ f#5@7", // C#m Dm D5 F#7 D5 D Dm D …
  F: "[g3,g4,c5,e5]", G: "[b4 a#4, [e4,g4,e5]]/2", H: "[f4,a4,c5,f5]",
})).s("gm_rock_organ").gain(0.29)

// chords · electric guitar jazz · "g2"
const electric_guitar_jazz = note(`<
  ~@5 A B C ~ A B C ~ D@2 E F G ~ H@2 I J H@2 I J K L M L H N O M A B C ~ A B C ~ D@2 P Q
>`.pickRestart({
  A: "e4@2 a3 c#4@2 f#4 c#4@2 e4@2 a3 c#4@2 f#4 c#4@2", B: "e4@2 a3 c#4@2 f#4 c#4@2 e4@2 a3 c#4@2 g#4 d#4@2",
  C: "e4@2 e3 g#3@2 c#4 g#3@10",
  D: "[[a3,c#4,f#4]@3 [a3,c#4,f#4]@2 [a3,c#4,f#4]@3 [a3,c#4,f#4]@16 [a3,c#4,f#4]@3 [a#3,d4,g4]@2 [b3,d#4,g#4]@3]/2", // F#m Gm G#m
  E: "~ [e2,b2,e3,g#3,c#4,e4]@3", F: "[g#3,e4,g#4,c#5]", G: "[f3,a3,c4,f4]", H: "[c3,e3,g3,c4,e4]!8",
  I: "[g2,d3,g3,a#3,d4,g4]!8", J: "[a2,e3,g3,c#4,e4,a4]!8",
  K: "~@3 [f2,c3,f3,a3,c4,f4]@2 [f2,c3,f3,a3,c4,f4]@2 [f2,c3,f3,a3,c4,f4]", L: "[d3,a3,c4,f#4]!8",
  M: "[f2,c3,f3,a3,c4,f4]@3 [f2,c3,f3,a3,c4,f4]@2 [f2,c3,f3,a3,c4,f4]@2 [f2,c3,f3,a3,c4,f4]", // F
  N: "[b2,d3,e3,g3,b3,d4,e4] [b2,d3,g3,d4,e4]!7", // Em7
  O: "[e3,a#3,c4,e4] [e3,c4,e4] ~ [e3,a#3,c4,e4]!2 [e3,c4,e4] ~ [e3,a#3,c4,e4], ~ a#3@2 ~@2 a#3@2 ~", // C7 C C7 C C7
  P: "[e2,b2,e3,g#3,b3,e4]", Q: "[b3,e4,g#4,b4]",
})).s("gm_electric_guitar_jazz").gain(0.19)

// bass · acoustic bass · "paul"
const bass = note(`<
  ~ A B A C D E A F@2 G A H D I A J K@2 L M N O L P Q R S T S U V W X Y D E A F@2 G A Z D I AA AB
>`.pickRestart({
  A: "e2@3 e3 e3@4", B: "e2@6 e3!2 e3@8", C: "e2@6 e3!2 e3@2 c#2@2 g#2@2 b2@2, ~@12 f#2 ~@3", D: "f#2@3 e3 e3@4",
  E: "f#2@3 e3 e3@2 b2@2", F: "[e2@3 e3 g#2 a2 b2 f#2@4 e3 e3@4]/2", G: "f#2@6 e3 ~ e3@4 b2@4",
  H: "e2@6 e3!2 e3@2 g#2@2 a2@2 b2@2", I: "f#2@6 e3!2 e3@4 b2@4", J: "e2@3 b2 e3@2 b2@2", K: "[g2@7 ~]/2", L: "c2",
  M: "c2@6 ~ f2", N: "g2", O: "a2@4 e2 a1 c#2 e2", P: "c2@3 e2", Q: "g2@3 g2 g2@2 e2@2", R: "a2@3 a2 a2@4",
  S: "f2@3 f2@4 ~", T: "d2@3 d2 d2@3 e2", U: "d2@3 d3 d2@4", V: "c2@3 c2 c2@2 d2@2", W: "e2@6 f2 g2",
  X: "c2@8 g2 a2 c3@2 a2@2 g2@2", Y: "f2@6 f2 ~ f2@2 ~@2 g2@2 ~@2", Z: "e2@6 e3!2 e3@2 g#2@2 ~@2 b2@2, ~@3 a2",
  AA: "e2@6 e3!2 e3@4 b2@4", AB: "e2",
})).s("gm_acoustic_bass").gain(0.32)

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

// drums · hihat
const hihat = s("hh").struct("<~@5 [~ x ~ x]!12 ~@2 [~@4 x ~@6 x ~@4] [~ x ~ x]!7 ~@8 [~ x ~ x]!10 ~@2>").gain(0.17)

// drums · crash
const crash = s("cr").struct("<~@45 x ~>").gain(0.17)

// drums · ride
const ride = s("rd").struct("<~ A ~ A@15 ~ A@8 ~@8 A@10 ~@2>".pickRestart({
  A: "x",
})).gain(0.17)

stack(rock_organ, electric_guitar_jazz, bass, kick, hihat, crash, ride)

More by The Beatles