Search Topics
< All Topics

JSON Documentation for Custom Patterns


See the templates for each type of pattern set (Single, Double, Drumline, Drumkit) for formatting details. Particularly notice the values for the “type” key for the pattern strings inside the “voices” array.

  • For Single patterns, the key-value pair is “type” : “v1pattern”
  • For Double patterns, the key-value pairs are “type” : “v1pattern” and “type” : “v2pattern”
  • For Drumline patterns, the key-value pair is “type” : “sdpattern”
  • For Drumkit patterns, the key-value pairs are “type” : “hhpattern”, “type” : “spattern”, and “type” : “kickpattern”

Pattern String Symbols

Note that all symbols are separated by a whitespace character.

  • Notes (in order of size, largest to smallest): ww, w, h, q, e, s, t, x, o
  • Rests (add the “r” character immediately after the note value): hr, qr, er, etc…
  • Measure rest: mr
  • Dots: hd, qd, ed, etc. for single dots; hdd, qdd, edd, etc. for double dots; hddd, qddd, eddd, etc. for triple dots
  • Ties: qt, et, st, etc.
  • Beam Groups: { e e e }, { s s s s }, { e s s }, etc.
  • Tuplet Groups: [ 3\/2:e { e e e } ], [ 5\/4:s { s s s s s } ], [ 3\/2:q q q q ], etc.
  • Tuplet Groups inside Beam Groups: { e [ 3\/2:s s s s ] e }
  • Time Signatures: $3\/4, $3+2+2\/8, $6\/8, etc.
  • Barline (single): bs
  • Barline (final): bf
  • Hidden notes: hi q q uh (hi = “hide”, uh = “unhide”)
  • HiHat notes: qx, ex, sx, etc.
  • Left/Right Drumline notes: r q q l e e (two “right” quarter notes followed by two “left” eighth notes). Note that the r and l characters must be separated by whitespace.

Note that single barlines (bs) must mark the end of each measure, except for the last, which is marked by a final barline (bf).

Note that a time signature can only be placed at the very beginning of a measure, and that not more than one time signature should be placed in any measure. The first measure should not begin with a time signature, because that is already determined by the “timeSig” value for the exercise.

The back-slash in the time signature and tuplet symbols is required to escape the forward slash character that follows.

Previous JSON Template: Drumkit
Table of Contents