Strudelify
KeyE♭ majorTempo158 bpm
0:00/0:00
// happy — Wurlitzer Electric Piano
// 158 bpm, 4/4, key Eb 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/6113648; license: https://creativecommons.org/publicdomain/zero/1.0/
// note: Full arrangement: all 81 bars on a 16-step grid, each part at one level. Source detail keeps the original performance.
setcpm(158/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
const piano = note(`<
  A B C D@2 E@2 D@2 F@2 G@2 H@2 I@2 J K L M J K L M J K L M J K L M N O N O N O N O N O N O N O N O ~@32
>`.pickRestart({
  A: "[a3,c4,eb4,f4] ~ [a3,c4,eb4,f4] ~ [a3,c4,eb4,f4] ~ [a3,c4,eb4,f4] ~", B: "[a3,c4,eb4,f4] ~@2 c4 eb4 f4 ~ f4",
  C: "~ c4@2 c4 eb4!2 f4@2",
  D: "[[f2,a3,c4,eb4,f4]@2 [ab2,ab3,c4,eb4]@2 [bb2,bb3,d4,f4]@2 ab2 c3@2 bb2 ab2 [bb2,bb3,d4,f4]@3 [ab2,ab3,c4,eb4]@2, ~@7 [c4,e4,g4]@3 ~@6]/2", // F7 Ab Bb Ab C
  E: "[[f2,a3,c4,eb4,f4]@2 ~@2 ab4 ~ ab4@6 ab4 ~ ab4@4 eb4@4 eb4@2 eb4@2 c4@2 f4@4]/2", // F7
  F: "[[f2,a3,c4,eb4,f4] ~ eb4@2 f4@2 eb4 g4@2 eb4@2 eb4!2 c4 f4@2]/2", // F7
  G: "[[f2,a3,c4,eb4,f4]@2 [ab2,ab3,c4,eb4]@2 [bb2,bb3,d4,f4]@2 ab2 c3@2 bb2 ab2 [bb2,bb3,d4,f4]@3 [ab3,c4,eb4] eb4, ~@7 [c4,e4,g4]@3 ~@4 ab2@2]/2", // F7 Ab Bb Ab C
  H: "[[f2,a3,c4,f4]@2 ~@4 c4@2 eb4@2 d4@4 c4@6 bb3@2 ab3@2 bb3@2 ab3@2 c4@3 bb3, eb4 ~@7]/2", // F
  I: "[[f2,a3,c4,eb4,f4]@2 [ab2,ab3,c4,eb4]@2 [bb2,bb3,d4,f4]@2 ab2 c3@2 bb2 ab2 [bb3,d4,f4]@2 c4 [ab2,ab3,c4,eb4]@2, ab3 ~@13 [c4,e4,g4]@6 ~@2 bb2@6 ~@4]/2", // F7 Ab Bb Ab C
  J: "[db3,db4,f4,ab4,c5,db5]@15 ~", K: "[c3,c4,eb4,g4,ab4,c5]@15 ~", L: "[bb2,bb3,c4,eb4,g4,bb4,c5]@15 ~",
  M: "[a2,a3,c4,eb4,f4,a4] ~@7", N: "[ab5,c6]!2 ~ c3 [eb3,g5,bb5] [f3,g5,bb5] ~ f3",
  O: "[f5,ab5] [c3,f5,ab5] ~ c3 [eb3,eb5,g5]!2 f3@2", // Fm Eb
})).s("gm_piano").gain(0.3)

// chords · piano · "Options"
const piano_2 = note("<~@49 A B C D A B C D E F G H E F G H A B I D A B I D A B J D A B J D>".pickRestart({
  A: "[f4,ab4,c5,db5] [f4,ab4,c5,db5]@7, [db3,db4]", B: "[c3,c4,eb4,g4,ab4,c5]", C: "[bb2,bb3,c4,f4,g4,bb4]",
  D: "[a2,a3,c4,eb4,f4,a4] ~@7", E: "[db4,f4,ab4,db5] [db4,f4,ab4,db5]@7, db3", F: "[c3,c4,eb4,ab4,c5]",
  G: "[bb2,bb3,c4,eb4,g4,bb4,c5]", H: "[a2,a3,c4,f4,a4] ~@7", I: "[bb2,bb3,c4,f4,bb4,c5]",
  J: "[bb2,bb3,c4,eb4,f4,g4,bb4]", // Cm7
})).s("gm_piano").gain(0.3)

// drums · kick
const kick = s("bd").struct("<~ [~@3 x ~ x ~ x] [x ~@2 x ~ x ~ x]!31 ~@48>").gain(0.19)

// drums · rim
const rim = s("rim").struct("<~@17 [~ x ~ x]!16 ~@48>").gain(0.19)

// drums · clap
const clap = s("cp").struct("<~@17 A B A B A B A B A B A B A B A B C D C D C D C D C D C D C D C D ~@32>".pickRestart({
  A: "~ x ~ x", B: "~@2 x ~@3 x!2", C: "~ x!3 ~ x!3", D: "~ x!7",
})).gain(0.19)

// drums · snare
const snare = s("sd").struct("<~ [~ x ~ x]!16 ~@64>").gain(0.19)

// drums · hihat
const hihat = s("hh").struct("<~ [~ x ~ x] [x!2 ~ x]!31 ~@48>").gain(0.19)

// drums · open hat
const open_hat = s("oh").struct("<~ [~ x]!32 ~@48>").gain(0.19)

// drums · congas
const congas = s("conga:18").struct("<~@33 [x ~@2 x ~ x ~@2]!16 ~@32>").gain(0.61)

// drums · congas
const congas_2 = s("conga:33").struct("<~@33 [~@6 x!2]!16 ~@32>").gain(0.61)

stack(piano, piano_2, kick, rim, clap, snare, hihat, open_hat, congas, congas_2)