add pianoroll widget
This commit is contained in:
parent
094b30cd26
commit
48e0691eec
8 changed files with 62 additions and 23 deletions
|
|
@ -30,7 +30,7 @@ const getValue = (e) => {
|
|||
};
|
||||
|
||||
Pattern.prototype.pianoroll = function (options = {}) {
|
||||
let { cycles = 4, playhead = 0.5, overscan = 1, hideNegative = false } = options;
|
||||
let { cycles = 4, playhead = 0.5, overscan = 1, hideNegative = false, ctx } = options;
|
||||
|
||||
let from = -cycles * playhead;
|
||||
let to = cycles * (1 - playhead);
|
||||
|
|
@ -49,6 +49,7 @@ Pattern.prototype.pianoroll = function (options = {}) {
|
|||
{
|
||||
from: from - overscan,
|
||||
to: to + overscan,
|
||||
ctx,
|
||||
},
|
||||
);
|
||||
return this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue