Strudelify

Professor Layton

Shiawase no Hako

KeyC majorTempo67 bpm
0:00/0:00
// Professor Layton — Shiawase no Hako
// 67 bpm, 4/4, key C major. Source: midi.
// Generated by strudelify. One cycle = one bar.
// note: Tempo changes preserved in elapsed time; displayed bars use the dominant tempo.
// note: Transcription provider: pdmx. https://musescore.com/score/4980794; license: https://creativecommons.org/publicdomain/zero/1.0/
// note: Full arrangement: all 94 bars on a 16-step grid, each part at one level; ghost notes are separate "_soft" parts. Source detail keeps the original performance.
setcpm(67/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 · acoustic guitar steel · "Acoustic Guitar"
const acoustic_guitar_steel = note("<~@37 A B A C A B D B ~@35 E F G H E F I J ~@6>".pickRestart({
  A: "[c3,e3,g3,c4,e4]@3 [c3,f3,a3,c4,f4]@5", B: "[g2,b2,d3,g3,b3,g4]@3 [a2,e3,a3,c4,e4]@5",
  C: "[g2,b2,d3,g3,b3,f4]@3 [a2,e3,a3,c4,e4]@5", D: "[c3,e3,g3,c4,e4]@6 [a2,e3,g3,c4,e4]@6 ~ f4@3, ~@3 [c3,f3,a3,c4]",
  E: "[c3,e3,g3,c4,e4] [c3,e3,a#3,c4,e4]", F: "[c3,f3,a3,c4,f4] [c3,f3,g#3,c4,f4]",
  G: "[c3,e3,g3,c4,e4] [c3,e3,g#3,c4,e4]", H: "[c3,f3,a3,c4,f4] [d3,g3,b3,g4]", I: "[c3,e3,g3,c4,e4] [a2,e3,a3,c#4,e4]",
  J: "[d3,a3,d4,f4] [d3,g3,b3,g4]", // Dm G
})).s("gm_acoustic_guitar_steel").gain(0.25)

// chords · piano
const piano = note(`<
  ~@3 A B C D@2 E F E G H I J K L M N O P Q R S T U V W X U Y Z AA AB AC AB AD AE AF AG AH AI AJ AK AL L M N O P Q R S
  AM U V W X U Y Z AA AN AO AN AP AQ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3]!2 [b2,d3]!2",
  AZ: "[e5@2 c5@2 g4@2 ~ a4@4 c5@7 f5@2 ~ e5@2 d5@2 ~ [f3,g3,c4,c5]@35 ~@3, [e3,c4]@6 ~ [f3,c4]@11 [g3,d4]@7 ~@39]/4", // Fsus2 C F5 G5
})).s("gm_piano").gain(0.27)

// other · violin
const violin = note(`<
  ~@7 A B C B D E F G H ~@9 I J K L M N O P@2 ~@3 B C B D E F G Q@2 R@4 S@4 T@2 U V W@5 ~@9 T@2 U X Y@4 T@2 U X Z@4 ~@6
>`.pickRestart({
  A: "~@14 c5 d5", B: "e5 c5 g4 a4@2 c5@3", C: "b4@2 c5@2 d5 c5 c5@6 ~@2 c5 d5", D: "f5@2 e5@2 d5 c5 c5@6 ~@2 c5 d5",
  E: "e5 c5 g4 a4@2 c5@2 b4", F: "b4@2 c5 d5@2 e5 e5@8 e5 f5", G: "g5 e5 c5 d5@2 c5@3", H: "f5@2 e5@2 d5 c5 c5@4 ~@6",
  I: "c4 g4", J: "c5@4 g4 f4 e4 f4", K: "g4 g#4", L: "f4@4 g4 f4 e4 f4", M: "g4", N: "c5@4 f5 c5 g#4 f4",
  O: "e4@2 c#4 a3", P: "[d4 c4 f4 ~ g4@7 ~@5]/2", Q: "[f5 e5 d5 c5@3 e5 g5@3 e5 g5@4 e5]/2",
  R: "[g5 a5 b5 g5@3 e5 g5@3 e5 g5@3 e5 d5@3 g5 e5@3 e5 g5@3 e5 g5@4 e5]/4",
  S: "[g5@2 a5 b5@2 c6 c6@4 ~@2 e5 d5 c5@8 c5!2 g#5@2 g#5 a#5@3 g#5 g#5@2 g5@27 ~@4]/4",
  T: "[g5 e5 f5 g5@2 e5 f5 g5@5 d6@2 c6@6 f5@3 f5@7 f5!2]/2", U: "g5 e5 d5 c5@3 g5!2 g#5 e5 d5 c5@2 ~ c5 d5",
  V: "e5@2 f5@2 g5 e5@2 d5@8 ~",
  W: "[g5 e5 f5 g5@2 e5 f5 g5@5 d6@2 c6@6 d6@3 d#6@2 d6 c6@3 g#5@2 g5@5 ~ e5 g5 a5 b5@2 a5 e5@3 f5 f5@7 c5 d5 f5@2 e5 d5@3 c5 c5@17]/5",
  X: "e5 f5 g5 e5 d5@4",
  Y: "[g5 e5 f5 g5@2 e5 f5 g5@5 d6@2 c6@6 d6@3 d#6@2 d6 c6@3 g#5@2 g5@5 ~ e5 g5 a5 b5@2 a5 e5@3 f5 f5@7 c5 d5 f5@2 e5@2 d5@2 c5@2]/4",
  Z: "[g5 e5 f5 g5@2 e5 f5 g5@5 d6@2 c6@6 d6@3 d#6@2 d6 c6@3 g#5@2 g5@5 ~ e5 g5 a5 b5@2 a5 e5@3 f5 f5@7 c5 d5 f5@2 e5 d5@3 c5 ~]/4",
})).s("gm_violin").gain(0.3)

// other · violin · soft notes
const violin_soft = note("<~@15 A B C B D E F G H@2 ~@7 I ~@3 J ~@50 K@2 ~@5>".pickRestart({
  A: "~@6 e5 g5", B: "c5!2", C: "e5@4 c6 b5 g5 e5", D: "d5 e5", E: "c5 e5", F: "g5 a5 c6@2", G: "c5 g#5",
  H: "[g5@3 ~]/2", I: "~@3 c4 ~@4", J: "~@14 c5 d5", K: "[~@15 c5@13 ~@4]/2",
})).s("gm_violin").gain(0.2)

// drums · kick
const kick = s("bd").struct(`<
  ~@37
  [x ~@2 x ~ x ~@2]!16
  [x ~@2 x ~@4]
  [x ~@2 x ~ x ~@2]!17
  [x ~@2 x ~@4]
  ~@8
  [x ~@2 x ~ x ~@2]!8
  ~@6
>`).gain(0.48)

// drums · rim
const rim = s("rim").struct("<~@37 [~ x ~ x]!16 [~ x ~@2] [~ x ~ x]!17 [~ x ~@2] ~@8 [~ x ~ x]!8 ~@6>").gain(0.48)

stack(acoustic_guitar_steel, piano, violin, violin_soft, kick, rim)