@marmooo/midy 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/midy-GM1.d.ts +8 -7
- package/esm/midy-GM1.d.ts.map +1 -1
- package/esm/midy-GM1.js +67 -73
- package/esm/midy-GM2.d.ts +13 -11
- package/esm/midy-GM2.d.ts.map +1 -1
- package/esm/midy-GM2.js +124 -136
- package/esm/midy-GMLite.d.ts +9 -8
- package/esm/midy-GMLite.d.ts.map +1 -1
- package/esm/midy-GMLite.js +77 -91
- package/esm/midy.d.ts +13 -12
- package/esm/midy.d.ts.map +1 -1
- package/esm/midy.js +123 -140
- package/package.json +1 -1
- package/script/midy-GM1.d.ts +8 -7
- package/script/midy-GM1.d.ts.map +1 -1
- package/script/midy-GM1.js +67 -73
- package/script/midy-GM2.d.ts +13 -11
- package/script/midy-GM2.d.ts.map +1 -1
- package/script/midy-GM2.js +124 -136
- package/script/midy-GMLite.d.ts +9 -8
- package/script/midy-GMLite.d.ts.map +1 -1
- package/script/midy-GMLite.js +77 -91
- package/script/midy.d.ts +13 -12
- package/script/midy.d.ts.map +1 -1
- package/script/midy.js +123 -140
package/esm/midy-GM1.d.ts
CHANGED
|
@@ -54,8 +54,8 @@ export class MidyGM1 {
|
|
|
54
54
|
channels: any[];
|
|
55
55
|
initSoundFontTable(): any[];
|
|
56
56
|
addSoundFont(soundFont: any): void;
|
|
57
|
-
loadSoundFont(
|
|
58
|
-
loadMIDI(
|
|
57
|
+
loadSoundFont(input: any): Promise<void>;
|
|
58
|
+
loadMIDI(input: any): Promise<void>;
|
|
59
59
|
setChannelAudioNodes(audioContext: any): {
|
|
60
60
|
gainL: any;
|
|
61
61
|
gainR: any;
|
|
@@ -104,12 +104,12 @@ export class MidyGM1 {
|
|
|
104
104
|
scheduleNoteOn(channelNumber: any, noteNumber: any, velocity: any, startTime: any, noteOffEvent: any): Promise<void>;
|
|
105
105
|
noteOn(channelNumber: any, noteNumber: any, velocity: any, scheduleTime: any): Promise<void>;
|
|
106
106
|
disconnectNote(note: any): void;
|
|
107
|
-
|
|
108
|
-
scheduleNoteOff(channelNumber: any,
|
|
107
|
+
releaseNote(channel: any, note: any, endTime: any): Promise<any>;
|
|
108
|
+
scheduleNoteOff(channelNumber: any, noteNumber: any, _velocity: any, endTime: any, force: any): void;
|
|
109
109
|
findNoteOffTarget(channel: any, noteNumber: any): any;
|
|
110
|
-
noteOff(channelNumber: any, noteNumber: any, velocity: any, scheduleTime: any):
|
|
111
|
-
releaseSustainPedal(channelNumber: any, halfVelocity: any, scheduleTime: any):
|
|
112
|
-
handleMIDIMessage(statusByte: any, data1: any, data2: any, scheduleTime: any): void | Promise<
|
|
110
|
+
noteOff(channelNumber: any, noteNumber: any, velocity: any, scheduleTime: any): void;
|
|
111
|
+
releaseSustainPedal(channelNumber: any, halfVelocity: any, scheduleTime: any): void[];
|
|
112
|
+
handleMIDIMessage(statusByte: any, data1: any, data2: any, scheduleTime: any): void | Promise<void>;
|
|
113
113
|
handleProgramChange(channelNumber: any, programNumber: any, _scheduleTime: any): void;
|
|
114
114
|
handlePitchBendMessage(channelNumber: any, lsb: any, msb: any, scheduleTime: any): void;
|
|
115
115
|
setPitchBend(channelNumber: any, value: any, scheduleTime: any): void;
|
|
@@ -173,6 +173,7 @@ export class MidyGM1 {
|
|
|
173
173
|
declare class Note {
|
|
174
174
|
constructor(noteNumber: any, velocity: any, startTime: any, voice: any, voiceParams: any);
|
|
175
175
|
index: number;
|
|
176
|
+
ending: boolean;
|
|
176
177
|
bufferSource: any;
|
|
177
178
|
filterNode: any;
|
|
178
179
|
filterDepth: any;
|
package/esm/midy-GM1.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"midy-GM1.d.ts","sourceRoot":"","sources":["../src/midy-GM1.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"midy-GM1.d.ts","sourceRoot":"","sources":["../src/midy-GM1.js"],"names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FAMC;IAED,6EA2CC;IAED,qCAcC;IAED,kGAWC;IAED,wDAUC;IAED,iFAKC;IAED,oEAKC;IAED;;;MAMC;IAED,8DAKC;IAED,4EAKC;IAED,sEAGC;IAED,2DAUC;IAED,yEAWC;IAED,kFAeC;IAED,2DAMC;IAED,uDAkBC;IAED,gDAEC;IAED,gDAEC;IAED,sEAGC;IAED,qEAKC;IAED,2EAUC;IAED,iEAKC;IAED,uEAQC;IAED,mEAKC;IAED,yEAQC;IAED,gFAGC;IAED,yCAqBC;IAGD,8EAgCC;IAED,gFAGC;IAED,+EAgBC;IAED,qCAWC;IAED,4EAaC;IAED,4DAGC;IAED,sDASC;IAED,gDAYC;IAGD,6DAgBC;CACF;AA79CD;IAWE,0FAMC;IAhBD,cAAW;IACX,gBAAe;IACf,kBAAa;IACb,gBAAW;IACX,iBAAY;IACZ,wBAAmB;IACnB,iBAAY;IACZ,mBAAc;IACd,qBAAgB;IAGd,gBAA4B;IAC5B,cAAwB;IACxB,eAA0B;IAC1B,WAAkB;IAClB,iBAA8B;CAEjC"}
|
package/esm/midy-GM1.js
CHANGED
|
@@ -8,6 +8,12 @@ class Note {
|
|
|
8
8
|
writable: true,
|
|
9
9
|
value: -1
|
|
10
10
|
});
|
|
11
|
+
Object.defineProperty(this, "ending", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: false
|
|
16
|
+
});
|
|
11
17
|
Object.defineProperty(this, "bufferSource", {
|
|
12
18
|
enumerable: true,
|
|
13
19
|
configurable: true,
|
|
@@ -289,17 +295,37 @@ export class MidyGM1 {
|
|
|
289
295
|
}
|
|
290
296
|
}
|
|
291
297
|
}
|
|
292
|
-
async loadSoundFont(
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
298
|
+
async loadSoundFont(input) {
|
|
299
|
+
let uint8Array;
|
|
300
|
+
if (typeof input === "string") {
|
|
301
|
+
const response = await fetch(input);
|
|
302
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
303
|
+
uint8Array = new Uint8Array(arrayBuffer);
|
|
304
|
+
}
|
|
305
|
+
else if (input instanceof Uint8Array) {
|
|
306
|
+
uint8Array = input;
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
throw new TypeError("input must be a URL string or Uint8Array");
|
|
310
|
+
}
|
|
311
|
+
const parsed = parse(uint8Array);
|
|
296
312
|
const soundFont = new SoundFont(parsed);
|
|
297
313
|
this.addSoundFont(soundFont);
|
|
298
314
|
}
|
|
299
|
-
async loadMIDI(
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
315
|
+
async loadMIDI(input) {
|
|
316
|
+
let uint8Array;
|
|
317
|
+
if (typeof input === "string") {
|
|
318
|
+
const response = await fetch(input);
|
|
319
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
320
|
+
uint8Array = new Uint8Array(arrayBuffer);
|
|
321
|
+
}
|
|
322
|
+
else if (input instanceof Uint8Array) {
|
|
323
|
+
uint8Array = input;
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
throw new TypeError("input must be a URL string or Uint8Array");
|
|
327
|
+
}
|
|
328
|
+
const midi = parseMidi(uint8Array);
|
|
303
329
|
this.ticksPerBeat = midi.header.ticksPerBeat;
|
|
304
330
|
const midiData = this.extractMidiData(midi);
|
|
305
331
|
this.instruments = midiData.instruments;
|
|
@@ -381,12 +407,13 @@ export class MidyGM1 {
|
|
|
381
407
|
const delay = this.startDelay - resumeTime;
|
|
382
408
|
const startTime = event.startTime + delay;
|
|
383
409
|
switch (event.type) {
|
|
384
|
-
case "noteOn":
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
410
|
+
case "noteOn":
|
|
411
|
+
await this.scheduleNoteOn(event.channel, event.noteNumber, event.velocity, startTime);
|
|
412
|
+
break;
|
|
413
|
+
case "noteOff": {
|
|
414
|
+
const notePromise = this.scheduleNoteOff(event.channel, event.noteNumber, event.velocity, startTime, false);
|
|
415
|
+
if (notePromise)
|
|
416
|
+
this.notePromises.push(notePromise);
|
|
390
417
|
break;
|
|
391
418
|
}
|
|
392
419
|
case "controller":
|
|
@@ -485,6 +512,7 @@ export class MidyGM1 {
|
|
|
485
512
|
return `${programNumber}:${noteNumber}:${velocity}`;
|
|
486
513
|
}
|
|
487
514
|
extractMidiData(midi) {
|
|
515
|
+
this.audioBufferCounter.clear();
|
|
488
516
|
const instruments = new Set();
|
|
489
517
|
const timeline = [];
|
|
490
518
|
const tmpChannels = new Array(this.channels.length);
|
|
@@ -548,38 +576,13 @@ export class MidyGM1 {
|
|
|
548
576
|
prevTempoTicks = event.ticks;
|
|
549
577
|
}
|
|
550
578
|
}
|
|
551
|
-
const activeNotes = new Array(this.channels.length * 128);
|
|
552
|
-
for (let i = 0; i < activeNotes.length; i++) {
|
|
553
|
-
activeNotes[i] = [];
|
|
554
|
-
}
|
|
555
|
-
for (let i = 0; i < timeline.length; i++) {
|
|
556
|
-
const event = timeline[i];
|
|
557
|
-
switch (event.type) {
|
|
558
|
-
case "noteOn": {
|
|
559
|
-
const index = event.channel * 128 + event.noteNumber;
|
|
560
|
-
activeNotes[index].push(event);
|
|
561
|
-
break;
|
|
562
|
-
}
|
|
563
|
-
case "noteOff": {
|
|
564
|
-
const index = event.channel * 128 + event.noteNumber;
|
|
565
|
-
const noteOn = activeNotes[index].pop();
|
|
566
|
-
if (noteOn) {
|
|
567
|
-
noteOn.noteOffEvent = event;
|
|
568
|
-
}
|
|
569
|
-
else {
|
|
570
|
-
const eventString = JSON.stringify(event, null, 2);
|
|
571
|
-
console.warn(`noteOff without matching noteOn: ${eventString}`);
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
579
|
return { instruments, timeline };
|
|
577
580
|
}
|
|
578
581
|
stopActiveNotes(channelNumber, velocity, force, scheduleTime) {
|
|
579
582
|
const channel = this.channels[channelNumber];
|
|
580
583
|
const promises = [];
|
|
581
584
|
this.processActiveNotes(channel, scheduleTime, (note) => {
|
|
582
|
-
const promise = this.scheduleNoteOff(channelNumber, note.noteNumber, velocity, scheduleTime, force
|
|
585
|
+
const promise = this.scheduleNoteOff(channelNumber, note.noteNumber, velocity, scheduleTime, force);
|
|
583
586
|
this.notePromises.push(promise);
|
|
584
587
|
promises.push(promise);
|
|
585
588
|
});
|
|
@@ -589,7 +592,7 @@ export class MidyGM1 {
|
|
|
589
592
|
const channel = this.channels[channelNumber];
|
|
590
593
|
const promises = [];
|
|
591
594
|
this.processScheduledNotes(channel, (note) => {
|
|
592
|
-
const promise = this.scheduleNoteOff(channelNumber, note, velocity, scheduleTime, force);
|
|
595
|
+
const promise = this.scheduleNoteOff(channelNumber, note.noteNumber, velocity, scheduleTime, force);
|
|
593
596
|
this.notePromises.push(promise);
|
|
594
597
|
promises.push(promise);
|
|
595
598
|
});
|
|
@@ -666,9 +669,6 @@ export class MidyGM1 {
|
|
|
666
669
|
continue;
|
|
667
670
|
if (note.ending)
|
|
668
671
|
continue;
|
|
669
|
-
const noteOffEvent = note.noteOffEvent;
|
|
670
|
-
if (noteOffEvent && noteOffEvent.startTime < scheduleTime)
|
|
671
|
-
continue;
|
|
672
672
|
if (scheduleTime < note.startTime)
|
|
673
673
|
continue;
|
|
674
674
|
callback(note);
|
|
@@ -838,7 +838,7 @@ export class MidyGM1 {
|
|
|
838
838
|
if (prev) {
|
|
839
839
|
const [prevNote, prevChannelNumber] = prev;
|
|
840
840
|
if (prevNote && !prevNote.ending) {
|
|
841
|
-
this.scheduleNoteOff(prevChannelNumber, prevNote, 0, // velocity,
|
|
841
|
+
this.scheduleNoteOff(prevChannelNumber, prevNote.noteNumber, 0, // velocity,
|
|
842
842
|
startTime, true);
|
|
843
843
|
}
|
|
844
844
|
}
|
|
@@ -866,12 +866,6 @@ export class MidyGM1 {
|
|
|
866
866
|
const scheduledNotes = channel.scheduledNotes;
|
|
867
867
|
note.index = scheduledNotes.length;
|
|
868
868
|
scheduledNotes.push(note);
|
|
869
|
-
if (noteOffEvent) {
|
|
870
|
-
const notePromise = this.scheduleNoteOff(channelNumber, note, noteOffEvent.velocity, noteOffEvent.startTime, false);
|
|
871
|
-
if (notePromise) {
|
|
872
|
-
this.notePromises.push(notePromise);
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
869
|
}
|
|
876
870
|
noteOn(channelNumber, noteNumber, velocity, scheduleTime) {
|
|
877
871
|
scheduleTime ??= this.audioContext.currentTime;
|
|
@@ -887,34 +881,36 @@ export class MidyGM1 {
|
|
|
887
881
|
note.modulationLFO.stop();
|
|
888
882
|
}
|
|
889
883
|
}
|
|
890
|
-
|
|
884
|
+
releaseNote(channel, note, endTime) {
|
|
885
|
+
const volRelease = endTime + note.voiceParams.volRelease;
|
|
886
|
+
const modRelease = endTime + note.voiceParams.modRelease;
|
|
887
|
+
const stopTime = Math.min(volRelease, modRelease);
|
|
888
|
+
note.filterNode.frequency
|
|
889
|
+
.cancelScheduledValues(endTime)
|
|
890
|
+
.linearRampToValueAtTime(0, modRelease);
|
|
891
891
|
note.volumeEnvelopeNode.gain
|
|
892
892
|
.cancelScheduledValues(endTime)
|
|
893
|
-
.linearRampToValueAtTime(0,
|
|
894
|
-
note.ending = true;
|
|
895
|
-
this.scheduleTask(() => {
|
|
896
|
-
note.bufferSource.loop = false;
|
|
897
|
-
}, stopTime);
|
|
893
|
+
.linearRampToValueAtTime(0, volRelease);
|
|
898
894
|
return new Promise((resolve) => {
|
|
899
|
-
|
|
900
|
-
|
|
895
|
+
this.scheduleTask(() => {
|
|
896
|
+
const bufferSource = note.bufferSource;
|
|
897
|
+
bufferSource.loop = false;
|
|
898
|
+
bufferSource.stop(stopTime);
|
|
901
899
|
this.disconnectNote(note);
|
|
900
|
+
channel.scheduledNotes[note.index] = undefined;
|
|
902
901
|
resolve();
|
|
903
|
-
};
|
|
904
|
-
note.bufferSource.stop(stopTime);
|
|
902
|
+
}, stopTime);
|
|
905
903
|
});
|
|
906
904
|
}
|
|
907
|
-
scheduleNoteOff(channelNumber,
|
|
905
|
+
scheduleNoteOff(channelNumber, noteNumber, _velocity, endTime, force) {
|
|
908
906
|
const channel = this.channels[channelNumber];
|
|
909
907
|
if (!force && 0.5 <= channel.state.sustainPedal)
|
|
910
908
|
return;
|
|
911
|
-
const
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
const stopTime = Math.min(volRelease, modRelease);
|
|
917
|
-
return this.stopNote(channel, note, endTime, stopTime);
|
|
909
|
+
const note = this.findNoteOffTarget(channel, noteNumber);
|
|
910
|
+
if (!note)
|
|
911
|
+
return;
|
|
912
|
+
note.ending = true;
|
|
913
|
+
this.releaseNote(channel, note, endTime);
|
|
918
914
|
}
|
|
919
915
|
findNoteOffTarget(channel, noteNumber) {
|
|
920
916
|
const scheduledNotes = channel.scheduledNotes;
|
|
@@ -931,16 +927,14 @@ export class MidyGM1 {
|
|
|
931
927
|
}
|
|
932
928
|
noteOff(channelNumber, noteNumber, velocity, scheduleTime) {
|
|
933
929
|
scheduleTime ??= this.audioContext.currentTime;
|
|
934
|
-
|
|
935
|
-
const note = this.findNoteOffTarget(channel, noteNumber);
|
|
936
|
-
return this.scheduleNoteOff(channelNumber, note, velocity, scheduleTime, false);
|
|
930
|
+
return this.scheduleNoteOff(channelNumber, noteNumber, velocity, scheduleTime, false);
|
|
937
931
|
}
|
|
938
932
|
releaseSustainPedal(channelNumber, halfVelocity, scheduleTime) {
|
|
939
933
|
const velocity = halfVelocity * 2;
|
|
940
934
|
const channel = this.channels[channelNumber];
|
|
941
935
|
const promises = [];
|
|
942
936
|
for (let i = 0; i < channel.sustainNotes.length; i++) {
|
|
943
|
-
const promise = this.scheduleNoteOff(channelNumber, channel.sustainNotes[i], velocity, scheduleTime);
|
|
937
|
+
const promise = this.scheduleNoteOff(channelNumber, channel.sustainNotes[i].noteNumber, velocity, scheduleTime);
|
|
944
938
|
promises.push(promise);
|
|
945
939
|
}
|
|
946
940
|
channel.sustainNotes = [];
|
package/esm/midy-GM2.d.ts
CHANGED
|
@@ -101,8 +101,8 @@ export class MidyGM2 {
|
|
|
101
101
|
};
|
|
102
102
|
initSoundFontTable(): any[];
|
|
103
103
|
addSoundFont(soundFont: any): void;
|
|
104
|
-
loadSoundFont(
|
|
105
|
-
loadMIDI(
|
|
104
|
+
loadSoundFont(input: any): Promise<void>;
|
|
105
|
+
loadMIDI(input: any): Promise<void>;
|
|
106
106
|
setChannelAudioNodes(audioContext: any): {
|
|
107
107
|
gainL: any;
|
|
108
108
|
gainR: any;
|
|
@@ -111,7 +111,8 @@ export class MidyGM2 {
|
|
|
111
111
|
resetChannelTable(channel: any): void;
|
|
112
112
|
createChannels(audioContext: any): any[];
|
|
113
113
|
createNoteBuffer(voiceParams: any, isSF3: any): Promise<any>;
|
|
114
|
-
|
|
114
|
+
isLoopDrum(channel: any, noteNumber: any): boolean;
|
|
115
|
+
createBufferSource(channel: any, noteNumber: any, voiceParams: any, audioBuffer: any): any;
|
|
115
116
|
scheduleTimelineEvents(t: any, resumeTime: any, queueIndex: any): Promise<any>;
|
|
116
117
|
getQueueIndex(second: any): number;
|
|
117
118
|
playNotes(): Promise<any>;
|
|
@@ -184,13 +185,13 @@ export class MidyGM2 {
|
|
|
184
185
|
scheduleNoteOn(channelNumber: any, noteNumber: any, velocity: any, startTime: any, noteOffEvent: any): Promise<void>;
|
|
185
186
|
noteOn(channelNumber: any, noteNumber: any, velocity: any, scheduleTime: any): Promise<void>;
|
|
186
187
|
disconnectNote(note: any): void;
|
|
187
|
-
|
|
188
|
-
scheduleNoteOff(channelNumber: any,
|
|
188
|
+
releaseNote(channel: any, note: any, endTime: any): Promise<any>;
|
|
189
|
+
scheduleNoteOff(channelNumber: any, noteNumber: any, _velocity: any, endTime: any, force: any): void;
|
|
189
190
|
findNoteOffTarget(channel: any, noteNumber: any): any;
|
|
190
|
-
noteOff(channelNumber: any, noteNumber: any, velocity: any, scheduleTime: any):
|
|
191
|
-
releaseSustainPedal(channelNumber: any, halfVelocity: any, scheduleTime: any):
|
|
192
|
-
releaseSostenutoPedal(channelNumber: any, halfVelocity: any, scheduleTime: any):
|
|
193
|
-
handleMIDIMessage(statusByte: any, data1: any, data2: any, scheduleTime: any): void | Promise<
|
|
191
|
+
noteOff(channelNumber: any, noteNumber: any, velocity: any, scheduleTime: any): void;
|
|
192
|
+
releaseSustainPedal(channelNumber: any, halfVelocity: any, scheduleTime: any): void[];
|
|
193
|
+
releaseSostenutoPedal(channelNumber: any, halfVelocity: any, scheduleTime: any): void[];
|
|
194
|
+
handleMIDIMessage(statusByte: any, data1: any, data2: any, scheduleTime: any): void | Promise<void>;
|
|
194
195
|
handleProgramChange(channelNumber: any, programNumber: any, _scheduleTime: any): void;
|
|
195
196
|
handleChannelPressure(channelNumber: any, value: any, scheduleTime: any): void;
|
|
196
197
|
handlePitchBendMessage(channelNumber: any, lsb: any, msb: any, scheduleTime: any): void;
|
|
@@ -240,6 +241,7 @@ export class MidyGM2 {
|
|
|
240
241
|
setSustainPedal(channelNumber: any, value: any, scheduleTime: any): void;
|
|
241
242
|
setPortamento(channelNumber: any, value: any, scheduleTime: any): void;
|
|
242
243
|
setSostenutoPedal(channelNumber: any, value: any, scheduleTime: any): void;
|
|
244
|
+
getSoftPedalFactor(channel: any, note: any): number;
|
|
243
245
|
setSoftPedal(channelNumber: any, softPedal: any, scheduleTime: any): void;
|
|
244
246
|
setReverbSendLevel(channelNumber: any, reverbSendLevel: any, scheduleTime: any): void;
|
|
245
247
|
setChorusSendLevel(channelNumber: any, chorusSendLevel: any, scheduleTime: any): void;
|
|
@@ -306,7 +308,7 @@ export class MidyGM2 {
|
|
|
306
308
|
resetControlTable(table: any): any;
|
|
307
309
|
applyControlTable(channel: any, controllerType: any): void;
|
|
308
310
|
handleControlChangeSysEx(data: any): void;
|
|
309
|
-
getKeyBasedInstrumentControlValue(channel: any, keyNumber: any, controllerType: any):
|
|
311
|
+
getKeyBasedInstrumentControlValue(channel: any, keyNumber: any, controllerType: any): any;
|
|
310
312
|
handleKeyBasedInstrumentControlSysEx(data: any, scheduleTime: any): void;
|
|
311
313
|
handleSysEx(data: any, scheduleTime: any): void;
|
|
312
314
|
scheduleTask(callback: any, scheduleTime: any): Promise<any>;
|
|
@@ -314,7 +316,7 @@ export class MidyGM2 {
|
|
|
314
316
|
declare class Note {
|
|
315
317
|
constructor(noteNumber: any, velocity: any, startTime: any, voice: any, voiceParams: any);
|
|
316
318
|
index: number;
|
|
317
|
-
|
|
319
|
+
ending: boolean;
|
|
318
320
|
bufferSource: any;
|
|
319
321
|
filterNode: any;
|
|
320
322
|
filterDepth: any;
|
package/esm/midy-GM2.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"midy-GM2.d.ts","sourceRoot":"","sources":["../src/midy-GM2.js"],"names":[],"mappings":"AA6IA;IAwCE;;;;;;;;;;;;;;MAcE;IAgCF;;;;;OAmBC;IAxGD,aAAa;IACb,yBAAqB;IACrB,2BAAuB;IACvB;;;MAGE;IACF;;;;;;MAME;IACF,oBAAiB;IACjB,qBAAmB;IACnB,kBAAc;IACd,0BAAwB;IACxB,kBAAc;IACd,mBAAiB;IACjB,kBAAc;IACd,mBAAe;IACf,kBAAgB;IAChB,sBAA2C;IAC3C,kCAA+B;IAC/B,gCAA6B;IAC7B,mBAAkB;IAClB,mBAAkB;IAClB,kBAAiB;IACjB,oBAAmB;IACnB,mBAAkB;IAClB,gBAAc;IACd,mBAAiB;IACjB,oBAAkB;IAClB,2BAAqC;IACrC,+BAEE;IAkBF;;;;;MA4BE;IAGA,kBAAgC;IAChC;;;;;MAAqD;IACrD,kBAA8C;IAC9C,eAAwD;IACxD,qBAGE;IACF;;;;;;;;;;;MAA2D;IAC3D,6BAA+D;IAC/D,gBAAiD;IACjD;;;MAA8D;IAC9D;;;;;;;;MAAyD;IAQ3D,4BAMC;IAED,mCAWC;IAED,
|
|
1
|
+
{"version":3,"file":"midy-GM2.d.ts","sourceRoot":"","sources":["../src/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,8EAWC;IAED,oEAgBC;IAED,+DAKC;IAED,qDAoBC;IAED,6CAIC;IAED,8EAoBC;IAED,oEAwBC;IAED,kEAoBC;IAED,+DAaC;IAED,+GA0BC;IAED,gHA6EC;IAED,4BAYC;IAED,0EAiBC;IAED,8EAoBC;IAED,+DAKC;IAED,qHAyCC;IAED,6FASC;IAED,gCAsBC;IAED,iEAoBC;IAED,qGAqBC;IAED,sDASC;IAED,qFASC;IAED,sFAeC;IAED,wFAkBC;IAED,oGA6BC;IAED,sFAcC;IAED,+EAeC;IAED,wFAGC;IAED,sEAWC;IAED,mEAQC;IAED,mEAQC;IAED,sEAMC;IAED,oEAQC;IAED,uFA6BC;IAED,uFA6BC;IAED,mDAMC;IAED,kDAKC;IAED,gEAKC;IAED;;;;;;;;;;;MAiDC;IAED,oFAOC;IAED,6EAiDC;IAED,qCA2BC;IAED,kGAYC;IAED,+CAEC;IAED,wDAUC;IAED,iFAMC;IAED,wDAkBC;IAED,oFAMC;IAED,yDAaC;IAED,oEAMC;IAED;;;MAMC;IAED,sDAiBC;IAED,8DAMC;IAED,4EAKC;IAED,+CAEC;IAED,sEAGC;IAED,2DAUC;IAED,yEAYC;IAED,uEAMC;IAED,2EAcC;IAED,oDAEC;IAED,0EAeC;IAED,sFA4BC;IAED,sFA4BC;IAED,kFAeC;IAED,2DAMC;IAED,uDAqBC;IAED,gDAEC;IAED,gDAEC;IAED,sEAGC;IAED,qEAKC;IAED,2EAWC;IAED,iEAKC;IAED,uEASC;IAED,mEAKC;IAED,yEASC;IAED,2EASC;IAED,gGAMC;IAED,gFAGC;IAED,yCAwBC;IAGD,8EAoCC;IAED,gFAGC;IAED,iEAEC;IAED,gEAEC;IAED,gEAIC;IAED,gEAIC;IAED,+EAgCC;IAED,qCAcC;IAED,qCAcC;IAED,4EAwCC;IAED,4DAGC;IAED,sDASC;IAED,gEAGC;IAED,yDAWC;IAED,kEAGC;IAED,2DAWC;IAED,sEAeC;IAED,4CAOC;IAED,+BAKC;IAED,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