New zifferjs version and fixes for arpeggio
This commit is contained in:
@ -43,7 +43,7 @@
|
|||||||
"tone": "^14.8.49",
|
"tone": "^14.8.49",
|
||||||
"unique-names-generator": "^4.7.1",
|
"unique-names-generator": "^4.7.1",
|
||||||
"vite-plugin-markdown": "^2.1.0",
|
"vite-plugin-markdown": "^2.1.0",
|
||||||
"zifferjs": "^0.0.46",
|
"zifferjs": "^0.0.47",
|
||||||
"zyklus": "^0.1.4",
|
"zyklus": "^0.1.4",
|
||||||
"zzfx": "^1.2.0"
|
"zzfx": "^1.2.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -222,16 +222,18 @@ export class AbstractEvent {
|
|||||||
value = Array.isArray(value) ? value.concat(kwargs) : [value, ...kwargs];
|
value = Array.isArray(value) ? value.concat(kwargs) : [value, ...kwargs];
|
||||||
}
|
}
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
this.values["noteLength"] = value;
|
|
||||||
this.values.dur = value.map((v) =>
|
this.values.dur = value.map((v) =>
|
||||||
this.app.clock.convertPulseToSecond(v * 4 * this.app.clock.ppqn),
|
this.app.clock.convertPulseToSecond(v * 4 * this.app.clock.ppqn),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.values["noteLength"] = value;
|
|
||||||
this.values.dur = this.app.clock.convertPulseToSecond(
|
this.values.dur = this.app.clock.convertPulseToSecond(
|
||||||
value * 4 * this.app.clock.ppqn,
|
value * 4 * this.app.clock.ppqn,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if(this.current) {
|
||||||
|
value = Array.isArray(value) ? value[this.index%value.length] : value;
|
||||||
|
this.current.duration = value;
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -288,7 +288,8 @@ export class Player extends AbstractEvent {
|
|||||||
|
|
||||||
lead = () => this.voiceleading();
|
lead = () => this.voiceleading();
|
||||||
|
|
||||||
arpeggio(indexes: string|number[]) {
|
arpeggio(indexes: string|number[], ...rest: number[]) {
|
||||||
|
if(typeof indexes === "number") indexes = [indexes, ...rest];
|
||||||
if (this.atTheBeginning()) this.ziffers.arpeggio(indexes);
|
if (this.atTheBeginning()) this.ziffers.arpeggio(indexes);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4028,10 +4028,10 @@ yaml@^2.1.1:
|
|||||||
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.1.tgz#02fe0975d23cd441242aa7204e09fc28ac2ac33b"
|
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.1.tgz#02fe0975d23cd441242aa7204e09fc28ac2ac33b"
|
||||||
integrity sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==
|
integrity sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==
|
||||||
|
|
||||||
zifferjs@^0.0.46:
|
zifferjs@^0.0.47:
|
||||||
version "0.0.46"
|
version "0.0.47"
|
||||||
resolved "https://registry.yarnpkg.com/zifferjs/-/zifferjs-0.0.46.tgz#d19fa6d75c9763b77189e31e347f33329a3d80be"
|
resolved "https://registry.yarnpkg.com/zifferjs/-/zifferjs-0.0.47.tgz#393cfe235187e80e970b7281e29c9e4813184f07"
|
||||||
integrity sha512-vByLmDl4jxkVWpQ/wetqYRWWUJLUMtfJ6Ds9UsD4XsWPjSyGP3T2s8dmLPszs9YXK0mpBlSRdhlXhyRoIqBjYQ==
|
integrity sha512-gc5H9QNuPysiB5zqjXkMfempDf08ydA+gVPPm9sQKifmoc7GtjJQ0mU7TNc1BAGPI2ipJcIop1a+r71y5SbQmQ==
|
||||||
|
|
||||||
zyklus@^0.1.4:
|
zyklus@^0.1.4:
|
||||||
version "0.1.4"
|
version "0.1.4"
|
||||||
|
|||||||
Reference in New Issue
Block a user