Strudelify

Rhythm of the Rain

Cascades

KeyE majorTempo120 bpm
0:00/0:00
// Rhythm of the Rain — Cascades
// 120 bpm, 4/4, key E major. 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 72 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 · piano · "Ac Piano"
const piano = note(`<
  ~ A B C D E F G@2 H I J@2 E F G@2 H I J@2 K L M N@2 O P Q E F G@2 H I J@2 E F G@2 H I J@2 K L M N@2 O P Q E F G@2 H I
  R S A B A B A B A B T@2 ~
>`.pickRestart({
  A: "e4@2 b4 [e5,g#5] b5 ~ e6@2 b5@2 g#5@2 e5@2 g#5 ~", // E
  B: "~@3 g#5 c#6@2 e6@2 c#6@2 g#5@2 e5@2 g#5 ~, c#4@13 ~@3, ~@2 g#4@11 ~@3, ~@3 e5@2 ~@11",
  C: "~@3 g#5 b5@2 e6@2 b5@2 g#5@2 e5@2 g#5 ~, e4@3 ~, ~ b4@5 ~@2, ~@3 e5@2 ~@11",
  D: "~@6 d#5@2 ~@4 d#5@2 b4 ~, b3, ~@2 f#4@13 ~, ~@4 b4@6 f#5@5 ~, ~@8 b5@7 ~",
  E: "g#4 [b3,g#4,b4] b3!3 [b3,f#4] ~ e4, [c#4,c#5]@3 [b3,f#4], e3@3 e3@5, ~ b4@3, ~ g#4 g#4@2", // E B5 C# B5
  F: "~@2 e4 ~@4 c#4, [a2,f#4], e3@4 e3 a3@3, c#4@3 e4@5, ~@3 c#4@3 e3@2", // D
  G: "[~ b3 [b3,f#4,b4]@2 [b3,b4]@2 b3@2 b3@2 ~@6 b3 ~@11 b2@2 [b2,c#4]@2, ~@2 f#4@3 [b3,f#4]@3 b2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3 d#4@2 ~@6", // Asus2 B Asus2 B7
  R: "~@6 f#4@2 b3 ~@4 e4 [a3,e4]@2, [e3,g#3,b3] b2, e4@2 e4@2 a3@3 ~, ~ f#4@2 ~@2 d#4@3", // A5 E
  S: "~@12 f#4@2 g#4 ~, e4@8 b3@2 e4@5 ~, ~@2 e3@13 ~, ~@4 f#3@11 ~, ~@6 g#3@9 ~",
  T: "[~@3 [b5,e6]@29, e5, ~ g#5@30 ~]/2", // E5
})).s("gm_piano").gain(0.32).pan(0.2)

// bass · fretless bass · "El Bass"
const bass = note(`<
  ~ A B C D E F G D G H I J E F G D G H I K L M N O P Q R S E F G D G H I J E F G D G H I K L M N O P Q R S E F G D G H
  I T A B A B A B A B U@3
>`.pickRestart({
  A: "e2@5 ~ e2 ~ b1@4 e2@3 ~", B: "c#2@5 ~ c#2 ~ g#1@4 c#2@3 ~", C: "e2@5 ~ e2 ~ b1@3 ~ e2@4",
  D: "b1@5 ~ b1@2 f#2@4 b1@4", E: "e2@5 ~ e2@2 b1@3 ~ e2@4", F: "a1@5 ~ a1@2 c#2@3 ~ e2@2 c#2 ~",
  G: "e2@5 ~ e2@2 b1@4 e2@4", H: "a1@5 ~ a1@2 c#2@4 e2@2 c#2@2", I: "e2@5 ~ e2@2 b1@5 ~ b1@2",
  J: "e2@5 ~ e2@2 b1@4 b1@3 ~", K: "e2@5 ~ e2@2 f#1@4 g#1@3 ~", L: "a1@5 ~ a1 ~ a1@4 ~@2 a2@2",
  M: "g#2@5 ~ g#2@7 ~ g#2@2", N: "f#2@5 ~ f#2@7 ~ f#2@2", O: "e2@5 ~ e2@8 b1@2", P: "c#2@5 ~ c#2 ~ g#2@4 c#2@3 ~",
  Q: "f#2@5 ~ f#2@2 b1@3 ~ b1@4", R: "e2@5 ~ e2@6 g#1@2 a1@2", S: "b1@5 ~ b1 ~ b1@3 ~ b1@3 ~",
  T: "e2@5 ~ e2 ~ b1@4 c#2@2 b1 ~", U: "[e1@19 ~@5]/3",
})).s("gm_fretless_bass").gain(0.52)

// other · glockenspiel · "Bell"
const glockenspiel = note(`<
  ~@29 A B C D A E F ~ A B C D A E F ~ G H I J K L M N A B C D A E F ~ O P Q R S T U V D ~@2
>`.pickRestart({
  A: "c#6 ~ b5 ~ b5 ~ g#5 ~ g#5 ~ f#5 ~ f#5 ~ e5 ~", B: "f#5 ~@3 e5 ~ e5 ~@9",
  C: "c#6 ~ b5 ~ b5 ~ g#5 ~ g#5 ~ f#5 ~ g#5 ~ b5 ~", D: "b5 ~@15", E: "f#5 ~@3 e5 ~ e5 ~@7 c#5 ~",
  F: "e5 ~ f#5 ~ e5 ~ f#5 ~ c#5 ~ d#5 ~@3 e5 ~", G: "c#6 ~@3 c#6 ~@3 c#6 ~@3 c#6 ~ e6 ~",
  H: "d#6 ~ b5 ~@3 b5 ~@7 g#5 ~", I: "a5 ~@3 a5 ~@3 a5 ~ g#5 ~ a5 ~ c#6 ~", J: "b5 ~ g#5 ~@3 g#5 ~@7 b4 ~",
  K: "e5 ~@3 e5 ~@3 e5 ~ d#5 ~ e5 ~ g#5 ~", L: "f#5 ~ e5 ~@3 c#5 ~@3 b4 ~@3 c#5 ~", M: "e5 ~@15", N: "b5 ~@7 b6 ~@7",
  O: "c#6 ~ b5 ~@11 g#5 ~", P: "f#5 ~ e5 ~@7 g#5 ~ b5 ~ g#5 ~", Q: "c#6 ~ b5 ~@9 g#5 ~ f#5 ~", R: "e5 ~@11 g#5 ~ b5 ~",
  S: "c#6 ~@3 b5 ~@7 g#5 ~ f#5 ~", T: "e5 ~@7 f#5 ~ e5 ~ c#5 ~ e5 ~", U: "~@8 g#5 ~@3 f#5 ~ e5 ~",
  V: "~@8 f#5 ~ e5 ~ f#5 ~ g#5 ~",
})).s("gm_glockenspiel").gain(0.17)

// chords · acoustic guitar steel · "Guitar"
const acoustic_guitar_steel = note(`<
  ~ A B C D E F G H I J K@2 E F G H I J L@2 M N O P@2 Q R S E F G H I J K@2 E F G H I J L@2 M N O P@2 Q R S E F G H I J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b2@3 b2@2 b2@3, e3 ~@15", V: "[~@2 b3@39 ~@7, b2@41 ~@7, ~ [e3,g#3]@40 ~@7]/3",
})).s("gm_acoustic_guitar_steel").gain(0.28).pan(0.8)

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

// drums · snare
const snare = s("sd").struct("<~ A@19 B A@7 B A@15 B A@7 B A@7 B A@8 ~@3>".pickRestart({
  A: "~ x ~ x", B: "~@2 x ~ x!3 ~",
})).gain(0.5)

// drums · low tom
const low_tom = s("lt").struct("<~@20 A ~@7 A ~@15 A ~@7 A ~@7 A ~@11>".pickRestart({
  A: "~@7 x",
})).gain(0.45)

// drums · hihat
const hihat = s("hh").struct("<~ A@19 B C A@6 B A@15 B ~@8 A@7 B ~@11>".pickRestart({
  A: "x!8", B: "x!5 ~@3", C: "~ x!7",
})).gain(0.35)

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

// drums · ride
const ride = s("rd").struct("<~@21 A ~@23 B C@6 D ~@8 B C@7 ~@3>".pickRestart({
  A: "x", B: "~ x!7", C: "x!8", D: "x!5 ~@3",
})).gain(0.35)

// drums · tambourine
const tambourine = s("tb").struct("<~@45 [~ x ~ x]!8 ~@8 [~ x ~ x]!8 ~@3>").gain(0.4)

// drums · triangle
const triangle = s("triangles:30").struct("<[~@11 x ~@4] ~@2 [~@4 x ~@4 x ~@6] ~@65 [~ x ~@6] ~@2>").gain(3.46)

stack(piano, bass, glockenspiel, acoustic_guitar_steel, kick, snare, low_tom, hihat, crash, ride, tambourine, triangle)