Strudelify

Canon and Gigue in D major P.37

Joshua Wang

KeyD majorTempo120 bpm
0:00/0:00
// Canon and Gigue in D major P.37 — Joshua Wang
// 120 bpm, 4/4, key D major. Source: midi.
// Generated by strudelify. One cycle = one bar.
// note: Transcription provider: pdmx. https://musescore.com/score/70003; license: https://creativecommons.org/publicdomain/zero/1.0/
// note: Full arrangement: all 57 bars on a 16-step grid, each part at one level; ghost notes are separate "_soft" parts. Source detail keeps the original performance.
setcpm(120/4)

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

// other · piano
const piano = note(`<
  ~@12 A B C D A B C D A B C D A B C D A B C D A B C D E F G H E F G H E F G H E F G H E F G H I
>`.pickRestart({
  A: "d3 a3 d4 a3 a2 e3 a3 e3", B: "b2 f#3 b3 f#3 f#2 c#3 a3 c#3", C: "g2 d3 g3 d3 d2 a2 d3 a2",
  D: "g2 d3 g3 d3 a2 e3 a3 e3", E: "d3 a3 d4 f#4 d4 a3 d3 a3 a2 e3 a3 c#4 a3 e3 a2 e3",
  F: "b2 f#3 b3 d4 b3 f#3 b2 f#3 f#2 c#3 f#3 a3 f#3 c#3 f#2 c#3", G: "g2 d3 g3 b3 g3 d3 g2 d3 d2 a2 d3 f#3 d3 a2 d2 a2",
  H: "g2 d3 g3 b3 g3 d3 g2 d3 a2 e3 a3 c#4 a3 e3 a2 e3", I: "a3",
})).s("gm_piano").gain(0.5)

// other · piano · soft notes
const piano_soft = note("<A B C D A B C D A B C D ~@45>".pickRestart({
  A: "d3 a3 d4 f#4 a2 e3 a3 c#4", B: "b2 f#3 b3 d4 f#2 c#3 f#3 a3", C: "g2 d3 g3 b3 d2 a2 d3 f#3",
  D: "g2 d3 g3 b3 a2 e3 a3 c#4",
})).s("gm_piano").gain(0.3)

// bass · piano
const bass = note(`<
  A B C D A B C D A B C D A B C D A B C D A B C D E F G H E F G H A B C D I J K L I J K L I J K L M N O P N O Q R S
>`.pickRestart({
  A: "d2 a1", B: "b1 f#1", C: "g1 d1", D: "g1 a1", E: "d3 a2", F: "b2 f#2", G: "g2 d2", H: "g2 a2",
  I: "d2@2 d2@2 a1@3 a1", J: "b1@2 b1@2 f#1@3 f#1", K: "g1@2 g1@2 d1@3 d1", L: "g1@2 g1@2 a1@3 a1", M: "f#3!2 c#3!2",
  N: "d3!2 a2!2", O: "b2!2 f#2!2", P: "b2!2 c#3!2", Q: "g2!2 d2!2", R: "g2!2 a2!2", S: "f#3",
})).s("gm_piano").gain(0.45)

// other · acoustic guitar nylon · "Guitar"
const acoustic_guitar_nylon = note(`<
  ~@4 A B C D A B C D E F G H A B C D I J K L M N O P Q R S T U V W X Y Z AA AB Y Z AA AB Y Z AA AB AC AD AE AF E F G H
  AG
>`.pickRestart({
  A: "f#3 e3", B: "d3 c#3", C: "b2 a2", D: "b2 c#3", E: "f#3@2 f#3@2 e3@3 e3", F: "d3@2 d3@2 c#3@3 c#3",
  G: "b2@2 b2@2 a2@3 a2", H: "b2@2 b2@2 c#3 d3 e3 f#3", I: "d3!2 a2!2", J: "b2!2 f#2!2", K: "g2!2 d2!2", L: "g2!2 a2!2",
  M: "[d5,f#5] c#5 d5 f#4 [e4,c#5] a4 g4 a4", N: "[f#4,d5] d5 c#5 b4 [a4,c#5] f#5 [c#5,a5] b5",
  O: "[b4,g5] f#5 e5 g5 [a4,f#5] e5 d5 c#5", P: "[g4,b4] a4 b4 d5 [e4,d5]@2 [e4,c#5]@2",
  Q: "f#5@2 d5 e5 f#5@2 e5 d5 e5 c#5 d5 e5 f#5 e5 d5 c#5", R: "d5@2 b4 c#5 d5@2 d4 e4 f#4 g4 f#4 e4 f#4 b4 a4 b4",
  S: "b4@2 d5 c#5 b4@2 a4 g4 a4 g4 f#4 g4 a4 b4 c#5 d5", T: "b4@2 d5 c5 d5@2 c5 b4 c#5 d5 e5 d5 c#5 d5 b4 c#5",
  U: "d3 a2", V: "b2 f#2", W: "g2 d2", X: "g2 a2", Y: "d3@2 d3 d3@2 d3 d3@2 c#3@2 c#3 c#3@2 c#3 c#3@2",
  Z: "b2@2 b2 b2@2 b2 b2@2 a2@2 a2 a2@2 a2 a2@2", AA: "g2@2 g2 g2@2 g2 g2@2 f#2@2 f#2 f#2@2 f#2 f#2@2",
  AB: "g2@2 g2 g2@2 g2 g2@2 a2@2 a2 a2@2 a2 a2@2",
  AC: "[f#5,a5]@2 [d5,f#5] [e5,g5] [f#5,a5]@2 [d5,f#5] [e5,g5] [c#5,a5] a4 b4 c#5 d5 e5 f#5 g5", // F#m D Em F#m D Em F#m
  AD: "[d5,f#5]@2 [b4,d5] [c#5,e5] [d5,f#5]@2 f#4 g4 [f#4,a4] b4 a4 g4 a4 d5 c#5 d5", // D Bm C#m D F#m
  AE: "[g4,b4]@2 [b4,d5] [a4,c#5] [g4,b4]@2 a4 g4 a4 g4 f#4 g4 a4 b4 c#5 d5", // G Bm A G
  AF: "[g4,b4]@2 [b4,d5] [a4,c#5] [b4,d5]@2 c#5 b4 c#5 d5 e5 d5 c#5 d5 b4 c#5", AG: "a2",
})).s("gm_acoustic_guitar_nylon").gain(0.3)

// other · acoustic guitar nylon · "Guitar"
const acoustic_guitar_nylon_2 = note(`<
  ~@4 A B C D A B C D E F G H I J K L M N O P Q R S T M N O U E F G H V W X Y Z AA AB AC Z AA AB AC AD AE AF AG F G AH
  AI AJ
>`.pickRestart({
  A: "f#3 e3", B: "d3 c#3", C: "b2 a2", D: "b2 c#3", E: "f#3@2 f#3@2 e3@3 e3", F: "d3@2 d3@2 c#3@3 c#3",
  G: "b2@2 b2@2 a2@3 a2", H: "b2@2 b2@2 c#3 d3 e3 f#3", I: "d3 a2", J: "b2 f#2", K: "g2 d2", L: "g2 a2",
  M: "a4@3 a4!2 b4 a4 g4", N: "f#4@3 f#4!2 g4 f#4 e4", O: "d4 c#4 b3 c#4 d4@3 a3", P: "d4 c#4 b3 c#4 e4 d4 c#4 e4",
  Q: "d5 c#5 d5 d4 c#4 a4 e4 f#4 d4 d5 c#5 b4 c#5 f#5 a5 b5", R: "g5 f#5 e5 g5 f#5 e5 d5 c#5 b4 a4 g4 f#4 e4 g4 f#4 e4",
  S: "d4 e4 f#4 g4 a4 e4 a4 g4 f#4 b4 a4 g4 a4 g4 f#4 e4", T: "d4 b3 b4 c#5 d5 c#5 b4 a4 g4 f#4 e4 b4 a4 b4 a4 g4",
  U: "d4 c4 b3 c4 e4 d4 c#4 e4",
  V: "[f#5,a5]@2 [d5,f#5] [e5,g5] [f#5,a5]@2 [d5,f#5] [e5,g5] [c#5,a5] a4 b4 c#5 d5 e5 f#5 g5", // F#m D Em F#m D Em F#m
  W: "[d5,f#5]@2 [b4,d5] [c#5,e5] [d5,f#5]@2 f#4 g4 [f#4,a4] b4 a4 g4 a4 d5 c#5 d5", // D Bm C#m D F#m
  X: "[g4,b4]@2 [b4,d5] [a4,c#5] [g4,b4]@2 a4 g4 a4 g4 f#4 g4 a4 b4 c#5 d5", // G Bm A G
  Y: "[g4,b4]@2 [b4,d5] [a4,c#5] [b4,d5]@2 c#5 b4 c#5 d5 e5 d5 c#5 d5 b4 c#5", Z: "f#3!2 c#3!2", AA: "d3!2 a2!2",
  AB: "b2!2 f#2!2", AC: "b2!2 c#3!2", AD: "f#5@2 d5 e5 f#5@2 e5 d5 e5 c#5 d5 e5 f#5 e5 d5 c#5",
  AE: "d5@2 b4 c#5 d5@2 d4 e4 f#4 g4 f#4 e4 f#4 b4 a4 b4", AF: "b4@2 d5 c#5 b4@2 a4 g4 a4 g4 f#4 g4 a4 b4 c#5 d5",
  AG: "b4@2 d5 c#5 d5@2 c#5 b4 c#5 d5 e5 d5 c#5 d5 b4 c#5", AH: "g2@2 g2@2 f#2@3 f#2", AI: "g2@2 g2@2 a2 b2 c#3 d3",
  AJ: "d2",
})).s("gm_acoustic_guitar_nylon").gain(0.25)

stack(piano, piano_soft, bass, acoustic_guitar_nylon, acoustic_guitar_nylon_2)