automated patternify, pseudo getters, string hacks
This commit is contained in:
parent
f2acc12174
commit
240ebede6f
7 changed files with 184 additions and 69 deletions
|
|
@ -28,6 +28,7 @@ Pattern.prototype.midi = function (output: string, channel = 1) {
|
|||
return this.fmap((value: any) => ({
|
||||
...value,
|
||||
onTrigger: (time: number, event: any) => {
|
||||
value = value.value || value;
|
||||
if (!isNote(value)) {
|
||||
throw new Error('not a note: ' + value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue