Strudelify
KeyA majorTempo120 bpm
0:00/0:00
// Ibiza — Barry & Eileen
// 120 bpm, 4/4, key A major. Source: midi.
// Generated by strudelify. One cycle = one bar.
// note: pitch bends are ignored
// note: duplicate parts dropped: ch 11 acoustic guitar steel (copy of ch 12 acoustic guitar nylon)
// note: Full arrangement: all 99 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 · dulcimer
const dulcimer = note(`<
  ~@13 A@2 B A@3 B A@3 B A@3 B A@3 B A@3 B A ~@4 A@2 B A@3 B A@3 B A@3 B A@3 B A@3 B A B A ~@8 A@2 B A@3 B A@3 B A@3 B
  A@3 B A@3 B C
>`.pickRestart({
  A: "~@2 [a4,c#5]@2 f#4 ~ e4 ~ [a4,c#5]@4 f#4@2 e4 ~", B: "~@2 [g#4,b4]@2 f#4 ~ e4 ~ [g#4,b4]@4 f#4@2 e4 ~",
  C: "~@2 [a4,c#5]@2 f#4 ~ e4 ~ [a4,c#5]@4 ~@4", // A
})).s("gm_dulcimer").gain(0.45).pan(1)

// other · lead 2 sawtooth
const lead_2_sawtooth = note(`<
  ~ A B C D A B C A@2 B C A@2 B C A@2 B C A@2 B C A E B C A@2 B C A E B C A@2 B C D A B C A@2 B C A@2 B C A E B C A@2 B
  C A E B C A C A F G H I F G H F A B C A E B C A@2 B C A E B C A@2 B C A E B C J
>`.pickRestart({
  A: "a2 a3 a2 a3 a2 a3 a2 a3", B: "b2 b3 b2 b3 b2 b3 b2 b3", C: "e2 e3 e2 e3 e2 e3 e2 e3",
  D: "a2 a3 a2 a3 c#3 c#4 b2 b3", E: "f#2 f#3 f#2 f#3 f#2 f#3 f#2 f#3", F: "[a1,a2]", G: "[g1,g2]", H: "[f1,f2]",
  I: "[e1,e2]", J: "a2 a3 a2 a3 ~@4",
})).s("gm_lead_2_sawtooth").gain(0.16)

// other · music box
const music_box = note(`<
  ~@21 A B@2 A C@2 B A@2 B@2 A C@2 B A ~@12 A B@2 A C@2 B A@2 B@2 A C@2 B A B A ~@8 A B@2 A C@2 B A@2 B@2 A C@2 B A@2
  B@2 A C@2 B D
>`.pickRestart({
  A: "a5!2 e6!2 f#6!2 e6!2 a5!2 e6!2 f#6!2 e6!2", B: "b5!2 e6!2 f#6!2 e6!2 b5!2 e6!2 f#6!2 e6!2",
  C: "f#5!2 a5!2 b5!2 c#6!2 f#5!2 a5!2 b5!2 c#6!2", D: "a5!2 e6!2 f#6!2 e6 ~@9",
})).s("gm_music_box").gain(0.14).pan(0)

// bass · synth bass 1
const bass = note(`<
  ~ A B C D A B C A@2 B C A@2 B C A@2 B C A@2 B C A E B C A@2 B C A E B C A@2 B C D A B C A@2 B C A@2 B C A E B C A@2 B
  C A E B C A C A F G H I F G H F A B C A E B C A@2 B C A E B C A@2 B C A E B C J
>`.pickRestart({
  A: "a1 a2 a1 a2 a1 a2 a1 a2", B: "b1 b2 b1 b2 b1 b2 b1 b2", C: "e1 e2 e1 e2 e1 e2 e1 e2",
  D: "a1 a2 a1 a2 c#2 c#3 b1 b2", E: "f#1 f#2 f#1 f#2 f#1 f#2 f#1 f#2", F: "[a1,a2]", G: "[g1,g2]", H: "[f1,f2]",
  I: "[e1,e2]", J: "a1 a2 a1 a2 a1 a2 ~@2",
})).s("gm_synth_bass_1").gain(0.42)

// chords · percussive organ
const percussive_organ = note(`<
  ~@5 A B C A@2 B C A@2 B C A@2 B C A@2 B C A@2 B C A@2 B C A@2 B C A ~@4 A B C A@2 B C A@2 B C A@2 B C A@2 B C A@2 B C
  A C A ~@8 A B C A@2 B C A@2 B C A@2 B C A@2 B C A@2 B C D
>`.pickRestart({
  A: "~@2 [a4,c#5,e5] ~ [a4,c#5,e5] ~ [a4,c#5,e5] ~@3 [a4,c#5,e5] ~ [a4,c#5,e5] ~ [a4,c#5,e5] ~", // A
  B: "~@2 [f#4,b4,d5] ~ [f#4,b4,d5] ~ [f#4,b4,d5] ~@3 [f#4,b4,d5] ~ [f#4,b4,d5] ~ [f#4,b4,d5] ~", // Bm
  C: "~@2 [e4,g#4,b4] ~ [e4,g#4,b4] ~ [e4,g#4,b4] ~@3 [e4,g#4,b4] ~ [e4,g#4,b4] ~ [e4,g#4,b4] ~", // E
  D: "~@2 [a4,c#5,e5] ~ [a4,c#5,e5] ~ [a4,c#5,e5] ~@9", // A
})).s("gm_percussive_organ").gain(0.3).pan(0.1)

// chords · lead 5 charang
const lead_5_charang = note("<~ A@3 B@2 ~@14 C D ~@15 A@3 B@2 ~@6 C D ~@15 E F ~@15 C D ~@6 C D ~@7>".pickRestart({
  A: "~@2 [e4,c#5]@2 [d4,b4]@2 [c#4,a4] ~ [e4,c#5]@4 [d4,b4]@2 [c#4,a4]@2", // C#m G F#m C#m G F#m
  B: "[[c#4,a4]@5 ~ [e4,g#4]@2 [e4,g#4]@2 [d4,f#4]@2 [d4,f#4]@2 [c#4,e4]@6 ~@12]/2", // F#m E D C#m
  C: "~@6 [g#4,c#5] ~ [g#4,c#5]@2 [f#4,b4] ~ [f#4,b4]@2 [e4,a4] ~", D: "[e4,a4] ~",
  E: "~@2 [b3,e4] f#3@2 [e3,g#3] [c#4,e4] ~, ~@6 b3 ~@9", F: "[b3,d4]@2 [a3,c#4]@2 ~@2 [a3,c#4]@9 ~",
})).s("gm_lead_5_charang").gain(0.48)

// other · acoustic guitar nylon
const acoustic_guitar_nylon = note("<~@66 A B C D E F G H I J ~@23>".pickRestart({
  A: "~@14 b3 [c4,d4]", B: "e4@6 d4 e4", C: "g4@2 f4 e4 d4@6 b3@2 c4@2 d4@2",
  D: "e4 d4 c4 b3 d4 c4 b3 a3 c4 b3 a3 g3 b3 a3 g3 f3", E: "e3", F: "c5 b4 a4 c5 b4 a4 c5 b4 a4 c5 b4 a4 c5 b4 a4@2",
  G: "d5 c5 b4 d5 c5 b4 d5 c5 b4 d5 c5 b4 d5 c5 b4@2", H: "e5 d5 c5 e5 d5 c5 e5 d5 c5 e5 d5 c5 e5 d5 c5@2",
  I: "e5 f5 e5 d5 e5@5 e3 f#3 g#3 a3 b3 c#4 d4", J: "e4@3 ~",
})).s("gm_acoustic_guitar_nylon").gain(0.48)

// chords · acoustic guitar steel
const acoustic_guitar_steel = note("<~@66 A@3 B@6 ~@24>".pickRestart({
  A: "[~@16 [a3,c4,e4,a4]@15 ~ [d4,g4,b4]@15 [f3,a3], ~@15 [a2,e3]@16 [d3,g3]@16 ~]/3", // Am G F A5 G5
  B: "[[c4,f4,a4]@15 ~ [b3,e4,g#4,b4]@15 ~ [a3,c4,e4,a4]@15 ~ [d4,g4,b4]@15 ~ [c4,f4,a4]@15 ~ [a3,c#4,e4,a4]@16, ~@15 [b2,e3]@16 [a2,e3]@16 [d3,g3]@16 [f3,a3]@16 [a2,e3]@16 ~]/6", // F E Am G F A E5 A5 …
})).s("gm_acoustic_guitar_steel").gain(0.24).pan(0.4)

// drums · kick
const kick = s("bd").struct("<~ [x!4]!97 [x!3 ~]>").gain(0.4)

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

// drums · low tom
const low_tom = s("lt").struct("<A ~@11 B ~@7 A ~@7 A ~@7 A ~@11 A ~@7 A ~@9 A ~@7 A ~@7 A ~@7 A ~@8>".pickRestart({
  A: "~@7 x", B: "~@6 x!2",
})).gain(0.46)

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

// drums · mid tom
const mid_tom = s("mt").struct("<~@12 A ~@7 B ~@7 B ~@7 B ~@11 B ~@7 B ~@9 C ~@7 B ~@7 B ~@7 B ~@8>".pickRestart({
  A: "~@10 x!2 ~@4", B: "~@3 x", C: "~@9 x ~@2 x ~@3",
})).gain(0.46)

// drums · open hat
const open_hat = s("oh").struct("<~@28 A ~@7 A ~@19 A ~@7 B ~@17 A ~@7 A ~@7 A>".pickRestart({
  A: "~@3 x ~@4", B: "~@5 x ~ x",
})).gain(0.35)

// drums · high tom
const high_tom = s("ht").struct("<~@28 A ~@7 A ~@19 A ~@9 B ~@7 A ~@7 A ~@7 A ~@8>".pickRestart({
  A: "~@10 x!2 ~@4", B: "~@8 x ~ x!2 ~@4",
})).gain(0.4)

// drums · crash
const crash = s("cr").struct(`<
  ~ A ~@2 B A ~@7 A ~@7 A ~@7 A ~@7 A ~@2 B A ~@7 A ~@7 A ~@7 A ~ A ~@15 A ~@7 A ~@7
>`.pickRestart({
  A: "x", B: "~@2 x!2",
})).gain(0.29)

// drums · rim
const rim = s("rim").struct("<~@67 [~@2 x!3 ~@11]!8 ~@24>").gain(0.46)

stack(
  dulcimer, lead_2_sawtooth, music_box, bass, percussive_organ, lead_5_charang, acoustic_guitar_nylon,
  acoustic_guitar_steel, kick, snare, low_tom, hihat, mid_tom, open_hat, high_tom, crash, rim
)