Strudelify

A Lover's Concerto

Toys

KeyC majorTempo138 bpm
0:00/0:00
// A Lover's Concerto — Toys
// 138 bpm, 4/4, key C major. Source: midi.
// Generated by strudelify. One cycle = one bar.
// note: Full arrangement: all 35 bars on a 16-step grid, each part at one level; ghost notes are separate "_soft" parts. Source detail keeps the original performance.
setcpm(138/4)

// Notation: c3@3 lasts 3 steps · ~ is a rest · [c3,e3] is a chord · "a, b" plays two voices at once.
// A part's distinct bars are riffs (A, B, C...) played in order: edit a riff to change every repeat.

// bass · fretless bass · "Bass    (BB)"
const bass = note("<~ A B C D E F G H I J K L M N O P Q R S T U V W X A Y Z L AA AB O AC AD AE>".pickRestart({
  A: "c2 ~ c2@4 c2 ~ c2 ~ c2@4 c2 ~", B: "e2 ~ e2@3 ~ e2 ~ g1@2 a1@2 b1@2 e2 ~", C: "f2 ~ f2@5 f1 g2 ~ g2@4 g2 ~",
  D: "c2 ~ c2@4 g1 ~ a1@2 c2 ~ a1 ~ a1 ~", E: "d2 ~ d2@4 d2 ~ g2 ~ g2@5 g1", F: "c2 ~ c2@4 c2!2 a1@2 e2 ~ a2 ~ a1 ~",
  G: "g2 ~ g2@4 f2 ~ c2 ~ c2 ~ a1@4", H: "d2 ~ d2@4 d2!2 g2 ~ g2 ~ g2@2 d2 ~",
  I: "c2 ~ c2@4 c1@2 c2 ~ c2@4 g1@2, ~@14 c1 ~", J: "e2 ~ e2@4 b1@2 e2@2 e2 ~ e2 ~ e2 ~",
  K: "f2 ~ f2@4 c3 a#2 g2 ~ g2@4 d2 ~", L: "c2 ~ c2@4 g1 ~ a1@2 a1 ~ a1 ~ a1 ~", M: "d2 ~ d2@4 d2 e2 g2 ~ g2@4 b1 ~",
  N: "c2 ~ c2@4 g1 ~ a1 ~ a1 ~ a1@2 e1 ~", O: "d2 ~ d2@4 d2!2 g2 ~ g2@4 e2 b1", P: "c2 ~ c2@4 e2 ~ g2@2 d2 ~ g2 ~ g2 ~",
  Q: "c2 ~ c2@2 c2 ~ c2@2 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3 d4", // Dm7 G7
  U: "[g3,c4,e4]@4 c4 ~ e4 g4 [b3,d4,f4,g4]@4 f3 g3 b3 d4", // C G7
  V: "~@2 [g3,c4,e4] ~ [g3,c4,e4] ~ [g3,c4,e4] ~ [g3,c4,e4] ~ [g3,c4,e4]@5 c3", // C
  W: "~@2 [g3,b3,e4]@5 ~ [g3,b3,e4] ~ [g3,b3,e4]@6", X: "[a3,c4,f4]@8 [b3,d4,f4,g4]@4 f3 g3 b3 d4",
  Y: "[g3,c4,e4]@8 [a3,c4,e4] ~ [a3,c4,e4]@5 ~", Z: "[c4,d4,f4,a4]@4 c4 d4 f4 a4 [b3,d4,f4,g4]@4 f3 g3 b3 d4",
  AA: "[g3,c4,e4]@8 ~@2 [b3,d4,f4,g4] ~ [b3,d4,f4,g4] ~ [b3,d4,f4,g4] ~", // C G7
  AB: "[b3,d4,f4,g4] ~ [b3,d4,f4,g4]@2 [c4,e4,g4] ~ [c4,e4,g4]@2 [b3,d4,f4,g4] ~ [b3,d4,f4,g4]@2 [c4,e4,g4] ~ [c4,e4,g4] ~", // G7 C G7 C
  AC: "[b3,d4,f4,g4] ~@5 [b3,d4,f4,g4]@5 ~@5", // G7
})).s("gm_epiano1").gain(0.36)

// drums · kick
const kick = s("bd").struct("<~ A B A B A B A B A B A B A B A C D@7 E A B A D A B A F B G>".pickRestart({
  A: "x ~@2 x!2 ~@2 x", B: "x ~@2 x!3 ~ x", C: "~ x ~@6", D: "x!2 ~ x!3 ~ x", E: "~ x!2 ~ x!2 ~@2", F: "x!2 ~ x ~@4",
  G: "~ x ~ x ~@2 x ~",
})).gain(0.36)

// drums · rim
const rim = s("rim").struct("<[x!4] ~@34>").gain(0.36)

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

// drums · low tom
const low_tom = s("lt").struct("<~@24 [~@3 x] ~@3 [~@2 x!6] ~@6>").gain(0.36)

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

// drums · mid tom
const mid_tom = s("mt").struct("<~@16 [~@4 x!2 ~@2] ~@7 [~@3 x ~@2 x ~] ~@10>").gain(0.41)

// drums · open hat
const open_hat = s("oh").struct("<~@2 A ~@5 A ~@2 B A ~@5 C ~ B ~ C ~@3 A ~@4 B D ~@2>".pickRestart({
  A: "~@7 x", B: "~@15 x", C: "~@3 x ~@4", D: "~ x ~@2",
})).gain(0.31)

// drums · high tom
const high_tom = s("ht").struct("<~@16 [~ x ~@2] ~@7 x ~@10>").gain(0.41)

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

// drums · tambourine
const tambourine = s("tb").struct("<~@17 [x!8]!7 ~@4 [x!8] ~@6>").gain(0.41)

// drums · cabasa
const cabasa = s("cabasa:4").struct("<~@17 [~ x ~ x ~ x ~ x]!7 ~@4 [~ x ~ x ~ x ~ x] ~@6>").gain(1.56)

// drums · shaker
const shaker = s("sh").struct("<~@17 [x!4]!7 ~@4 [x!4] ~@6>").gain(0.41)

// drums · shaker · soft notes
const shaker_soft = s("sh").struct("<~@17 [~ x ~ x ~ x ~ x]!7 ~@11>").gain(0.26)

stack(
  bass, epiano1, kick, rim, snare, low_tom, hihat, mid_tom, open_hat, high_tom, crash, tambourine, cabasa, shaker,
  shaker_soft
)