Added all() method for chaining all events

This commit is contained in:
2023-12-22 15:26:51 +02:00
parent 98f431f6b2
commit 30983147ea
5 changed files with 44 additions and 5 deletions

View File

@ -115,7 +115,7 @@ export class MidiEvent extends AudibleEvent {
return this;
};
out = (): void => {
out = (outChannel?: number|number[]): void => {
function play(event: MidiEvent, params: MidiParams): void {
const channel = params.channel ? params.channel : 0;
const velocity = params.velocity ? params.velocity : 100;
@ -141,6 +141,9 @@ export class MidiEvent extends AudibleEvent {
);
}
this.runChain();
if(outChannel) this.channel(outChannel);
const events = objectWithArraysToArrayOfObjects(this.values, [
"parsedScale",
]) as MidiParams[];