build
This commit is contained in:
parent
c71be675aa
commit
c0bd0966a8
5 changed files with 14 additions and 4 deletions
1
docs/dist/pianoroll.js
vendored
1
docs/dist/pianoroll.js
vendored
|
|
@ -18,6 +18,7 @@ Pattern.prototype.pianoroll = function({
|
|||
events.forEach((event) => {
|
||||
const isActive = event.whole.begin <= t && event.whole.end >= t;
|
||||
ctx.fillStyle = isActive ? active : inactive;
|
||||
ctx.globalAlpha = event.context.velocity ?? 1;
|
||||
const x = Math.round(event.whole.begin / timeframe * w);
|
||||
const width = Math.round((event.whole.end - event.whole.begin) / timeframe * w);
|
||||
const y = Math.round(h - (Number(event.value) - minMidi) / midiRange * h);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue