automated patternify, pseudo getters, string hacks

This commit is contained in:
Felix Roos 2022-02-14 19:56:37 +01:00
parent f2acc12174
commit 240ebede6f
7 changed files with 184 additions and 69 deletions

View file

@ -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);
}