@marmooo/midy 0.4.0 → 0.4.1
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/README.md +2 -1
- package/esm/midy-GM1.d.ts +3 -3
- package/esm/midy-GM1.d.ts.map +1 -1
- package/esm/midy-GM1.js +43 -30
- package/esm/midy-GM2.d.ts +3 -3
- package/esm/midy-GM2.d.ts.map +1 -1
- package/esm/midy-GM2.js +49 -36
- package/esm/midy-GMLite.d.ts +3 -3
- package/esm/midy-GMLite.d.ts.map +1 -1
- package/esm/midy-GMLite.js +35 -23
- package/esm/midy.d.ts +10 -8
- package/esm/midy.d.ts.map +1 -1
- package/esm/midy.js +122 -52
- package/package.json +2 -2
- package/script/midy-GM1.d.ts +3 -3
- package/script/midy-GM1.d.ts.map +1 -1
- package/script/midy-GM1.js +43 -30
- package/script/midy-GM2.d.ts +3 -3
- package/script/midy-GM2.d.ts.map +1 -1
- package/script/midy-GM2.js +49 -36
- package/script/midy-GMLite.d.ts +3 -3
- package/script/midy-GMLite.d.ts.map +1 -1
- package/script/midy-GMLite.js +35 -23
- package/script/midy.d.ts +10 -8
- package/script/midy.d.ts.map +1 -1
- package/script/midy.js +122 -52
package/README.md
CHANGED
|
@@ -22,6 +22,7 @@ This library provides several files depending on the implementation level.
|
|
|
22
22
|
|
|
23
23
|
- [@marmooo/midi-player](https://marmooo.github.io/midi-player/) - GUI library
|
|
24
24
|
- [Humidy](https://marmooo.github.io/humidy/) - GM2 MIDI mixer app
|
|
25
|
+
- [Timidy](https://marmooo.github.io/timidy/) - Timidity++ style MIDI player
|
|
25
26
|
|
|
26
27
|
## Support Status
|
|
27
28
|
|
|
@@ -54,7 +55,7 @@ All implementations follow the specification.
|
|
|
54
55
|
import { Midy } from "midy.js";
|
|
55
56
|
|
|
56
57
|
const audioContext = new AudioContext();
|
|
57
|
-
await audioContext.suspend();
|
|
58
|
+
if (audioContext.state === "running") await audioContext.suspend();
|
|
58
59
|
const midy = new Midy(audioContext);
|
|
59
60
|
await midy.loadMIDI("test.mid");
|
|
60
61
|
await midy.loadSoundFont("test.sf3");
|
package/esm/midy-GM1.d.ts
CHANGED
|
@@ -112,13 +112,13 @@ export class MidyGM1 {
|
|
|
112
112
|
noteOn(channelNumber: any, noteNumber: any, velocity: any, startTime: any): Promise<void>;
|
|
113
113
|
disconnectNote(note: any): void;
|
|
114
114
|
releaseNote(channel: any, note: any, endTime: any): Promise<any>;
|
|
115
|
-
noteOff(channelNumber: any, noteNumber: any, velocity: any, endTime: any, force: any):
|
|
115
|
+
noteOff(channelNumber: any, noteNumber: any, velocity: any, endTime: any, force: any): Promise<any> | undefined;
|
|
116
116
|
setNoteIndex(channel: any, index: any): void;
|
|
117
117
|
findNoteOffIndex(channel: any, noteNumber: any): any;
|
|
118
|
-
releaseSustainPedal(channelNumber: any, halfVelocity: any, scheduleTime: any):
|
|
118
|
+
releaseSustainPedal(channelNumber: any, halfVelocity: any, scheduleTime: any): (Promise<any> | undefined)[];
|
|
119
119
|
createMessageHandlers(): any[];
|
|
120
120
|
handleMessage(data: any, scheduleTime: any): void;
|
|
121
|
-
handleChannelMessage(statusByte: any, data1: any, data2: any, scheduleTime: any): void | Promise<
|
|
121
|
+
handleChannelMessage(statusByte: any, data1: any, data2: any, scheduleTime: any): void | Promise<any>;
|
|
122
122
|
setProgramChange(channelNumber: any, programNumber: any, _scheduleTime: any): void;
|
|
123
123
|
handlePitchBendMessage(channelNumber: any, lsb: any, msb: any, scheduleTime: any): void;
|
|
124
124
|
setPitchBend(channelNumber: any, value: any, scheduleTime: any): void;
|
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":"AA6FA;IA0BE;;;;;;;;;;;MAWE;IAEF,+BAeC;IArDD,aAAa;IACb,oBAAiB;IACjB,qBAAmB;IACnB,kBAAc;IACd,0BAAwB;IACxB,kBAAc;IACd,mBAAiB;IACjB,kBAAc;IACd,mBAAe;IACf,kBAAgB;IAChB,0BAAuD;IACvD,4BAAyB;IACzB,0BAAuB;IACvB,kCAA+B;IAC/B,mBAAkB;IAClB,mBAAkB;IAClB,kBAAiB;IACjB,oBAAmB;IACnB,mBAAkB;IAClB,iBAAY;IACZ,gBAAc;IACd,oBAAkB;IAClB,sBAAwB;IACxB,2BAAqC;IAgBnC,kBAAgC;IAChC,kBAA8C;IAC9C,eAAwD;IACxD,qBAGE;IACF,uBAAmD;IACnD;;;;;;;;;;;MAA2D;IAC3D,6BAA+D;IAC/D,gBAAiD;IAMnD,mCASC;IAED,2DAYC;IAED,yCAmBC;IAED,oCASC;IAED,sBAoCC;IAED,8DAWC;IAED;;;;MAeC;IAED,yCAaC;IAED,
|
|
1
|
+
{"version":3,"file":"midy-GM1.d.ts","sourceRoot":"","sources":["../src/midy-GM1.js"],"names":[],"mappings":"AA6FA;IA0BE;;;;;;;;;;;MAWE;IAEF,+BAeC;IArDD,aAAa;IACb,oBAAiB;IACjB,qBAAmB;IACnB,kBAAc;IACd,0BAAwB;IACxB,kBAAc;IACd,mBAAiB;IACjB,kBAAc;IACd,mBAAe;IACf,kBAAgB;IAChB,0BAAuD;IACvD,4BAAyB;IACzB,0BAAuB;IACvB,kCAA+B;IAC/B,mBAAkB;IAClB,mBAAkB;IAClB,kBAAiB;IACjB,oBAAmB;IACnB,mBAAkB;IAClB,iBAAY;IACZ,gBAAc;IACd,oBAAkB;IAClB,sBAAwB;IACxB,2BAAqC;IAgBnC,kBAAgC;IAChC,kBAA8C;IAC9C,eAAwD;IACxD,qBAGE;IACF,uBAAmD;IACnD;;;;;;;;;;;MAA2D;IAC3D,6BAA+D;IAC/D,gBAAiD;IAMnD,mCASC;IAED,2DAYC;IAED,yCAmBC;IAED,oCASC;IAED,sBAoCC;IAED,8DAWC;IAED;;;;MAeC;IAED,yCAaC;IAED,kDASC;IAED,4DASC;IAED,yEAoDC;IAED,mCAOC;IAED,uBASC;IAED,yDA2BC;IAED,2BA8CC;IAED,uDAEC;IAED,wDAEC;IAED,qCAKC;IAED;;;MAwDC;IAED,kGAeC;IAED,mGAeC;IAED,wEAMC;IAED,uBAMC;IAED,sBAKC;IAED,uBAQC;IAED,wBAKC;IAED,0BAKC;IAED,wBAOC;IAED,sBAIC;IAED,yDAQC;IAED,yEASC;IAED,2BAEC;IAED,8BAEC;IAED,8BAEC;IAED,4BAEC;IAED,qCAMC;IAED,2DAIC;IAED,+DAIC;IAED,sDAeC;IAED,qDAoBC;IAED,6CAIC;IAED,sDAsBC;IAED,kEAoBC;IAED,4GAkCC;IAED,uEAwCC;IAED,0EAiBC;IAED,oEASC;IAED,0FAwBC;IAED,gCASC;IAED,iEAqBC;IAED,gHAqBC;IAED,6CAUC;IAED,qDAUC;IAED,4GAeC;IAED,+BAmBC;IAED,kDAOC;IAED,sGA2BC;IAED,mFAGC;IAED,wFAGC;IAED,sEAUC;IAED,mEAYC;IAED,wDAKC;IAED,sDAOC;IAED,mDAMC;IAED,kDAKC;IAED;;;;;;;;;;;MAiCC;IAED,oFAMC;IAED,6EA2BC;IAED,qCAeC;IAED,+FAWC;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,iEAMC;IAED,uEAQC;IAED,mEAKC;IAED,yEAQC;IAED,gFAGC;IAED,6CAqBC;IAGD,8EAgCC;IAED,gFAGC;IAED,+EAgBC;IAED,qCASC;IAED,4EAaC;IAED,4DAGC;IAED,qDAKC;IAED,gDAYC;IAGD,6DAgBC;CACF"}
|
package/esm/midy-GM1.js
CHANGED
|
@@ -86,11 +86,11 @@ const defaultControllerState = {
|
|
|
86
86
|
pitchWheel: { type: 14, defaultValue: 8192 / 16383 },
|
|
87
87
|
pitchWheelSensitivity: { type: 16, defaultValue: 2 / 128 },
|
|
88
88
|
link: { type: 127, defaultValue: 0 },
|
|
89
|
-
|
|
89
|
+
modulationDepthMSB: { type: 128 + 1, defaultValue: 0 },
|
|
90
90
|
// dataMSB: { type: 128 + 6, defaultValue: 0, },
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
volumeMSB: { type: 128 + 7, defaultValue: 100 / 127 },
|
|
92
|
+
panMSB: { type: 128 + 10, defaultValue: 64 / 127 },
|
|
93
|
+
expressionMSB: { type: 128 + 11, defaultValue: 1 },
|
|
94
94
|
// dataLSB: { type: 128 + 38, defaultValue: 0, },
|
|
95
95
|
sustainPedal: { type: 128 + 64, defaultValue: 0 },
|
|
96
96
|
// rpnLSB: { type: 128 + 100, defaultValue: 127 },
|
|
@@ -410,7 +410,7 @@ export class MidyGM1 {
|
|
|
410
410
|
return soundFontIndex * (2 ** 32) + (instrument << 16) + sampleID;
|
|
411
411
|
}
|
|
412
412
|
createChannelAudioNodes(audioContext) {
|
|
413
|
-
const { gainLeft, gainRight } = this.panToGain(defaultControllerState.
|
|
413
|
+
const { gainLeft, gainRight } = this.panToGain(defaultControllerState.panMSB.defaultValue);
|
|
414
414
|
const gainL = new GainNode(audioContext, { gain: gainLeft });
|
|
415
415
|
const gainR = new GainNode(audioContext, { gain: gainRight });
|
|
416
416
|
const merger = new ChannelMergerNode(audioContext, { numberOfInputs: 2 });
|
|
@@ -438,10 +438,9 @@ export class MidyGM1 {
|
|
|
438
438
|
return channels;
|
|
439
439
|
}
|
|
440
440
|
async createAudioBuffer(voiceParams) {
|
|
441
|
-
const sample = voiceParams
|
|
442
|
-
const
|
|
443
|
-
const
|
|
444
|
-
const audioBuffer = await sample.toAudioBuffer(this.audioContext, sampleStart, sampleEnd);
|
|
441
|
+
const { sample, start, end } = voiceParams;
|
|
442
|
+
const sampleEnd = sample.data.length + end;
|
|
443
|
+
const audioBuffer = await sample.toAudioBuffer(this.audioContext, start, sampleEnd);
|
|
445
444
|
return audioBuffer;
|
|
446
445
|
}
|
|
447
446
|
createBufferSource(voiceParams, audioBuffer) {
|
|
@@ -469,9 +468,7 @@ export class MidyGM1 {
|
|
|
469
468
|
await this.noteOn(event.channel, event.noteNumber, event.velocity, startTime);
|
|
470
469
|
break;
|
|
471
470
|
case "noteOff": {
|
|
472
|
-
|
|
473
|
-
if (notePromise)
|
|
474
|
-
this.notePromises.push(notePromise);
|
|
471
|
+
this.noteOff(event.channel, event.noteNumber, event.velocity, startTime, false);
|
|
475
472
|
break;
|
|
476
473
|
}
|
|
477
474
|
case "controller":
|
|
@@ -565,6 +562,12 @@ export class MidyGM1 {
|
|
|
565
562
|
const waitTime = now + this.noteCheckInterval;
|
|
566
563
|
await this.scheduleTask(() => { }, waitTime);
|
|
567
564
|
}
|
|
565
|
+
if (this.timeline.length <= queueIndex) {
|
|
566
|
+
const now = this.audioContext.currentTime;
|
|
567
|
+
await this.stopNotes(0, true, now);
|
|
568
|
+
await this.audioContext.suspend();
|
|
569
|
+
finished = true;
|
|
570
|
+
}
|
|
568
571
|
if (finished) {
|
|
569
572
|
this.notePromises = [];
|
|
570
573
|
this.resetAllStates();
|
|
@@ -904,7 +907,13 @@ export class MidyGM1 {
|
|
|
904
907
|
}
|
|
905
908
|
note.bufferSource.connect(note.filterNode);
|
|
906
909
|
note.filterNode.connect(note.volumeEnvelopeNode);
|
|
907
|
-
|
|
910
|
+
if (voiceParams.sample.type === "compressed") {
|
|
911
|
+
const offset = voiceParams.start / audioBuffer.sampleRate;
|
|
912
|
+
note.bufferSource.start(startTime, offset);
|
|
913
|
+
}
|
|
914
|
+
else {
|
|
915
|
+
note.bufferSource.start(startTime);
|
|
916
|
+
}
|
|
908
917
|
return note;
|
|
909
918
|
}
|
|
910
919
|
handleExclusiveClass(note, channelNumber, startTime) {
|
|
@@ -1006,7 +1015,9 @@ export class MidyGM1 {
|
|
|
1006
1015
|
}
|
|
1007
1016
|
note.ending = true;
|
|
1008
1017
|
this.setNoteIndex(channel, index);
|
|
1009
|
-
this.releaseNote(channel, note, endTime);
|
|
1018
|
+
const promise = this.releaseNote(channel, note, endTime);
|
|
1019
|
+
this.notePromises.push(promise);
|
|
1020
|
+
return promise;
|
|
1010
1021
|
}
|
|
1011
1022
|
setNoteIndex(channel, index) {
|
|
1012
1023
|
let allEnds = true;
|
|
@@ -1104,11 +1115,12 @@ export class MidyGM1 {
|
|
|
1104
1115
|
setModLfoToPitch(channel, note, scheduleTime) {
|
|
1105
1116
|
if (note.modulationDepth) {
|
|
1106
1117
|
const modLfoToPitch = note.voiceParams.modLfoToPitch;
|
|
1107
|
-
const baseDepth = Math.abs(modLfoToPitch) +
|
|
1108
|
-
|
|
1118
|
+
const baseDepth = Math.abs(modLfoToPitch) +
|
|
1119
|
+
channel.state.modulationDepthMSB;
|
|
1120
|
+
const depth = baseDepth * Math.sign(modLfoToPitch);
|
|
1109
1121
|
note.modulationDepth.gain
|
|
1110
1122
|
.cancelScheduledValues(scheduleTime)
|
|
1111
|
-
.setValueAtTime(
|
|
1123
|
+
.setValueAtTime(depth, scheduleTime);
|
|
1112
1124
|
}
|
|
1113
1125
|
else {
|
|
1114
1126
|
this.startModulation(channel, note, scheduleTime);
|
|
@@ -1145,18 +1157,18 @@ export class MidyGM1 {
|
|
|
1145
1157
|
createVoiceParamsHandlers() {
|
|
1146
1158
|
return {
|
|
1147
1159
|
modLfoToPitch: (channel, note, scheduleTime) => {
|
|
1148
|
-
if (0 < channel.state.
|
|
1160
|
+
if (0 < channel.state.modulationDepthMSB) {
|
|
1149
1161
|
this.setModLfoToPitch(channel, note, scheduleTime);
|
|
1150
1162
|
}
|
|
1151
1163
|
},
|
|
1152
1164
|
vibLfoToPitch: (_channel, _note, _scheduleTime) => { },
|
|
1153
1165
|
modLfoToFilterFc: (channel, note, scheduleTime) => {
|
|
1154
|
-
if (0 < channel.state.
|
|
1166
|
+
if (0 < channel.state.modulationDepthMSB) {
|
|
1155
1167
|
this.setModLfoToFilterFc(note, scheduleTime);
|
|
1156
1168
|
}
|
|
1157
1169
|
},
|
|
1158
1170
|
modLfoToVolume: (channel, note, scheduleTime) => {
|
|
1159
|
-
if (0 < channel.state.
|
|
1171
|
+
if (0 < channel.state.modulationDepthMSB) {
|
|
1160
1172
|
this.setModLfoToVolume(note, scheduleTime);
|
|
1161
1173
|
}
|
|
1162
1174
|
},
|
|
@@ -1168,7 +1180,7 @@ export class MidyGM1 {
|
|
|
1168
1180
|
}
|
|
1169
1181
|
},
|
|
1170
1182
|
freqModLFO: (_channel, note, scheduleTime) => {
|
|
1171
|
-
if (0 < channel.state.
|
|
1183
|
+
if (0 < channel.state.modulationDepthMSB) {
|
|
1172
1184
|
this.setFreqModLFO(note, scheduleTime);
|
|
1173
1185
|
}
|
|
1174
1186
|
},
|
|
@@ -1243,7 +1255,8 @@ export class MidyGM1 {
|
|
|
1243
1255
|
}
|
|
1244
1256
|
}
|
|
1245
1257
|
updateModulation(channel, scheduleTime) {
|
|
1246
|
-
const depth = channel.state.
|
|
1258
|
+
const depth = channel.state.modulationDepthMSB *
|
|
1259
|
+
channel.modulationDepthRange;
|
|
1247
1260
|
this.processScheduledNotes(channel, (note) => {
|
|
1248
1261
|
if (note.modulationDepth) {
|
|
1249
1262
|
note.modulationDepth.gain.setValueAtTime(depth, scheduleTime);
|
|
@@ -1256,13 +1269,13 @@ export class MidyGM1 {
|
|
|
1256
1269
|
setModulationDepth(channelNumber, modulation, scheduleTime) {
|
|
1257
1270
|
const channel = this.channels[channelNumber];
|
|
1258
1271
|
scheduleTime ??= this.audioContext.currentTime;
|
|
1259
|
-
channel.state.
|
|
1272
|
+
channel.state.modulationDepthMSB = modulation / 127;
|
|
1260
1273
|
this.updateModulation(channel, scheduleTime);
|
|
1261
1274
|
}
|
|
1262
1275
|
setVolume(channelNumber, volume, scheduleTime) {
|
|
1263
1276
|
scheduleTime ??= this.audioContext.currentTime;
|
|
1264
1277
|
const channel = this.channels[channelNumber];
|
|
1265
|
-
channel.state.
|
|
1278
|
+
channel.state.volumeMSB = volume / 127;
|
|
1266
1279
|
this.updateChannelVolume(channel, scheduleTime);
|
|
1267
1280
|
}
|
|
1268
1281
|
panToGain(pan) {
|
|
@@ -1275,13 +1288,13 @@ export class MidyGM1 {
|
|
|
1275
1288
|
setPan(channelNumber, pan, scheduleTime) {
|
|
1276
1289
|
scheduleTime ??= this.audioContext.currentTime;
|
|
1277
1290
|
const channel = this.channels[channelNumber];
|
|
1278
|
-
channel.state.
|
|
1291
|
+
channel.state.panMSB = pan / 127;
|
|
1279
1292
|
this.updateChannelVolume(channel, scheduleTime);
|
|
1280
1293
|
}
|
|
1281
1294
|
setExpression(channelNumber, expression, scheduleTime) {
|
|
1282
1295
|
scheduleTime ??= this.audioContext.currentTime;
|
|
1283
1296
|
const channel = this.channels[channelNumber];
|
|
1284
|
-
channel.state.
|
|
1297
|
+
channel.state.expressionMSB = expression / 127;
|
|
1285
1298
|
this.updateChannelVolume(channel, scheduleTime);
|
|
1286
1299
|
}
|
|
1287
1300
|
dataEntryLSB(channelNumber, value, scheduleTime) {
|
|
@@ -1290,8 +1303,8 @@ export class MidyGM1 {
|
|
|
1290
1303
|
}
|
|
1291
1304
|
updateChannelVolume(channel, scheduleTime) {
|
|
1292
1305
|
const state = channel.state;
|
|
1293
|
-
const volume = state.
|
|
1294
|
-
const { gainLeft, gainRight } = this.panToGain(state.
|
|
1306
|
+
const volume = state.volumeMSB * state.expressionMSB;
|
|
1307
|
+
const { gainLeft, gainRight } = this.panToGain(state.panMSB);
|
|
1295
1308
|
channel.gainL.gain
|
|
1296
1309
|
.cancelScheduledValues(scheduleTime)
|
|
1297
1310
|
.setValueAtTime(volume * gainLeft, scheduleTime);
|
|
@@ -1439,8 +1452,8 @@ export class MidyGM1 {
|
|
|
1439
1452
|
resetAllControllers(channelNumber, _value, scheduleTime) {
|
|
1440
1453
|
const keys = [
|
|
1441
1454
|
"pitchWheel",
|
|
1442
|
-
"
|
|
1443
|
-
"
|
|
1455
|
+
"expressionMSB",
|
|
1456
|
+
"modulationDepthMSB",
|
|
1444
1457
|
"sustainPedal",
|
|
1445
1458
|
];
|
|
1446
1459
|
const channel = this.channels[channelNumber];
|
package/esm/midy-GM2.d.ts
CHANGED
|
@@ -182,11 +182,11 @@ export class MidyGM2 {
|
|
|
182
182
|
noteOn(channelNumber: any, noteNumber: any, velocity: any, startTime: any): Promise<void>;
|
|
183
183
|
disconnectNote(note: any): void;
|
|
184
184
|
releaseNote(channel: any, note: any, endTime: any): Promise<any>;
|
|
185
|
-
noteOff(channelNumber: any, noteNumber: any, velocity: any, endTime: any, force: any):
|
|
185
|
+
noteOff(channelNumber: any, noteNumber: any, velocity: any, endTime: any, force: any): Promise<any> | undefined;
|
|
186
186
|
setNoteIndex(channel: any, index: any): void;
|
|
187
187
|
findNoteOffIndex(channel: any, noteNumber: any): any;
|
|
188
|
-
releaseSustainPedal(channelNumber: any, halfVelocity: any, scheduleTime: any):
|
|
189
|
-
releaseSostenutoPedal(channelNumber: any, halfVelocity: any, scheduleTime: any):
|
|
188
|
+
releaseSustainPedal(channelNumber: any, halfVelocity: any, scheduleTime: any): (Promise<any> | undefined)[];
|
|
189
|
+
releaseSostenutoPedal(channelNumber: any, halfVelocity: any, scheduleTime: any): (Promise<any> | undefined)[];
|
|
190
190
|
createMessageHandlers(): any[];
|
|
191
191
|
handleMessage(data: any, scheduleTime: any): void;
|
|
192
192
|
activeSensing(): void;
|
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":"AAmJA;IA6CE;;;;;;;;;;;;;;MAcE;IAEF,+BAoBC;IAhFD,aAAa;IACb,yBAAqB;IACrB,2BAAuB;IACvB;;;;MAIE;IACF;;;;;;MAME;IACF,oBAAiB;IACjB,qBAAmB;IACnB,kBAAc;IACd,0BAAsB;IACtB,+BAA6B;IAC7B,0BAAwB;IACxB,kBAAc;IACd,mBAAiB;IACjB,kBAAc;IACd,mBAAe;IACf,kBAAgB;IAChB,0BAAuD;IACvD,4BAAyB;IACzB,0BAAuB;IACvB,kCAA+B;IAC/B,mBAAkB;IAClB,mBAAkB;IAClB,kBAAiB;IACjB,oBAAmB;IACnB,mBAAkB;IAClB,iBAAY;IACZ,gBAAc;IACd,oBAAkB;IAClB,sBAAwB;IACxB,2BAAqC;IACrC,+BAEE;IAmBA,kBAAgC;IAChC,kBAA8C;IAC9C,eAAwD;IACxD,qBAGE;IACF,uBAAmD;IACnD;;;;;;;;;;;MAA2D;IAC3D,6BAA+D;IAC/D,kCAAyE;IACzE,gBAAiD;IACjD;;;kBAAyD;IACzD;;;;;;;;MAAyD;IAQ3D,mCASC;IAED,2DAYC;IAED,yCAmBC;IAED,oCASC;IAED,sBAoCC;IAED,8DAYC;IAED;;;;MAeC;IAED,sCAKC;IAED,yCAqBC;IAED,
|
|
1
|
+
{"version":3,"file":"midy-GM2.d.ts","sourceRoot":"","sources":["../src/midy-GM2.js"],"names":[],"mappings":"AAmJA;IA6CE;;;;;;;;;;;;;;MAcE;IAEF,+BAoBC;IAhFD,aAAa;IACb,yBAAqB;IACrB,2BAAuB;IACvB;;;;MAIE;IACF;;;;;;MAME;IACF,oBAAiB;IACjB,qBAAmB;IACnB,kBAAc;IACd,0BAAsB;IACtB,+BAA6B;IAC7B,0BAAwB;IACxB,kBAAc;IACd,mBAAiB;IACjB,kBAAc;IACd,mBAAe;IACf,kBAAgB;IAChB,0BAAuD;IACvD,4BAAyB;IACzB,0BAAuB;IACvB,kCAA+B;IAC/B,mBAAkB;IAClB,mBAAkB;IAClB,kBAAiB;IACjB,oBAAmB;IACnB,mBAAkB;IAClB,iBAAY;IACZ,gBAAc;IACd,oBAAkB;IAClB,sBAAwB;IACxB,2BAAqC;IACrC,+BAEE;IAmBA,kBAAgC;IAChC,kBAA8C;IAC9C,eAAwD;IACxD,qBAGE;IACF,uBAAmD;IACnD;;;;;;;;;;;MAA2D;IAC3D,6BAA+D;IAC/D,kCAAyE;IACzE,gBAAiD;IACjD;;;kBAAyD;IACzD;;;;;;;;MAAyD;IAQ3D,mCASC;IAED,2DAYC;IAED,yCAmBC;IAED,oCASC;IAED,sBAoCC;IAED,8DAYC;IAED;;;;MAeC;IAED,sCAKC;IAED,yCAqBC;IAED,kDASC;IAED,mDAIC;IAED,2FAWC;IAED,yEAuDC;IAED,mCAOC;IAED,uBASC;IAED,yDA2BC;IAED,2BAwDC;IAED,uDAEC;IAED,wDAEC;IAED,qCAMC;IAED;;;MAqFC;IAED,kGAeC;IAED,mGAeC;IAED,wEAMC;IAED,uBAMC;IAED,sBAKC;IAED,uBAQC;IAED,wBAKC;IAED,0BAKC;IAED,wBAOC;IAED,sBAIC;IAED,yDAQC;IAED,yEASC;IAED,kFAuBC;IAED;;;;MASC;IAED,gFAUC;IAED,mFAYC;IAED,sGAcC;IAID;;;MA8BC;IAED;;;kBA6BC;IAED;;;;;;;;MA0CC;IAED,2BAEC;IAED,8BAEC;IAED,8BAEC;IAED,4BAEC;IAED,qCAkBC;IAED,6CAEC;IAED,2DAIC;IAED,+DAgBC;IAED,mDAIC;IAED,2CAoDC;IAED,8EAWC;IAED,oEAgBC;IAED,+DAKC;IAED,qDAoBC;IAED,6CAIC;IAED,8EAoBC;IAED,oEAwBC;IAED,kEAoBC;IAED,+DAeC;IAED,4GAkCC;IAED,uEAgEC;IAED,0EAiBC;IAED,8EAoBC;IAED,oEAuBC;IAED,0FAyBC;IAED,gCAmBC;IAED,iEAqBC;IAED,gHA6BC;IAED,6CAUC;IAED,qDAUC;IAED,4GAeC;IAED,8GAkBC;IAED,+BAuBC;IAED,kDAOC;IAED,sBAEC;IAED,mFAcC;IAED,4EAgBC;IAED,wFAGC;IAED,sEAWC;IAED,mEAaC;IAED,mEAYC;IAED,sEAMC;IAED,oEAQC;IAED,gEAyBC;IAED,gEAyBC;IAED,gCAKC;IAED,kDAKC;IAED,gEAMC;IAED,8CAOC;IAED;;;;;;;;;;;MAiDC;IAED,oFAOC;IAED,6EA+BC;IAED,qCA2BC;IAED,+FAYC;IAED,+CAEC;IAED,wDAUC;IAED,iFAMC;IAED,wDAeC;IAED,oFAMC;IAED,oEAWC;IAED;;;MAMC;IAED,8DAWC;IAED,4EAKC;IAED,+CAEC;IAED,sEAGC;IAED,2DAUC;IAED,4EAoBC;IAED,yEAYC;IAED,+CAEC;IAED,uEAMC;IAED,2EAcC;IAED,oDAEC;IAED,0EAeC;IAED,sFAQC;IAED,sFAQC;IAED,kFAeC;IAED,2DAMC;IAED,uDAqBC;IAED,gDAEC;IAED,gDAEC;IAED,sEAGC;IAED,qEAKC;IAED,2EAWC;IAED,iEAMC;IAED,uEASC;IAED,mEAKC;IAED,yEASC;IAED,2EAKC;IAED,iFAMC;IAED,gFAGC;IAED,6CAwBC;IAGD,8EAoCC;IAED,gFAGC;IAED,iEAEC;IAED,gEAEC;IAED,gEAIC;IAED,gEAIC;IAED,+EAgCC;IAED,qCAYC;IAED,qCAYC;IAED,4EA4CC;IAED,4DAGC;IAED,qDAKC;IAED,gEAIC;IAED,yDAWC;IAED,kEAGC;IAED,2DAWC;IAED,sEAeC;IAED,4CAOC;IAED,+BAIC;IAED,qDAiBC;IAED,gCAGC;IAED,kCAEC;IA6BD,4CAEC;IAED,+DAaC;IAED,kDAiBC;IAED,2GAKC;IAED,sDAIC;IAED,qCAEC;IAED,uDAMC;IAED,sCAEC;IAED,uDASC;IAED,sCAEC;IAED,2DAqBC;IAED,0CAEC;IAED,mCAeC;IAED,2FAgBC;IAED,6CAMC;IAED,0CAMC;IAED,uCAMC;IAED,wCAMC;IAED,2CAMC;IAED,yEAgBC;IAED,wEAaC;IAED,2CAIC;IAED,oFAOC;IAED,6DAcC;IAED,yEAIC;IAED,0CAmBC;IAED,yEAcC;IAED,gDAYC;IAGD,6DAgBC;CACF"}
|
package/esm/midy-GM2.js
CHANGED
|
@@ -151,12 +151,12 @@ const defaultControllerState = {
|
|
|
151
151
|
pitchWheelSensitivity: { type: 16, defaultValue: 2 / 128 },
|
|
152
152
|
link: { type: 127, defaultValue: 0 },
|
|
153
153
|
// bankMSB: { type: 128 + 0, defaultValue: 121, },
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
modulationDepthMSB: { type: 128 + 1, defaultValue: 0 },
|
|
155
|
+
portamentoTimeMSB: { type: 128 + 5, defaultValue: 0 },
|
|
156
156
|
// dataMSB: { type: 128 + 6, defaultValue: 0, },
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
volumeMSB: { type: 128 + 7, defaultValue: 100 / 127 },
|
|
158
|
+
panMSB: { type: 128 + 10, defaultValue: 64 / 127 },
|
|
159
|
+
expressionMSB: { type: 128 + 11, defaultValue: 1 },
|
|
160
160
|
// bankLSB: { type: 128 + 32, defaultValue: 0, },
|
|
161
161
|
// dataLSB: { type: 128 + 38, defaultValue: 0, },
|
|
162
162
|
sustainPedal: { type: 128 + 64, defaultValue: 0 },
|
|
@@ -546,7 +546,7 @@ export class MidyGM2 {
|
|
|
546
546
|
return soundFontIndex * (2 ** 32) + (instrument << 16) + sampleID;
|
|
547
547
|
}
|
|
548
548
|
createChannelAudioNodes(audioContext) {
|
|
549
|
-
const { gainLeft, gainRight } = this.panToGain(defaultControllerState.
|
|
549
|
+
const { gainLeft, gainRight } = this.panToGain(defaultControllerState.panMSB.defaultValue);
|
|
550
550
|
const gainL = new GainNode(audioContext, { gain: gainLeft });
|
|
551
551
|
const gainR = new GainNode(audioContext, { gain: gainRight });
|
|
552
552
|
const merger = new ChannelMergerNode(audioContext, { numberOfInputs: 2 });
|
|
@@ -587,10 +587,9 @@ export class MidyGM2 {
|
|
|
587
587
|
return channels;
|
|
588
588
|
}
|
|
589
589
|
async createAudioBuffer(voiceParams) {
|
|
590
|
-
const sample = voiceParams
|
|
591
|
-
const
|
|
592
|
-
const
|
|
593
|
-
const audioBuffer = await sample.toAudioBuffer(this.audioContext, sampleStart, sampleEnd);
|
|
590
|
+
const { sample, start, end } = voiceParams;
|
|
591
|
+
const sampleEnd = sample.data.length + end;
|
|
592
|
+
const audioBuffer = await sample.toAudioBuffer(this.audioContext, start, sampleEnd);
|
|
594
593
|
return audioBuffer;
|
|
595
594
|
}
|
|
596
595
|
isLoopDrum(channel, noteNumber) {
|
|
@@ -625,9 +624,7 @@ export class MidyGM2 {
|
|
|
625
624
|
await this.noteOn(event.channel, event.noteNumber, event.velocity, startTime);
|
|
626
625
|
break;
|
|
627
626
|
case "noteOff": {
|
|
628
|
-
|
|
629
|
-
if (notePromise)
|
|
630
|
-
this.notePromises.push(notePromise);
|
|
627
|
+
this.noteOff(event.channel, event.noteNumber, event.velocity, startTime, false);
|
|
631
628
|
break;
|
|
632
629
|
}
|
|
633
630
|
case "controller":
|
|
@@ -731,6 +728,12 @@ export class MidyGM2 {
|
|
|
731
728
|
const waitTime = now + this.noteCheckInterval;
|
|
732
729
|
await this.scheduleTask(() => { }, waitTime);
|
|
733
730
|
}
|
|
731
|
+
if (this.timeline.length <= queueIndex) {
|
|
732
|
+
const now = this.audioContext.currentTime;
|
|
733
|
+
await this.stopNotes(0, true, now);
|
|
734
|
+
await this.audioContext.suspend();
|
|
735
|
+
finished = true;
|
|
736
|
+
}
|
|
734
737
|
if (finished) {
|
|
735
738
|
this.notePromises = [];
|
|
736
739
|
this.resetAllStates();
|
|
@@ -1139,7 +1142,7 @@ export class MidyGM2 {
|
|
|
1139
1142
|
}
|
|
1140
1143
|
getPortamentoTime(channel, note) {
|
|
1141
1144
|
const deltaSemitone = Math.abs(note.noteNumber - note.portamentoNoteNumber);
|
|
1142
|
-
const value = Math.ceil(channel.state.
|
|
1145
|
+
const value = Math.ceil(channel.state.portamentoTimeMSB * 127);
|
|
1143
1146
|
return deltaSemitone / this.getPitchIncrementSpeed(value) / 10;
|
|
1144
1147
|
}
|
|
1145
1148
|
getPitchIncrementSpeed(value) {
|
|
@@ -1398,7 +1401,7 @@ export class MidyGM2 {
|
|
|
1398
1401
|
if (0 < state.vibratoDepth) {
|
|
1399
1402
|
this.startVibrato(channel, note, now);
|
|
1400
1403
|
}
|
|
1401
|
-
if (0 < state.
|
|
1404
|
+
if (0 < state.modulationDepthMSB) {
|
|
1402
1405
|
this.startModulation(channel, note, now);
|
|
1403
1406
|
}
|
|
1404
1407
|
if (channel.mono && channel.currentBufferSource) {
|
|
@@ -1409,7 +1412,13 @@ export class MidyGM2 {
|
|
|
1409
1412
|
note.filterNode.connect(note.volumeEnvelopeNode);
|
|
1410
1413
|
this.setChorusSend(channel, note, now);
|
|
1411
1414
|
this.setReverbSend(channel, note, now);
|
|
1412
|
-
|
|
1415
|
+
if (voiceParams.sample.type === "compressed") {
|
|
1416
|
+
const offset = voiceParams.start / audioBuffer.sampleRate;
|
|
1417
|
+
note.bufferSource.start(startTime, offset);
|
|
1418
|
+
}
|
|
1419
|
+
else {
|
|
1420
|
+
note.bufferSource.start(startTime);
|
|
1421
|
+
}
|
|
1413
1422
|
return note;
|
|
1414
1423
|
}
|
|
1415
1424
|
handleExclusiveClass(note, channelNumber, startTime) {
|
|
@@ -1567,7 +1576,9 @@ export class MidyGM2 {
|
|
|
1567
1576
|
}
|
|
1568
1577
|
note.ending = true;
|
|
1569
1578
|
this.setNoteIndex(channel, index);
|
|
1570
|
-
this.releaseNote(channel, note, endTime);
|
|
1579
|
+
const promise = this.releaseNote(channel, note, endTime);
|
|
1580
|
+
this.notePromises.push(promise);
|
|
1581
|
+
return promise;
|
|
1571
1582
|
}
|
|
1572
1583
|
setNoteIndex(channel, index) {
|
|
1573
1584
|
let allEnds = true;
|
|
@@ -1699,7 +1710,8 @@ export class MidyGM2 {
|
|
|
1699
1710
|
if (note.modulationDepth) {
|
|
1700
1711
|
const modLfoToPitch = note.voiceParams.modLfoToPitch +
|
|
1701
1712
|
this.getLFOPitchDepth(channel, note);
|
|
1702
|
-
const baseDepth = Math.abs(modLfoToPitch) +
|
|
1713
|
+
const baseDepth = Math.abs(modLfoToPitch) +
|
|
1714
|
+
channel.state.modulationDepthMSB;
|
|
1703
1715
|
const depth = baseDepth * Math.sign(modLfoToPitch);
|
|
1704
1716
|
note.modulationDepth.gain
|
|
1705
1717
|
.cancelScheduledValues(scheduleTime)
|
|
@@ -1831,7 +1843,7 @@ export class MidyGM2 {
|
|
|
1831
1843
|
createVoiceParamsHandlers() {
|
|
1832
1844
|
return {
|
|
1833
1845
|
modLfoToPitch: (channel, note, scheduleTime) => {
|
|
1834
|
-
if (0 < channel.state.
|
|
1846
|
+
if (0 < channel.state.modulationDepthMSB) {
|
|
1835
1847
|
this.setModLfoToPitch(channel, note, scheduleTime);
|
|
1836
1848
|
}
|
|
1837
1849
|
},
|
|
@@ -1841,12 +1853,12 @@ export class MidyGM2 {
|
|
|
1841
1853
|
}
|
|
1842
1854
|
},
|
|
1843
1855
|
modLfoToFilterFc: (channel, note, scheduleTime) => {
|
|
1844
|
-
if (0 < channel.state.
|
|
1856
|
+
if (0 < channel.state.modulationDepthMSB) {
|
|
1845
1857
|
this.setModLfoToFilterFc(channel, note, scheduleTime);
|
|
1846
1858
|
}
|
|
1847
1859
|
},
|
|
1848
1860
|
modLfoToVolume: (channel, note, scheduleTime) => {
|
|
1849
|
-
if (0 < channel.state.
|
|
1861
|
+
if (0 < channel.state.modulationDepthMSB) {
|
|
1850
1862
|
this.setModLfoToVolume(channel, note, scheduleTime);
|
|
1851
1863
|
}
|
|
1852
1864
|
},
|
|
@@ -1857,12 +1869,12 @@ export class MidyGM2 {
|
|
|
1857
1869
|
this.setReverbSend(channel, note, scheduleTime);
|
|
1858
1870
|
},
|
|
1859
1871
|
delayModLFO: (_channel, note, _scheduleTime) => {
|
|
1860
|
-
if (0 < channel.state.
|
|
1872
|
+
if (0 < channel.state.modulationDepthMSB) {
|
|
1861
1873
|
this.setDelayModLFO(note);
|
|
1862
1874
|
}
|
|
1863
1875
|
},
|
|
1864
1876
|
freqModLFO: (_channel, note, scheduleTime) => {
|
|
1865
|
-
if (0 < channel.state.
|
|
1877
|
+
if (0 < channel.state.modulationDepthMSB) {
|
|
1866
1878
|
this.setFreqModLFO(note, scheduleTime);
|
|
1867
1879
|
}
|
|
1868
1880
|
},
|
|
@@ -1964,7 +1976,8 @@ export class MidyGM2 {
|
|
|
1964
1976
|
this.channels[channelNumber].bankMSB = msb;
|
|
1965
1977
|
}
|
|
1966
1978
|
updateModulation(channel, scheduleTime) {
|
|
1967
|
-
const depth = channel.state.
|
|
1979
|
+
const depth = channel.state.modulationDepthMSB *
|
|
1980
|
+
channel.modulationDepthRange;
|
|
1968
1981
|
this.processScheduledNotes(channel, (note) => {
|
|
1969
1982
|
if (note.modulationDepth) {
|
|
1970
1983
|
note.modulationDepth.gain.setValueAtTime(depth, scheduleTime);
|
|
@@ -1979,7 +1992,7 @@ export class MidyGM2 {
|
|
|
1979
1992
|
if (channel.isDrum)
|
|
1980
1993
|
return;
|
|
1981
1994
|
scheduleTime ??= this.audioContext.currentTime;
|
|
1982
|
-
channel.state.
|
|
1995
|
+
channel.state.modulationDepthMSB = modulation / 127;
|
|
1983
1996
|
this.updateModulation(channel, scheduleTime);
|
|
1984
1997
|
}
|
|
1985
1998
|
updatePortamento(channel, scheduleTime) {
|
|
@@ -2001,9 +2014,9 @@ export class MidyGM2 {
|
|
|
2001
2014
|
});
|
|
2002
2015
|
}
|
|
2003
2016
|
setPortamentoTime(channelNumber, portamentoTime, scheduleTime) {
|
|
2004
|
-
const channel = this.channels[channelNumber];
|
|
2005
2017
|
scheduleTime ??= this.audioContext.currentTime;
|
|
2006
|
-
channel
|
|
2018
|
+
const channel = this.channels[channelNumber];
|
|
2019
|
+
channel.state.portamentoTimeMSB = portamentoTime / 127;
|
|
2007
2020
|
if (channel.isDrum)
|
|
2008
2021
|
return;
|
|
2009
2022
|
this.updatePortamento(channel, scheduleTime);
|
|
@@ -2011,7 +2024,7 @@ export class MidyGM2 {
|
|
|
2011
2024
|
setVolume(channelNumber, volume, scheduleTime) {
|
|
2012
2025
|
scheduleTime ??= this.audioContext.currentTime;
|
|
2013
2026
|
const channel = this.channels[channelNumber];
|
|
2014
|
-
channel.state.
|
|
2027
|
+
channel.state.volumeMSB = volume / 127;
|
|
2015
2028
|
if (channel.isDrum) {
|
|
2016
2029
|
for (let i = 0; i < 128; i++) {
|
|
2017
2030
|
this.updateKeyBasedVolume(channel, i, scheduleTime);
|
|
@@ -2031,7 +2044,7 @@ export class MidyGM2 {
|
|
|
2031
2044
|
setPan(channelNumber, pan, scheduleTime) {
|
|
2032
2045
|
scheduleTime ??= this.audioContext.currentTime;
|
|
2033
2046
|
const channel = this.channels[channelNumber];
|
|
2034
|
-
channel.state.
|
|
2047
|
+
channel.state.panMSB = pan / 127;
|
|
2035
2048
|
if (channel.isDrum) {
|
|
2036
2049
|
for (let i = 0; i < 128; i++) {
|
|
2037
2050
|
this.updateKeyBasedVolume(channel, i, scheduleTime);
|
|
@@ -2044,7 +2057,7 @@ export class MidyGM2 {
|
|
|
2044
2057
|
setExpression(channelNumber, expression, scheduleTime) {
|
|
2045
2058
|
scheduleTime ??= this.audioContext.currentTime;
|
|
2046
2059
|
const channel = this.channels[channelNumber];
|
|
2047
|
-
channel.state.
|
|
2060
|
+
channel.state.expressionMSB = expression / 127;
|
|
2048
2061
|
this.updateChannelVolume(channel, scheduleTime);
|
|
2049
2062
|
}
|
|
2050
2063
|
setBankLSB(channelNumber, lsb) {
|
|
@@ -2056,8 +2069,8 @@ export class MidyGM2 {
|
|
|
2056
2069
|
}
|
|
2057
2070
|
updateChannelVolume(channel, scheduleTime) {
|
|
2058
2071
|
const state = channel.state;
|
|
2059
|
-
const volume = state.
|
|
2060
|
-
const { gainLeft, gainRight } = this.panToGain(state.
|
|
2072
|
+
const volume = state.volumeMSB * state.expressionMSB;
|
|
2073
|
+
const { gainLeft, gainRight } = this.panToGain(state.panMSB);
|
|
2061
2074
|
channel.gainL.gain
|
|
2062
2075
|
.cancelScheduledValues(scheduleTime)
|
|
2063
2076
|
.setValueAtTime(volume * gainLeft, scheduleTime);
|
|
@@ -2071,8 +2084,8 @@ export class MidyGM2 {
|
|
|
2071
2084
|
return;
|
|
2072
2085
|
const gainR = channel.keyBasedGainRs[keyNumber];
|
|
2073
2086
|
const state = channel.state;
|
|
2074
|
-
const defaultVolume = state.
|
|
2075
|
-
const defaultPan = state.
|
|
2087
|
+
const defaultVolume = state.volumeMSB * state.expressionMSB;
|
|
2088
|
+
const defaultPan = state.panMSB;
|
|
2076
2089
|
const keyBasedVolume = this.getKeyBasedValue(channel, keyNumber, 7);
|
|
2077
2090
|
const volume = (0 <= keyBasedVolume)
|
|
2078
2091
|
? defaultVolume * keyBasedVolume / 64
|
|
@@ -2323,8 +2336,8 @@ export class MidyGM2 {
|
|
|
2323
2336
|
const keys = [
|
|
2324
2337
|
"channelPressure",
|
|
2325
2338
|
"pitchWheel",
|
|
2326
|
-
"
|
|
2327
|
-
"
|
|
2339
|
+
"expressionMSB",
|
|
2340
|
+
"modulationDepthMSB",
|
|
2328
2341
|
"sustainPedal",
|
|
2329
2342
|
"portamento",
|
|
2330
2343
|
"sostenutoPedal",
|
package/esm/midy-GMLite.d.ts
CHANGED
|
@@ -112,13 +112,13 @@ export class MidyGMLite {
|
|
|
112
112
|
noteOn(channelNumber: any, noteNumber: any, velocity: any, startTime: any): Promise<void>;
|
|
113
113
|
disconnectNote(note: any): void;
|
|
114
114
|
releaseNote(channel: any, note: any, endTime: any): Promise<any>;
|
|
115
|
-
noteOff(channelNumber: any, noteNumber: any, velocity: any, endTime: any, force: any):
|
|
115
|
+
noteOff(channelNumber: any, noteNumber: any, velocity: any, endTime: any, force: any): Promise<any> | undefined;
|
|
116
116
|
setNoteIndex(channel: any, index: any): void;
|
|
117
117
|
findNoteOffIndex(channel: any, noteNumber: any): any;
|
|
118
|
-
releaseSustainPedal(channelNumber: any, halfVelocity: any, scheduleTime: any):
|
|
118
|
+
releaseSustainPedal(channelNumber: any, halfVelocity: any, scheduleTime: any): (Promise<any> | undefined)[];
|
|
119
119
|
createMessageHandlers(): any[];
|
|
120
120
|
handleMessage(data: any, scheduleTime: any): void;
|
|
121
|
-
handleChannelMessage(statusByte: any, data1: any, data2: any, scheduleTime: any): void | Promise<
|
|
121
|
+
handleChannelMessage(statusByte: any, data1: any, data2: any, scheduleTime: any): void | Promise<any>;
|
|
122
122
|
setProgramChange(channelNumber: any, programNumber: any, _scheduleTime: any): void;
|
|
123
123
|
handlePitchBendMessage(channelNumber: any, lsb: any, msb: any, scheduleTime: any): void;
|
|
124
124
|
setPitchBend(channelNumber: any, value: any, scheduleTime: any): void;
|
package/esm/midy-GMLite.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"midy-GMLite.d.ts","sourceRoot":"","sources":["../src/midy-GMLite.js"],"names":[],"mappings":"AA2GA;IA6BE;;;;;;;;;MASE;IAEF,+BAeC;IAtDD,aAAa;IACb,oBAAiB;IACjB,qBAAmB;IACnB,kBAAc;IACd,0BAAwB;IACxB,kBAAc;IACd,mBAAiB;IACjB,kBAAc;IACd,mBAAe;IACf,kBAAgB;IAChB,0BAAuD;IACvD,4BAAyB;IACzB,0BAAuB;IACvB,kCAA+B;IAC/B,mBAAkB;IAClB,mBAAkB;IAClB,kBAAiB;IACjB,oBAAmB;IACnB,mBAAkB;IAClB,iBAAY;IACZ,gBAAc;IACd,oBAAkB;IAClB,sBAAwB;IACxB,2BAAqC;IACrC,+BAEE;IAcA,kBAAgC;IAChC,kBAA8C;IAC9C,eAAwD;IACxD,qBAGE;IACF,uBAAmD;IACnD;;;;;;;;;;;MAA2D;IAC3D,6BAA+D;IAC/D,gBAAiD;IAMnD,mCASC;IAED,2DAYC;IAED,yCAmBC;IAED,oCASC;IAED,sBAoCC;IAED,8DAWC;IAED;;;;MAeC;IAED,yCAaC;IAED,
|
|
1
|
+
{"version":3,"file":"midy-GMLite.d.ts","sourceRoot":"","sources":["../src/midy-GMLite.js"],"names":[],"mappings":"AA2GA;IA6BE;;;;;;;;;MASE;IAEF,+BAeC;IAtDD,aAAa;IACb,oBAAiB;IACjB,qBAAmB;IACnB,kBAAc;IACd,0BAAwB;IACxB,kBAAc;IACd,mBAAiB;IACjB,kBAAc;IACd,mBAAe;IACf,kBAAgB;IAChB,0BAAuD;IACvD,4BAAyB;IACzB,0BAAuB;IACvB,kCAA+B;IAC/B,mBAAkB;IAClB,mBAAkB;IAClB,kBAAiB;IACjB,oBAAmB;IACnB,mBAAkB;IAClB,iBAAY;IACZ,gBAAc;IACd,oBAAkB;IAClB,sBAAwB;IACxB,2BAAqC;IACrC,+BAEE;IAcA,kBAAgC;IAChC,kBAA8C;IAC9C,eAAwD;IACxD,qBAGE;IACF,uBAAmD;IACnD;;;;;;;;;;;MAA2D;IAC3D,6BAA+D;IAC/D,gBAAiD;IAMnD,mCASC;IAED,2DAYC;IAED,yCAmBC;IAED,oCASC;IAED,sBAoCC;IAED,8DAWC;IAED;;;;MAeC;IAED,yCAaC;IAED,kDASC;IAED,0EAUC;IAED,yEAoDC;IAED,mCAOC;IAED,uBASC;IAED,yDA2BC;IAED,2BA8CC;IAED,uDAEC;IAED,wDAEC;IAED,qCAKC;IAED;;;MAwDC;IAED,kGAeC;IAED,mGAeC;IAED,wEAMC;IAED,uBAMC;IAED,sBAKC;IAED,uBAQC;IAED,wBAKC;IAED,0BAKC;IAED,wBAOC;IAED,sBAIC;IAED,yDAQC;IAED,yEASC;IAED,2BAEC;IAED,8BAEC;IAED,8BAEC;IAED,4BAEC;IAED,wCAIC;IAED,2DAIC;IAED,+DAIC;IAED,sDAeC;IAED,qDAoBC;IAED,6CAIC;IAED,sDAsBC;IAED,kEAoBC;IAED,4GAkCC;IAED,uEA4CC;IAED,0EAiBC;IAED,8EAiBC;IAED,oEAUC;IAED,0FAwBC;IAED,gCASC;IAED,iEAqBC;IAED,gHAwBC;IAED,6CAUC;IAED,qDAUC;IAED,4GAeC;IAED,+BAmBC;IAED,kDAOC;IAED,sGA2BC;IAED,mFAGC;IAED,wFAGC;IAED,sEAUC;IAED,mEAYC;IAED,wDAKC;IAED,sDAOC;IAED,mDAMC;IAED,kDAKC;IAED;;;;;;;;;;;MAiCC;IAED,oFAMC;IAED,6EA2BC;IAED,qCAeC;IAED,+FAWC;IAED,wDASC;IAED,iFAKC;IAED,oEAKC;IAED;;;MAMC;IAED,8DAKC;IAED,4EAKC;IAED,sEAGC;IAED,2DAUC;IAED,yEAWC;IAED,kFAeC;IAED,uDAYC;IAED,gDAEC;IAED,gDAEC;IAED,sEAGC;IAED,qEAKC;IAED,2EAUC;IAED,gFAGC;IAED,6CAqBC;IAGD,8EAgCC;IAED,gFAGC;IAED,+EAgBC;IAED,qCASC;IAED,4EAaC;IAED,4DAGC;IAED,qDAKC;IAED,gDAYC;IAGD,6DAgBC;CACF"}
|