pianoroll
  1. options
  2. cycles
  3. playhead
  4. vertical
  5. labels
  6. flipTime
  7. flipValues
  8. overscan
  9. hideNegative
  10. smear
  11. fold
  12. active
  13. inactive
  14. background
  15. playheadColor
  16. fill
  17. fillActive
  18. stroke
  19. strokeActive
  20. hideInactive
  21. colorizeInactive
  22. fontFamily
  23. minMidi
  24. maxMidi
  25. autorange

Visualises a pattern as a scrolling 'pianoroll', displayed in the background of the editor. To show a pianoroll for all running patterns, use all(pianoroll). To have a pianoroll appear below a pattern instead, prefix with _, e.g.: sound("bd sd")._pianoroll().

note("c2 a2 eb2")
.euclid(5,8)
.s('sawtooth')
.lpenv(4).lpf(300)
.pianoroll({ labels: 1 })

aliases: punchcard()

parametertype
options
  • object
Object containing all the optional following parameters as key value pairs:
cycles
  • integer
number of cycles to be displayed at the same time - defaults to 4
playhead
  • number
location of the active notes on the time axis - 0 to 1, defaults to 0.5
vertical
  • boolean
displays the roll vertically - 0 by default
labels
  • boolean
displays labels on individual notes (see the label function) - 0 by default
flipTime
  • boolean
reverse the direction of the roll - 0 by default
flipValues
  • boolean
reverse the relative location of notes on the value axis - 0 by default
overscan
  • number
lookup X cycles outside of the cycles window to display notes in advance - 1 by default
hideNegative
  • boolean
hide notes with negative time (before starting playing the pattern) - 0 by default
smear
  • boolean
notes leave a solid trace - 0 by default
fold
  • boolean
notes takes the full value axis width - 0 by default
active
  • string
hexadecimal or CSS color of the active notes - defaults to #FFCA28
inactive
  • string
hexadecimal or CSS color of the inactive notes - defaults to #7491D2
background
  • string
hexadecimal or CSS color of the background - defaults to transparent
playheadColor
  • string
hexadecimal or CSS color of the line representing the play head - defaults to white
fill
  • boolean
notes are filled with color (otherwise only the label is displayed) - 0 by default
fillActive
  • boolean
active notes are filled with color - 0 by default
stroke
  • boolean
notes are shown with colored borders - 0 by default
strokeActive
  • boolean
active notes are shown with colored borders - 0 by default
hideInactive
  • boolean
only active notes are shown - 0 by default
colorizeInactive
  • boolean
use note color for inactive notes - 1 by default
fontFamily
  • string
define the font used by notes labels - defaults to 'monospace'
minMidi
  • integer
minimum note value to display on the value axis - defaults to 10
maxMidi
  • integer
maximum note value to display on the value axis - defaults to 90
autorange
  • boolean
automatically calculate the minMidi and maxMidi parameters - 0 by default
mentioned in (1)