Strudelify
Piggy cover art

1994 · The Downward Spiral

Piggy

Nine Inch Nails

KeyA majorTempo66 bpm
0:00/0:00
// Piggy — Nine Inch Nails
// 66 bpm, 4/4, key A major. Source: midi.
// Generated by strudelify. One cycle = one bar.
// note: Full arrangement: all 72 bars on a 32-step grid, each part at one level; ghost notes are separate "_soft" parts. Source detail keeps the original performance.
setcpm(66/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.

// bass · fretless bass
const bass = note(`<
  A B A C A B A C A B A D E F E G E F E G A B A C A B A C A B E F E G E F E G ~ H I H J H I H J H I H J H I H J H I H J
  H I H J H I H J H I H J H
>`.pickRestart({
  A: "b1@2 ~ d2@3 ~@2", B: "a1@2 ~ g#1@3 ~@2", C: "a1@8 ~@4 g#1@12 ~@3 f2 e2@4", D: "a1 ~@3",
  E: "a1@2 ~ b1 b1@2 b1@2 ~@4 a1@2 ~ b1 b1@2 b1@2 ~@4 a1@2 ~ b1 b1@2 b1@2",
  F: "~@4 a1@2 ~ b1 b1@2 b1@2 ~@4 c2@2 c2@2 ~@4 d2@2 d2@2 ~@4", G: "~@4 a1@2 ~ b1 b1@2 b1@2 ~@4 a1@2 b1@2 c2@4 ~@8",
  H: "a1@2 ~ b1 b1@2 b1@2 ~@4 g1@2 ~ g1 g1@2 g1@2 ~@4 e2@2 ~ e2 e2@2 e2@2",
  I: "~@4 a1@2 ~ a1 a1@2 a1@2 ~@4 d2@2 d2@2 ~@4 c#2@2 c#2@2 ~@4", J: "~@4 a1@2 ~ a1 a1@2 a1@2 ~@20",
})).s("gm_fretless_bass").gain(0.29)

// chords · drawbar organ · "Hammond Organ"
const drawbar_organ = note("<~@20 A B A C A B A C A B ~@42>".pickRestart({
  A: "f#3@3 e3@5, b2", B: "[c#3,e3]@3 [b2,d3]@5", C: "[c#3,e3]@3 b2@3 a3@2, ~@3 d3@5",
})).s("gm_drawbar_organ").gain(0.1)

// other · piano · "Accoustic Grand Piano"
const piano = note("<~@40 A ~@3 A ~@3 A ~@3 A ~@2 B C@12 D@2 ~@2>".pickRestart({
  A: "~@2 a4 ~", B: "~ a5@2 a4", C: "[a5@2 g5@2 f#5@2 e5 d#5@3 a5@4 a4@2]/2",
  D: "[a5@2 g5@2 f#5@2 e5 d#5@3 a5@4 ~@2]/2",
})).s("gm_piano").gain(0.41)

// other · piano · "Accoustic Grand Piano" · soft notes
const piano_soft = note("<~@69 A B@2>".pickRestart({
  A: "~@3 a4", B: "[a5@2 g5@2 f#5@2 e5 d#5@3 ~@6]/2",
})).s("gm_piano").gain(0.26)

// other · pad poly · "Pad 3 (polysynth)"
const pad_poly = note("<~@9 A ~@2 B C B D B C B D ~@10 B C B D B C B D ~@34>".pickRestart({
  A: "a#4", B: "a2@2 ~ b2 b2@2 b2@2 ~@4 a2@2 ~ b2 b2@2 b2@2 ~@4 a2@2 ~ b2 b2@2 b2@2",
  C: "~@4 a2@2 ~ b2 b2@2 b2@2 ~@4 c3@2 c3@2 ~@4 d3@2 d3@2 ~@4", D: "~@4 a2@2 ~ b2 b2@2 b2@2 ~@4 a2@2 b2@2 c3@4 ~@8",
})).s("gm_pad_poly").gain(0.19)

// other · overdriven guitar
const overdriven_guitar = note("<~@28 A@2 ~@42>".pickRestart({
  A: "[~@5 a5@11]/2",
})).s("gm_overdriven_guitar").gain(0.06)

// drums · kick
const kick = s("bd").struct("<A@30 B@8 C A@6 D A E F G E@5 H@9 ~@8>".pickRestart({
  A: "x", B: "x ~@15 x ~@6 x ~@8", C: "~@21 x ~@2 x ~@7", D: "x ~@26 x ~@4",
  E: "x ~@2 x ~@4 x ~@2 x ~@4 x ~ x!2 ~@4 x ~ x!2 ~@4", F: "x ~ x!2 ~@4 x ~@2 x ~@4 x ~ x!2 ~@4 x ~ x!2 ~@4",
  G: "x ~@2 x ~@4 x ~@2 x ~@4 x ~ x!2 ~@6 x!2 ~@4", H: "x ~@2 x!2 ~@2 x ~@3 x!2 ~@2 x!2 ~@2 x!2 ~@2 x ~@3 x!2 ~@2 x",
})).gain(0.4)

// drums · snare
const snare = s("sd").struct("<A@30 B C@7 D A@3 E A F G H I J K L A M N O A@3 P A@5 ~@8>".pickRestart({
  A: "~ x ~ x", B: "~@8 x ~@10 x ~@4 x ~@6 x", C: "~@8 x ~@6 x ~@3 x ~@4 x ~@6 x", D: "~@18 x ~@2 x ~@2 x ~@7",
  E: "~@2 x ~@2 x!2 ~", F: "~@2 x ~@3 x!2", G: "x ~@3 x ~@3 x ~@14 x!2 ~@2 x ~@4",
  H: "~@3 x!2 ~@3 x ~@2 x ~@7 x ~@4 x ~@3 x!2 ~ x", I: "~@8 x ~@2 x ~@12 x ~@7",
  J: "~@8 x ~@2 x!3 ~@4 x!3 ~@3 x ~ x ~@3 x ~", K: "~@8 x ~@4 x!3 ~@2 x ~@2 x ~ x ~@3 x ~@4",
  L: "x ~ x!2 ~@4 x ~ x!2 ~@4 x ~@2 x!3 ~@2 x!3 ~@2 x!3", M: "x ~@7 x ~@10 x ~@4 x ~ x!3 ~@3",
  N: "~@8 x ~@2 x!6 ~@7 x ~@2 x!2 ~@3", O: "x!3 ~@3 x!4 ~@5 x!3 ~@4 x!5 ~@2 x ~@2",
  P: "~@8 x ~@2 x ~@2 x ~@2 x ~ x ~@2 x ~@2 x ~ x ~@4",
})).gain(0.36)

// drums · hihat
const hihat = s("hh").struct(`<
  [x!2]!30
  ~@9
  [x!2]!16
  [x ~@2 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x]
  [~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x]!3
  [x ~@2 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x]
  [~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x]!4
  ~@8
>`).gain(0.31)

// drums · low tom
const low_tom = s("lt").struct("<~@51 [~@7 x] [~@2 x ~@27 x!2] [~@13 x!2 ~] ~@18>").gain(0.4)

// drums · mid tom
const mid_tom = s("mt").struct("<~@38 A ~@7 B ~@3 C D E F C ~@17>".pickRestart({
  A: "~@7 x", B: "~@10 x!2 ~@4", C: "~ x!3", D: "~@15 x", E: "x ~ x ~@27 x!2", F: "~@9 x!4 ~@3",
})).gain(0.4)

// drums · high tom
const high_tom = s("ht").struct("<~@52 x ~ [~ x!3] ~@17>").gain(0.45)

// drums · ride
const ride = s("rd").struct("<~@12 A@8 ~@19 B A@7 B A B A C A B A D ~@3 D ~@12>".pickRestart({
  A: "~ x ~ x ~ x ~ x", B: "x!2 ~ x ~ x ~ x", C: "x ~@3 x ~@7 x ~@7 x!2 ~@2 x ~@3 x ~@3", D: "x",
})).gain(0.31)

// drums · china
const china = s("cr").struct("<~@30 A@8 ~ B ~@7 B ~ B ~ C ~ B ~ D@9 ~@8>".pickRestart({
  A: "x ~@2 x!2 ~@3 x ~@2 x!2 ~@3 x ~@2 x!2 ~@3 x ~@2 x!2 ~@3", B: "x", C: "x ~@14 x ~@2 x ~@2 x ~@2 x ~@7", D: "x!8",
})).gain(0.31)

// drums · tambourine
const tambourine = s("tb").struct(`<
  ~@11
  [~@31 x]
  [~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x]!8
  ~@19
  [~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x]!16
  ~@17
>`).gain(0.31)

// drums · shaker
const shaker = s("sh").struct(`<
  [~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x]!12
  ~@8
  [~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x]!10
  ~@8
  [~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x ~@3 x]
  ~@33
>`).gain(0.36)

// drums · guiro
const guiro = s("guiro:0").struct("<[x!8]!12 ~@8 [x!8]!10 ~@8 [x!8] ~@33>").gain(7.57)

stack(
  bass, drawbar_organ, piano, piano_soft, pad_poly, overdriven_guitar, kick, snare, hihat, low_tom, mid_tom, high_tom,
  ride, china, tambourine, shaker, guiro
)

More by Nine Inch Nails