@marmooo/midy 0.2.9 → 0.3.0
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 -6
- package/esm/midy-GM1.d.ts.map +1 -1
- package/esm/midy-GM1.js +72 -55
- package/esm/midy-GM2.d.ts +14 -10
- package/esm/midy-GM2.d.ts.map +1 -1
- package/esm/midy-GM2.js +189 -87
- package/esm/midy-GMLite.d.ts +11 -8
- package/esm/midy-GMLite.d.ts.map +1 -1
- package/esm/midy-GMLite.js +124 -61
- package/esm/midy.d.ts +14 -10
- package/esm/midy.d.ts.map +1 -1
- package/esm/midy.js +190 -87
- package/package.json +1 -1
- package/script/midy-GM1.d.ts +8 -6
- package/script/midy-GM1.d.ts.map +1 -1
- package/script/midy-GM1.js +72 -55
- package/script/midy-GM2.d.ts +14 -10
- package/script/midy-GM2.d.ts.map +1 -1
- package/script/midy-GM2.js +189 -87
- package/script/midy-GMLite.d.ts +11 -8
- package/script/midy-GMLite.d.ts.map +1 -1
- package/script/midy-GMLite.js +124 -61
- package/script/midy.d.ts +14 -10
- package/script/midy.d.ts.map +1 -1
- package/script/midy.js +190 -87
package/script/midy-GM1.js
CHANGED
|
@@ -179,6 +179,12 @@ class MidyGM1 {
|
|
|
179
179
|
writable: true,
|
|
180
180
|
value: "GM1"
|
|
181
181
|
});
|
|
182
|
+
Object.defineProperty(this, "numChannels", {
|
|
183
|
+
enumerable: true,
|
|
184
|
+
configurable: true,
|
|
185
|
+
writable: true,
|
|
186
|
+
value: 16
|
|
187
|
+
});
|
|
182
188
|
Object.defineProperty(this, "ticksPerBeat", {
|
|
183
189
|
enumerable: true,
|
|
184
190
|
configurable: true,
|
|
@@ -293,11 +299,11 @@ class MidyGM1 {
|
|
|
293
299
|
writable: true,
|
|
294
300
|
value: []
|
|
295
301
|
});
|
|
296
|
-
Object.defineProperty(this, "
|
|
302
|
+
Object.defineProperty(this, "exclusiveClassNotes", {
|
|
297
303
|
enumerable: true,
|
|
298
304
|
configurable: true,
|
|
299
305
|
writable: true,
|
|
300
|
-
value: new
|
|
306
|
+
value: new Array(128)
|
|
301
307
|
});
|
|
302
308
|
this.audioContext = audioContext;
|
|
303
309
|
this.masterVolume = new GainNode(audioContext);
|
|
@@ -364,8 +370,10 @@ class MidyGM1 {
|
|
|
364
370
|
};
|
|
365
371
|
}
|
|
366
372
|
createChannels(audioContext) {
|
|
367
|
-
const channels = Array.from({ length:
|
|
373
|
+
const channels = Array.from({ length: this.numChannels }, () => {
|
|
368
374
|
return {
|
|
375
|
+
currentBufferSource: null,
|
|
376
|
+
isDrum: false,
|
|
369
377
|
...this.constructor.channelSettings,
|
|
370
378
|
state: new ControllerState(),
|
|
371
379
|
...this.setChannelAudioNodes(audioContext),
|
|
@@ -470,7 +478,7 @@ class MidyGM1 {
|
|
|
470
478
|
if (queueIndex >= this.timeline.length) {
|
|
471
479
|
await Promise.all(this.notePromises);
|
|
472
480
|
this.notePromises = [];
|
|
473
|
-
this.
|
|
481
|
+
this.exclusiveClassNotes.flll(undefined);
|
|
474
482
|
this.audioBufferCache.clear();
|
|
475
483
|
resolve();
|
|
476
484
|
return;
|
|
@@ -489,7 +497,7 @@ class MidyGM1 {
|
|
|
489
497
|
else if (this.isStopping) {
|
|
490
498
|
await this.stopNotes(0, true, now);
|
|
491
499
|
this.notePromises = [];
|
|
492
|
-
this.
|
|
500
|
+
this.exclusiveClassNotes.fill(undefined);
|
|
493
501
|
this.audioBufferCache.clear();
|
|
494
502
|
resolve();
|
|
495
503
|
this.isStopping = false;
|
|
@@ -498,7 +506,7 @@ class MidyGM1 {
|
|
|
498
506
|
}
|
|
499
507
|
else if (this.isSeeking) {
|
|
500
508
|
this.stopNotes(0, true, now);
|
|
501
|
-
this.
|
|
509
|
+
this.exclusiveClassNotes.fill(undefined);
|
|
502
510
|
this.startTime = this.audioContext.currentTime;
|
|
503
511
|
queueIndex = this.getQueueIndex(this.resumeTime);
|
|
504
512
|
offset = this.resumeTime - this.startTime;
|
|
@@ -526,7 +534,7 @@ class MidyGM1 {
|
|
|
526
534
|
extractMidiData(midi) {
|
|
527
535
|
const instruments = new Set();
|
|
528
536
|
const timeline = [];
|
|
529
|
-
const tmpChannels = new Array(
|
|
537
|
+
const tmpChannels = new Array(this.channels.length);
|
|
530
538
|
for (let i = 0; i < tmpChannels.length; i++) {
|
|
531
539
|
tmpChannels[i] = {
|
|
532
540
|
programNumber: -1,
|
|
@@ -618,6 +626,9 @@ class MidyGM1 {
|
|
|
618
626
|
if (!this.isPlaying)
|
|
619
627
|
return;
|
|
620
628
|
this.isStopping = true;
|
|
629
|
+
for (let i = 0; i < this.channels.length; i++) {
|
|
630
|
+
this.resetAllStates(i);
|
|
631
|
+
}
|
|
621
632
|
}
|
|
622
633
|
pause() {
|
|
623
634
|
if (!this.isPlaying || this.isPaused)
|
|
@@ -795,8 +806,8 @@ class MidyGM1 {
|
|
|
795
806
|
note.modulationLFO.connect(note.volumeDepth);
|
|
796
807
|
note.volumeDepth.connect(note.volumeEnvelopeNode.gain);
|
|
797
808
|
}
|
|
798
|
-
async getAudioBuffer(
|
|
799
|
-
const audioBufferId = this.getAudioBufferId(
|
|
809
|
+
async getAudioBuffer(programNumber, noteNumber, velocity, voiceParams, isSF3) {
|
|
810
|
+
const audioBufferId = this.getAudioBufferId(programNumber, noteNumber, velocity);
|
|
800
811
|
const cache = this.audioBufferCache.get(audioBufferId);
|
|
801
812
|
if (cache) {
|
|
802
813
|
cache.counter += 1;
|
|
@@ -819,7 +830,7 @@ class MidyGM1 {
|
|
|
819
830
|
const controllerState = this.getControllerState(channel, noteNumber, velocity);
|
|
820
831
|
const voiceParams = voice.getAllParams(controllerState);
|
|
821
832
|
const note = new Note(noteNumber, velocity, startTime, voice, voiceParams);
|
|
822
|
-
const audioBuffer = await this.getAudioBuffer(channel.
|
|
833
|
+
const audioBuffer = await this.getAudioBuffer(channel.programNumber, noteNumber, velocity, voiceParams, isSF3);
|
|
823
834
|
note.bufferSource = this.createBufferSource(audioBuffer, voiceParams);
|
|
824
835
|
note.volumeEnvelopeNode = new GainNode(this.audioContext);
|
|
825
836
|
note.filterNode = new BiquadFilterNode(this.audioContext, {
|
|
@@ -837,14 +848,28 @@ class MidyGM1 {
|
|
|
837
848
|
note.bufferSource.start(startTime);
|
|
838
849
|
return note;
|
|
839
850
|
}
|
|
851
|
+
handleExclusiveClass(note, channelNumber, startTime) {
|
|
852
|
+
const exclusiveClass = note.voiceParams.exclusiveClass;
|
|
853
|
+
if (exclusiveClass === 0)
|
|
854
|
+
return;
|
|
855
|
+
const prev = this.exclusiveClassNotes[exclusiveClass];
|
|
856
|
+
if (prev) {
|
|
857
|
+
const [prevNote, prevChannelNumber] = prev;
|
|
858
|
+
if (prevNote && !prevNote.ending) {
|
|
859
|
+
this.scheduleNoteOff(prevChannelNumber, prevNote.noteNumber, 0, // velocity,
|
|
860
|
+
startTime, true);
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
this.exclusiveClassNotes[exclusiveClass] = [note, channelNumber];
|
|
864
|
+
}
|
|
840
865
|
async scheduleNoteOn(channelNumber, noteNumber, velocity, startTime) {
|
|
841
866
|
const channel = this.channels[channelNumber];
|
|
842
867
|
const bankNumber = channel.bank;
|
|
843
|
-
const soundFontIndex = this.soundFontTable[channel.
|
|
868
|
+
const soundFontIndex = this.soundFontTable[channel.programNumber].get(bankNumber);
|
|
844
869
|
if (soundFontIndex === undefined)
|
|
845
870
|
return;
|
|
846
871
|
const soundFont = this.soundFonts[soundFontIndex];
|
|
847
|
-
const voice = soundFont.getVoice(bankNumber, channel.
|
|
872
|
+
const voice = soundFont.getVoice(bankNumber, channel.programNumber, noteNumber, velocity);
|
|
848
873
|
if (!voice)
|
|
849
874
|
return;
|
|
850
875
|
const isSF3 = soundFont.parsed.info.version.major === 3;
|
|
@@ -854,30 +879,31 @@ class MidyGM1 {
|
|
|
854
879
|
if (0.5 <= channel.state.sustainPedal) {
|
|
855
880
|
channel.sustainNotes.push(note);
|
|
856
881
|
}
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
const [prevNote, prevChannelNumber] = prevEntry;
|
|
862
|
-
if (prevNote && !prevNote.ending) {
|
|
863
|
-
this.scheduleNoteOff(prevChannelNumber, prevNote.noteNumber, 0, // velocity,
|
|
864
|
-
startTime, true);
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
this.exclusiveClassMap.set(exclusiveClass, [note, channelNumber]);
|
|
868
|
-
}
|
|
869
|
-
const scheduledNotes = channel.scheduledNotes;
|
|
870
|
-
if (scheduledNotes.has(noteNumber)) {
|
|
871
|
-
scheduledNotes.get(noteNumber).push(note);
|
|
882
|
+
this.handleExclusiveClass(note, channelNumber, startTime);
|
|
883
|
+
let notes = scheduledNotes.get(noteNumber);
|
|
884
|
+
if (notes) {
|
|
885
|
+
notes.push(note);
|
|
872
886
|
}
|
|
873
887
|
else {
|
|
874
|
-
|
|
888
|
+
notes = [note];
|
|
889
|
+
scheduledNotes.set(noteNumber, notes);
|
|
875
890
|
}
|
|
876
891
|
}
|
|
877
892
|
noteOn(channelNumber, noteNumber, velocity, scheduleTime) {
|
|
878
893
|
scheduleTime ??= this.audioContext.currentTime;
|
|
879
894
|
return this.scheduleNoteOn(channelNumber, noteNumber, velocity, scheduleTime);
|
|
880
895
|
}
|
|
896
|
+
disconnectNote(note, scheduledNotes, index) {
|
|
897
|
+
scheduledNotes[index] = null;
|
|
898
|
+
note.bufferSource.disconnect();
|
|
899
|
+
note.filterNode.disconnect();
|
|
900
|
+
note.volumeEnvelopeNode.disconnect();
|
|
901
|
+
if (note.modulationDepth) {
|
|
902
|
+
note.volumeDepth.disconnect();
|
|
903
|
+
note.modulationDepth.disconnect();
|
|
904
|
+
note.modulationLFO.stop();
|
|
905
|
+
}
|
|
906
|
+
}
|
|
881
907
|
stopNote(endTime, stopTime, scheduledNotes, index) {
|
|
882
908
|
const note = scheduledNotes[index];
|
|
883
909
|
note.volumeEnvelopeNode.gain
|
|
@@ -889,15 +915,7 @@ class MidyGM1 {
|
|
|
889
915
|
}, stopTime);
|
|
890
916
|
return new Promise((resolve) => {
|
|
891
917
|
note.bufferSource.onended = () => {
|
|
892
|
-
scheduledNotes
|
|
893
|
-
note.bufferSource.disconnect();
|
|
894
|
-
note.filterNode.disconnect();
|
|
895
|
-
note.volumeEnvelopeNode.disconnect();
|
|
896
|
-
if (note.modulationDepth) {
|
|
897
|
-
note.volumeDepth.disconnect();
|
|
898
|
-
note.modulationDepth.disconnect();
|
|
899
|
-
note.modulationLFO.stop();
|
|
900
|
-
}
|
|
918
|
+
this.disconnectNote(note, scheduledNotes, index);
|
|
901
919
|
resolve();
|
|
902
920
|
};
|
|
903
921
|
note.bufferSource.stop(stopTime);
|
|
@@ -958,9 +976,9 @@ class MidyGM1 {
|
|
|
958
976
|
console.warn(`Unsupported MIDI message: ${messageType.toString(16)}`);
|
|
959
977
|
}
|
|
960
978
|
}
|
|
961
|
-
handleProgramChange(channelNumber,
|
|
979
|
+
handleProgramChange(channelNumber, programNumber, _scheduleTime) {
|
|
962
980
|
const channel = this.channels[channelNumber];
|
|
963
|
-
channel.
|
|
981
|
+
channel.programNumber = programNumber;
|
|
964
982
|
}
|
|
965
983
|
handlePitchBendMessage(channelNumber, lsb, msb, scheduleTime) {
|
|
966
984
|
const pitchBend = msb * 128 + lsb;
|
|
@@ -968,8 +986,6 @@ class MidyGM1 {
|
|
|
968
986
|
}
|
|
969
987
|
setPitchBend(channelNumber, value, scheduleTime) {
|
|
970
988
|
const channel = this.channels[channelNumber];
|
|
971
|
-
if (channel.isDrum)
|
|
972
|
-
return;
|
|
973
989
|
scheduleTime ??= this.audioContext.currentTime;
|
|
974
990
|
const state = channel.state;
|
|
975
991
|
const prev = state.pitchWheel * 2 - 1;
|
|
@@ -1132,8 +1148,6 @@ class MidyGM1 {
|
|
|
1132
1148
|
}
|
|
1133
1149
|
setModulationDepth(channelNumber, modulation, scheduleTime) {
|
|
1134
1150
|
const channel = this.channels[channelNumber];
|
|
1135
|
-
if (channel.isDrum)
|
|
1136
|
-
return;
|
|
1137
1151
|
scheduleTime ??= this.audioContext.currentTime;
|
|
1138
1152
|
channel.state.modulationDepth = modulation / 127;
|
|
1139
1153
|
this.updateModulation(channel, scheduleTime);
|
|
@@ -1180,8 +1194,6 @@ class MidyGM1 {
|
|
|
1180
1194
|
}
|
|
1181
1195
|
setSustainPedal(channelNumber, value, scheduleTime) {
|
|
1182
1196
|
const channel = this.channels[channelNumber];
|
|
1183
|
-
if (channel.isDrum)
|
|
1184
|
-
return;
|
|
1185
1197
|
scheduleTime ??= this.audioContext.currentTime;
|
|
1186
1198
|
channel.state.sustainPedal = value / 127;
|
|
1187
1199
|
if (64 <= value) {
|
|
@@ -1254,8 +1266,6 @@ class MidyGM1 {
|
|
|
1254
1266
|
}
|
|
1255
1267
|
setPitchBendRange(channelNumber, value, scheduleTime) {
|
|
1256
1268
|
const channel = this.channels[channelNumber];
|
|
1257
|
-
if (channel.isDrum)
|
|
1258
|
-
return;
|
|
1259
1269
|
scheduleTime ??= this.audioContext.currentTime;
|
|
1260
1270
|
const state = channel.state;
|
|
1261
1271
|
const prev = state.pitchWheelSensitivity;
|
|
@@ -1273,8 +1283,6 @@ class MidyGM1 {
|
|
|
1273
1283
|
}
|
|
1274
1284
|
setFineTuning(channelNumber, value, scheduleTime) {
|
|
1275
1285
|
const channel = this.channels[channelNumber];
|
|
1276
|
-
if (channel.isDrum)
|
|
1277
|
-
return;
|
|
1278
1286
|
scheduleTime ??= this.audioContext.currentTime;
|
|
1279
1287
|
const prev = channel.fineTuning;
|
|
1280
1288
|
const next = (value - 8192) / 8.192; // cent
|
|
@@ -1290,8 +1298,6 @@ class MidyGM1 {
|
|
|
1290
1298
|
}
|
|
1291
1299
|
setCoarseTuning(channelNumber, value, scheduleTime) {
|
|
1292
1300
|
const channel = this.channels[channelNumber];
|
|
1293
|
-
if (channel.isDrum)
|
|
1294
|
-
return;
|
|
1295
1301
|
scheduleTime ??= this.audioContext.currentTime;
|
|
1296
1302
|
const prev = channel.coarseTuning;
|
|
1297
1303
|
const next = (value - 64) * 100; // cent
|
|
@@ -1303,12 +1309,24 @@ class MidyGM1 {
|
|
|
1303
1309
|
scheduleTime ??= this.audioContext.currentTime;
|
|
1304
1310
|
return this.stopChannelNotes(channelNumber, 0, true, scheduleTime);
|
|
1305
1311
|
}
|
|
1312
|
+
resetAllStates(channelNumber) {
|
|
1313
|
+
const channel = this.channels[channelNumber];
|
|
1314
|
+
const state = channel.state;
|
|
1315
|
+
for (const type of Object.keys(defaultControllerState)) {
|
|
1316
|
+
state[type] = defaultControllerState[type].defaultValue;
|
|
1317
|
+
}
|
|
1318
|
+
for (const type of Object.keys(this.constructor.channelSettings)) {
|
|
1319
|
+
channel[type] = this.constructor.channelSettings[type];
|
|
1320
|
+
}
|
|
1321
|
+
this.mode = "GM1";
|
|
1322
|
+
}
|
|
1323
|
+
// https://amei.or.jp/midistandardcommittee/Recommended_Practice/e/rp15.pdf
|
|
1306
1324
|
resetAllControllers(channelNumber) {
|
|
1307
1325
|
const stateTypes = [
|
|
1326
|
+
"pitchWheel",
|
|
1308
1327
|
"expression",
|
|
1309
1328
|
"modulationDepth",
|
|
1310
1329
|
"sustainPedal",
|
|
1311
|
-
"pitchWheelSensitivity",
|
|
1312
1330
|
];
|
|
1313
1331
|
const channel = this.channels[channelNumber];
|
|
1314
1332
|
const state = channel.state;
|
|
@@ -1397,6 +1415,7 @@ class MidyGM1 {
|
|
|
1397
1415
|
console.warn(`Unsupported Exclusive Message: ${data}`);
|
|
1398
1416
|
}
|
|
1399
1417
|
}
|
|
1418
|
+
// https://github.com/marmooo/js-timer-benchmark
|
|
1400
1419
|
scheduleTask(callback, scheduleTime) {
|
|
1401
1420
|
return new Promise((resolve) => {
|
|
1402
1421
|
const bufferSource = new AudioBufferSourceNode(this.audioContext, {
|
|
@@ -1422,10 +1441,8 @@ Object.defineProperty(MidyGM1, "channelSettings", {
|
|
|
1422
1441
|
configurable: true,
|
|
1423
1442
|
writable: true,
|
|
1424
1443
|
value: {
|
|
1425
|
-
currentBufferSource: null,
|
|
1426
|
-
isDrum: false,
|
|
1427
1444
|
detune: 0,
|
|
1428
|
-
|
|
1445
|
+
programNumber: 0,
|
|
1429
1446
|
bank: 0,
|
|
1430
1447
|
dataMSB: 0,
|
|
1431
1448
|
dataLSB: 0,
|
package/script/midy-GM2.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
export class MidyGM2 {
|
|
2
2
|
static channelSettings: {
|
|
3
|
-
currentBufferSource: null;
|
|
4
|
-
isDrum: boolean;
|
|
5
3
|
detune: number;
|
|
6
|
-
|
|
4
|
+
programNumber: number;
|
|
7
5
|
bank: number;
|
|
8
6
|
bankMSB: number;
|
|
9
7
|
bankLSB: number;
|
|
@@ -23,8 +21,6 @@ export class MidyGM2 {
|
|
|
23
21
|
};
|
|
24
22
|
});
|
|
25
23
|
mode: string;
|
|
26
|
-
ticksPerBeat: number;
|
|
27
|
-
totalTime: number;
|
|
28
24
|
masterFineTuning: number;
|
|
29
25
|
masterCoarseTuning: number;
|
|
30
26
|
reverb: {
|
|
@@ -38,6 +34,9 @@ export class MidyGM2 {
|
|
|
38
34
|
sendToReverb: number;
|
|
39
35
|
delayTimes: any[];
|
|
40
36
|
};
|
|
37
|
+
numChannels: number;
|
|
38
|
+
ticksPerBeat: number;
|
|
39
|
+
totalTime: number;
|
|
41
40
|
noteCheckInterval: number;
|
|
42
41
|
lookAhead: number;
|
|
43
42
|
startDelay: number;
|
|
@@ -55,7 +54,8 @@ export class MidyGM2 {
|
|
|
55
54
|
timeline: any[];
|
|
56
55
|
instruments: any[];
|
|
57
56
|
notePromises: any[];
|
|
58
|
-
|
|
57
|
+
exclusiveClassNotes: any[];
|
|
58
|
+
drumExclusiveClassNotes: any[];
|
|
59
59
|
defaultOptions: {
|
|
60
60
|
reverbAlgorithm: (audioContext: any) => {
|
|
61
61
|
input: any;
|
|
@@ -135,8 +135,7 @@ export class MidyGM2 {
|
|
|
135
135
|
};
|
|
136
136
|
createChannels(audioContext: any): any[];
|
|
137
137
|
createNoteBuffer(voiceParams: any, isSF3: any): Promise<any>;
|
|
138
|
-
|
|
139
|
-
createBufferSource(channel: any, note: any, voiceParams: any, audioBuffer: any): any;
|
|
138
|
+
createBufferSource(voiceParams: any, audioBuffer: any): any;
|
|
140
139
|
findPortamentoTarget(queueIndex: any): any;
|
|
141
140
|
scheduleTimelineEvents(t: any, offset: any, queueIndex: any): Promise<any>;
|
|
142
141
|
getQueueIndex(second: any): number;
|
|
@@ -199,18 +198,22 @@ export class MidyGM2 {
|
|
|
199
198
|
setFilterEnvelope(channel: any, note: any, scheduleTime: any): void;
|
|
200
199
|
startModulation(channel: any, note: any, scheduleTime: any): void;
|
|
201
200
|
startVibrato(channel: any, note: any, scheduleTime: any): void;
|
|
202
|
-
getAudioBuffer(
|
|
201
|
+
getAudioBuffer(programNumber: any, noteNumber: any, velocity: any, voiceParams: any, isSF3: any): Promise<any>;
|
|
203
202
|
createNote(channel: any, voice: any, noteNumber: any, velocity: any, startTime: any, portamento: any, isSF3: any): Promise<Note>;
|
|
204
203
|
calcBank(channel: any): any;
|
|
204
|
+
handleExclusiveClass(note: any, channelNumber: any, startTime: any): void;
|
|
205
|
+
handleDrumExclusiveClass(note: any, channelNumber: any, startTime: any): void;
|
|
206
|
+
isDrumNoteOffException(channel: any, noteNumber: any): boolean;
|
|
205
207
|
scheduleNoteOn(channelNumber: any, noteNumber: any, velocity: any, startTime: any, portamento: any): Promise<void>;
|
|
206
208
|
noteOn(channelNumber: any, noteNumber: any, velocity: any, scheduleTime: any): Promise<void>;
|
|
209
|
+
disconnectNote(note: any, scheduledNotes: any, index: any): void;
|
|
207
210
|
stopNote(endTime: any, stopTime: any, scheduledNotes: any, index: any): Promise<any>;
|
|
208
211
|
scheduleNoteOff(channelNumber: any, noteNumber: any, _velocity: any, endTime: any, force: any, portamentoNoteNumber: any): Promise<any> | undefined;
|
|
209
212
|
noteOff(channelNumber: any, noteNumber: any, velocity: any, scheduleTime: any): Promise<any> | undefined;
|
|
210
213
|
releaseSustainPedal(channelNumber: any, halfVelocity: any, scheduleTime: any): (Promise<any> | undefined)[];
|
|
211
214
|
releaseSostenutoPedal(channelNumber: any, halfVelocity: any, scheduleTime: any): any[];
|
|
212
215
|
handleMIDIMessage(statusByte: any, data1: any, data2: any, scheduleTime: any): void | Promise<any>;
|
|
213
|
-
handleProgramChange(channelNumber: any,
|
|
216
|
+
handleProgramChange(channelNumber: any, programNumber: any, _scheduleTime: any): void;
|
|
214
217
|
handleChannelPressure(channelNumber: any, value: any, scheduleTime: any): void;
|
|
215
218
|
handlePitchBendMessage(channelNumber: any, lsb: any, msb: any, scheduleTime: any): void;
|
|
216
219
|
setPitchBend(channelNumber: any, value: any, scheduleTime: any): void;
|
|
@@ -301,6 +304,7 @@ export class MidyGM2 {
|
|
|
301
304
|
handleModulationDepthRangeRPN(channelNumber: any, scheduleTime: any): void;
|
|
302
305
|
setModulationDepthRange(channelNumber: any, modulationDepthRange: any, scheduleTime: any): void;
|
|
303
306
|
allSoundOff(channelNumber: any, _value: any, scheduleTime: any): Promise<any[]>;
|
|
307
|
+
resetAllStates(channelNumber: any): void;
|
|
304
308
|
resetAllControllers(channelNumber: any): void;
|
|
305
309
|
allNotesOff(channelNumber: any, _value: any, scheduleTime: any): Promise<any[]>;
|
|
306
310
|
omniOff(channelNumber: any, value: any, scheduleTime: any): void;
|
package/script/midy-GM2.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"midy-GM2.d.ts","sourceRoot":"","sources":["../src/midy-GM2.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"midy-GM2.d.ts","sourceRoot":"","sources":["../src/midy-GM2.js"],"names":[],"mappings":"AAgNA;IAwCE;;;;;;;;;;;;;;MAcE;IAgCF;;;;;OAmBC;IAxGD,aAAa;IACb,yBAAqB;IACrB,2BAAuB;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