Strudelify
0:00/0:00
// hallelujah — Leonard CohenInspired by Tori Kellyarr. Olivia Edwards
// 96 bpm, 6/8, key E major. Source: midi.
// Generated by strudelify. One cycle = one bar.
// note: sustain pedal (CC 64) lengthens the held notes
// note: Transcription provider: pdmx. https://musescore.com/score/5901338; license: https://creativecommons.org/publicdomain/zero/1.0/
// note: Full arrangement: all 106 bars on a 24-step grid, each part at one level. Source detail keeps the original performance.
setcpm(96/3)

// 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
const piano = note(`<
  A@2 B@2 C D E F G H G I J K L M N O P Q R S T U V W X@2 Y@2 Z@2 Y@2 AA AB AC H AC H G I AD AE AF AG P Q R AH AI U V W
  AJ@2 Y@2 Z@2 Y@2 AA AB AC H AC H G I AK AE AL AM P AN R AH AI U V W X@2 Y@2 Z@2 Y@2 AA AO Y@2 Z@2 Y@2 AA AB AC H AC H
  AP@2
>`.pickRestart({
  A: "[[a2,c#3,c#4,e4]@6 ~ [b2,f#3,b3,d#4,f#4], ~@3 [a2,e3,a3,c#4,e4]]/2", // A B A
  B: "[~@3 c#4, [c#3,g#3,f#4,g#4], c#4@3 ~, ~ e4@3, ~ d#4]/2", // C#sus4
  C: "~@5 a3, [a2,c#5,e5,e6], a4 [e4,a4,d#5,d#6], ~ e3@3 e3@2, ~@2 a3@3 ~", // A
  D: "~@5 a3, [a2,c#5,c#6], [e4,a4] [c#4,e4,a4,a5], ~ e3@3 e3@2, ~@2 a3@3 ~", // A A5 A
  E: "~@5 g#4, [e2,e4]@2 a4, g#4 b3, b3 e3@2, ~ b2@5", F: "~ f#3, [b1,b3,d#4,f#4], ~ f#2@5, ~ b2@2",
  G: "~@5 d#2, e2@2 e2, g#3 [g#3,b3], ~ b2@5, ~ e3@2", H: "~@5 d#2, c#2@2 c#2, g#3 [g#3,c#4], ~ g#2@5, ~ c#3@2",
  I: "~@3 [e3,c#4]@2 g#3, [c#2,g#3] ~, ~ g#2@2 ~@3, ~@2 c#3@3 ~", // C#m C#5
  J: "~@2 b3 ~@2 [d#2,b3], g#3, e2@3 b3 e2@2, b3 e3@2, ~ b2@5", // G#m
  K: "c#4!2 ~@3 [d#2,g#3], e3, c#2@2 c#2, ~ g#2@5, ~ [c#3,c#4]@2", // G#5 C#
  L: "b3!2 ~@2 b3 [d#2,b3], e2 g#3, g#3 b3 e2, ~ b2@5, ~ e3@2", // G#m
  M: "c#4!2 ~@3 [b1,b3], e3, c#2@2 c#2, ~ g#2@5, ~ [c#3,c#4]@2", // B C#
  N: "c#4 ~@3 c#4 [a1,c#4], a3, a1@2 e2, ~ [e2,c#4]@2 e3@3, ~ a2@2", // A C#m
  O: "~@2 b3 ~@2 [b1,a3], [d#3,c#4], b1@2 f#2, ~ f#2@2 [f#3,b3]@3, ~ b2@2", // B7 D#7 B5
  P: "~@5 e2, g#3, e2@2 b2, b3 e3@2, ~ b2@2 b3@3",
  Q: "~@5 [b1,a3], f#3, [b1,e3]@3 ~ [f#2,g#3]@2, ~ f#2@2 d#3@3, ~ b2@2", // B7 E5 F#sus2
  R: "~@2 b3 ~@2 [b1,b3], [e1,g#3], b3@2 e2 b3 e2@2, ~ b1@4 ~, ~ g#2", // B E
  S: "~@2 [a2,c#4] ~@2 [b2,b3], [a1,a3] [b1,d#4], c#4@2 ~ b3@2 ~, ~ e2@2 ~ f#2@2", // A B A B
  T: "~@4 e4@2 ~@5 b3, c#2, c#4@2 c#3, e4@2 c#3 [e3,e4]@3, ~ g#2@4 [g#2,c#4]", // E C#5
  U: "~@5 [e2,e4], a1, a3@2 a2 [c#3,a3,f#4]@3, e4!2 a2, ~ e2@4 ~", // E F#m
  V: "~@2 f#4 ~@2 [f#2,f#4], [b1,b3], f#4@2 b2 f#4 b2@2, ~ f#2@4 ~, ~ d#3", // F# B
  W: "~@2 g#4 ~@2 [d#2,f#4], g#1, g#3 [b2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 e3@6 ~@3, c#4 e4@5 ~@2, ~ g#2 c#4@7 ~@3]/2", // E G#m
  AK: "~@4 b3@2 ~@5 b3, e2@2 e2, g#3@3 [g#3,b3]@2 [d#2,g#3], b3 e3@2, ~ b2@5", // G#m G#5
  AL: "~@2 c#4 ~@2 [a1,c#4], a3, a1@3 c#4 e2@2, c#4 a2@2, ~ e2@2 e3@3", // A
  AM: "~@5 [b1,g#3], [d#3,c#4], b1@2 [f#2,b3], ~ [f#2,b3]@2 f#3@3, ~ b2@2", // E D#7 B5
  AN: "~@5 [b1,g#3], f#3, [b1,e3]@3 ~ f#2@2, ~ f#2@2 d#3@3, ~ b2@2", AO: "~@5 b3, [b1,d#3,f#3], ~ f#2@2, ~ [b2,g#3]",
  AP: "[[b2,e3,g#3,e4,g#4,b4]@2 ~]/2", // E
})).s("gm_piano").gain(0.35)

// chords · string ensemble 1 · "Violins"
const string_ensemble_1 = note(`<
  A@2 B@2 C@3 D E@2 F G H I H I J K L M N O I J P Q R I S T U I V W X M Y I H I H I H I J K L M Z AA AB AC AD AE AB AF S
  T U I V W X M Y I H I H I H I J K L M Z AA AB AC AD AE AB AF S T U I V W X M S T U I V W X M AG@2 AH AI AJ@2
>`.pickRestart({
  A: "[[c#5,e5]@6 [a4,c#5,e5] [b4,d#5,f#5]]/2", B: "[c#5,g#5]/2", C: "e6/3", D: "b5", E: "g#5/2", F: "e5", G: "e5 ~",
  H: "[g#3,b3,e4]", I: "[g#3,c#4,e4]", J: "[a3,c#4,e4]", K: "[a3,c#4,e4] [b3,d#4,f#4]", L: "g#4@4 a4 g#4",
  M: "[b3,d#4,f#4]", N: "[g#3,b3]", O: "[a3,c#4] [b3,d#4]", P: "[b3,d#4,f#4]!2", Q: "[c4,d#4,g#4]!2",
  R: "[g#3,c#4,e4]!2", S: "e4@2 [a4,c#5] [f#4,b4,d#5], [a3,c#4], ~ e4", T: "[a4,c#5,e5]",
  U: "e4@2 [g#4,c#5] [d#4,f#4,b4], [a3,c#4], ~ e4", V: "[a3,c#4,e4] [c#4,e4,a4]", W: "[e4,a4,c#5] [c#4,e4,a4]",
  X: "g#4@4 a4 g#4, [b3,e4]", Y: "[g#3,b3,e4]@4 f#4 g#4", Z: "[e4,g#4,b4]!2", AA: "[e4,a4,c#5] [f#4,b4,d#5]",
  AB: "[g#4,c#5,e5]!2", AC: "[a4,c#5,e5]!2", AD: "[b4,d#5,f#5]!2", AE: "[c5,d#5,g#5]!2", AF: "[g#4,c#5,e5]",
  AG: "[b3 g#3 ~ [g#3,c#4], [e4,g#4], ~ b3@3]/2", AH: "g#3 [g#3,b3]", AI: "g#3 [g#3,c#4]", AJ: "[[e4,g#4,b4]@2 ~]/2",
})).s("gm_string_ensemble_1").gain(0.23)

// other · string ensemble 1 · "Violoncellos"
const string_ensemble_1_2 = note(`<
  ~@4 A B C D@2 E D F G@5 H I J K L G M N O P Q R@6 G S T U G U G@5 H I J K L G M N O P Q R@6 G S T U G U G@5 H I J K L
  G M N O P Q R@6 G S R V R V R@2 G S W X W X Y@2
>`.pickRestart({
  A: "b3@2 a3 b3@2 a3", B: "b3 c#4 b3", C: "b3@4 c#4 b3", D: "b3", E: "c#4", F: "c#4 ~", G: "e2", H: "a1",
  I: "[e2,b3,e4]", J: "b1", K: "[e2,e3,g#3]", L: "[c#3,e3] [b2,f#3]", M: "a2", N: "a2@3 b2@2 b1", O: "c2@3 c3@2 b1",
  P: "c#2@3 b2@2 g#2", Q: "c#2", R: "c#2!2", S: "b2", T: "g#2", U: "~@4 e3 f#3, e2", V: "c#2@3 ~ e3 f#3, ~ c#2",
  W: "g#3 [g#3,b3], g#2", X: "g#3 [g#3,c#4]", Y: "[[e2,g#2,b2]@2 ~]/2",
})).s("gm_string_ensemble_1").gain(0.16)

stack(piano, string_ensemble_1, string_ensemble_1_2)