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 24-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, A@4 for four bars: 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@6 ~@3 g#1@9 ~@2 f2 e2@3", D: "a1 ~@3",
  E: "a1@2 b1 b1@2 b1 ~@3 a1@2 b1 b1@2 b1 ~@3 a1@2 b1 b1@2 b1",
  F: "~@3 a1@2 b1 b1@2 b1 ~@3 c2@2 c2@2 ~@2 d2@2 d2@2 ~@2", G: "~@3 a1@2 b1 b1@2 b1 ~@3 a1@2 b1 c2@3 ~@6",
  H: "a1@2 b1 b1@2 b1 ~@3 g1@2 g1 g1@2 g1 ~@3 e2@2 e2 e2@2 e2",
  I: "~@3 a1@2 a1 a1@2 a1 ~@3 d2@2 d2@2 ~@2 c#2@2 c#2@2 ~@2", J: "~@3 a1@2 a1 a1@2 a1 ~@15",
})).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 ~@3 a2@2 b2 b2@2 b2 ~@3 a2@2 b2 b2@2 b2",
  C: "~@3 a2@2 b2 b2@2 b2 ~@3 c3@2 c3@2 ~@2 d3@2 d3@2 ~@2", D: "~@3 a2@2 b2 b2@2 b2 ~@3 a2@2 b2 c3@3 ~@6",
})).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 ~@11 x ~@4 x ~@6", C: "~@8 x!2 ~@2", D: "x ~@4 x", E: "x ~ x ~@3 x ~ x ~@3 x!3 ~@3 x!3 ~@3",
  F: "x!3 ~@3 x ~ x ~@3 x!3 ~@3 x!3 ~@3", G: "x ~ x ~@3 x ~ x ~@3 x!3 ~@4 x!2 ~@3",
  H: "x ~ x!2 ~ x ~@2 x!2 ~ x!2 ~ x!2 ~ x ~@2 x!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: "~@6 x ~@7 x ~@3 x ~@4 x", C: "~@6 x ~@4 x ~@2 x ~@3 x ~@4 x", D: "~@13 x ~@2 x ~ x ~@5",
  E: "~@2 x ~@2 x!2 ~", F: "~@2 x ~@3 x!2", G: "x ~@2 x ~@2 x ~@10 x!2 ~ x ~@3",
  H: "~@2 x!2 ~@2 x ~ x ~@5 x ~@3 x ~@2 x!3", I: "~@3 x!2 ~@4 x ~@2", J: "~@6 x ~ x!3 ~@2 x!3 ~@2 x!2 ~@2 x ~",
  K: "~@6 x ~@3 x!2 ~ x ~@2 x!2 ~@2 x ~@3", L: "x!3 ~@3 x!3 ~@3 x ~ x!3 ~ x!2 ~@2 x!2", M: "x ~@5 x ~@7 x ~@3 x!4 ~@2",
  N: "~@6 x ~ x!5 ~@5 x ~ x!2 ~@2", O: "x!2 ~@2 x!4 ~@3 x!3 ~@2 x!4 ~@2 x ~",
  P: "~@6 x ~ x ~ x ~@2 x!2 ~ x ~@2 x!2 ~@3",
})).gain(0.36)

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

// drums · low tom
const low_tom = s("lt").struct("<~@51 [~@7 x] [~ x ~@20 x!2] [~@19 x ~ 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: "~@15 x!2 ~@7", C: "~ x!3", D: "~@11 x", E: "x!2 ~@20 x!2", F: "~@13 x ~ x!2 ~ x ~@5",
})).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 ~@2 x ~@5 x ~@5 x!2 ~ x ~@2 x ~@2", 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 ~ x!2 ~@2 x ~ x!2 ~@2 x ~ x!2 ~@2 x ~ x!2 ~@2", B: "x", C: "x ~@10 x ~ x ~@2 x ~ x ~@5", D: "x!8",
})).gain(0.31)

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

// drums · shaker
const shaker = s("sh").struct(`<
  [~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x]!12
  ~@8
  [~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x]!10
  ~@8
  [~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 x ~@2 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