ext/pianoroll.js
function draw (ctx, score) {
  console.log(score)
  drawStripes(box, ctx)
  forEachTime(function (time, note) {
    var midi = toMidi(note.pitch)
    console.log(time, note, midi)
    ctx.fillRect(box.x(time), box.y(midi), box.nw(note.duration), box.nh())
  }, null, score)
}
function draw (ctx, score) {
  console.log(score)
  drawStripes(box, ctx)
  forEachTime(function (time, note) {
    var midi = toMidi(note.pitch)
    console.log(time, note, midi)
    ctx.fillRect(box.x(time), box.y(midi), box.nw(note.duration), box.nh())
  }, null, score)
}
function draw ( ctx , score ) { console . log ( score ) drawStripes ( box , ctx ) forEachTime ( function ( time , note ) { var midi = toMidi ( note . pitch ) console . log ( time , note , midi ) ctx . fillRect ( box . x ( time ) , box . y ( midi ) , box . nw ( note . duration ) , box . nh ( ) ) } , null , score ) }
Draw a piano roll
Draw a piano roll