@marmooo/midy 0.2.8 → 0.2.9
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 -4
- package/esm/midy-GM1.d.ts.map +1 -1
- package/esm/midy-GM1.js +54 -17
- package/esm/midy-GM2.d.ts +13 -8
- package/esm/midy-GM2.d.ts.map +1 -1
- package/esm/midy-GM2.js +147 -40
- package/esm/midy-GMLite.d.ts +9 -3
- package/esm/midy-GMLite.d.ts.map +1 -1
- package/esm/midy-GMLite.js +57 -16
- package/esm/midy.d.ts +13 -8
- package/esm/midy.d.ts.map +1 -1
- package/esm/midy.js +187 -51
- package/package.json +1 -1
- package/script/midy-GM1.d.ts +8 -4
- package/script/midy-GM1.d.ts.map +1 -1
- package/script/midy-GM1.js +54 -17
- package/script/midy-GM2.d.ts +13 -8
- package/script/midy-GM2.d.ts.map +1 -1
- package/script/midy-GM2.js +147 -40
- package/script/midy-GMLite.d.ts +9 -3
- package/script/midy-GMLite.d.ts.map +1 -1
- package/script/midy-GMLite.js +57 -16
- package/script/midy.d.ts +13 -8
- package/script/midy.d.ts.map +1 -1
- package/script/midy.js +187 -51
package/script/midy-GM1.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export class MidyGM1 {
|
|
2
2
|
static channelSettings: {
|
|
3
3
|
currentBufferSource: null;
|
|
4
|
+
isDrum: boolean;
|
|
4
5
|
detune: number;
|
|
5
6
|
program: number;
|
|
6
7
|
bank: number;
|
|
@@ -8,11 +9,12 @@ export class MidyGM1 {
|
|
|
8
9
|
dataLSB: number;
|
|
9
10
|
rpnMSB: number;
|
|
10
11
|
rpnLSB: number;
|
|
12
|
+
modulationDepthRange: number;
|
|
11
13
|
fineTuning: number;
|
|
12
14
|
coarseTuning: number;
|
|
13
|
-
modulationDepthRange: number;
|
|
14
15
|
};
|
|
15
16
|
constructor(audioContext: any);
|
|
17
|
+
mode: string;
|
|
16
18
|
ticksPerBeat: number;
|
|
17
19
|
totalTime: number;
|
|
18
20
|
noteCheckInterval: number;
|
|
@@ -35,6 +37,8 @@ export class MidyGM1 {
|
|
|
35
37
|
exclusiveClassMap: SparseMap;
|
|
36
38
|
audioContext: any;
|
|
37
39
|
masterVolume: any;
|
|
40
|
+
scheduler: any;
|
|
41
|
+
schedulerBuffer: any;
|
|
38
42
|
voiceParamsHandlers: {
|
|
39
43
|
modLfoToPitch: (channel: any, note: any, _prevValue: any, scheduleTime: any) => void;
|
|
40
44
|
vibLfoToPitch: (_channel: any, _note: any, _prevValue: any, _scheduleTime: any) => void;
|
|
@@ -73,7 +77,7 @@ export class MidyGM1 {
|
|
|
73
77
|
};
|
|
74
78
|
createChannels(audioContext: any): any[];
|
|
75
79
|
createNoteBuffer(voiceParams: any, isSF3: any): Promise<any>;
|
|
76
|
-
|
|
80
|
+
createBufferSource(audioBuffer: any, voiceParams: any): any;
|
|
77
81
|
scheduleTimelineEvents(t: any, offset: any, queueIndex: any): Promise<any>;
|
|
78
82
|
getQueueIndex(second: any): number;
|
|
79
83
|
playNotes(): Promise<any>;
|
|
@@ -181,8 +185,8 @@ export class MidyGM1 {
|
|
|
181
185
|
allSoundOff(channelNumber: any, _value: any, scheduleTime: any): Promise<any[]>;
|
|
182
186
|
resetAllControllers(channelNumber: any): void;
|
|
183
187
|
allNotesOff(channelNumber: any, _value: any, scheduleTime: any): Promise<any[]>;
|
|
184
|
-
handleUniversalNonRealTimeExclusiveMessage(data: any,
|
|
185
|
-
GM1SystemOn(): void;
|
|
188
|
+
handleUniversalNonRealTimeExclusiveMessage(data: any, scheduleTime: any): void;
|
|
189
|
+
GM1SystemOn(scheduleTime: any): void;
|
|
186
190
|
handleUniversalRealTimeExclusiveMessage(data: any, scheduleTime: any): void;
|
|
187
191
|
handleMasterVolumeSysEx(data: any, scheduleTime: any): void;
|
|
188
192
|
setMasterVolume(volume: any, scheduleTime: any): void;
|
package/script/midy-GM1.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"midy-GM1.d.ts","sourceRoot":"","sources":["../src/midy-GM1.js"],"names":[],"mappings":"AAiJA;
|
|
1
|
+
{"version":3,"file":"midy-GM1.d.ts","sourceRoot":"","sources":["../src/midy-GM1.js"],"names":[],"mappings":"AAiJA;IAuBE;;;;;;;;;;;;;MAaE;IAEF,+BAcC;IAnDD,aAAa;IACb,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,6BAAuC;IAkBrC,kBAAgC;IAChC,kBAA8C;IAC9C,eAAwD;IACxD,qBAGE;IACF;;;;;;;;;;;MAA2D;IAC3D;;;;;;;;;;;;;MAA+D;IAC/D,gBAAiD;IAMnD,4BAMC;IAED,mCAWC;IAED,gDAMC;IAED,sCASC;IAED;;;;MAeC;IAED,yCAWC;IAED,6DA2BC;IAED,4DASC;IAED,2EAsDC;IAED,mCAOC;IAED,0BAoDC;IAED,uDAEC;IAED,wDAEC;IAED,6EAEC;IAED;;;MA4EC;IAED,mGAgBC;IAED,wEAMC;IAED,uBAKC;IAED,aAGC;IAED,cAKC;IAED,wBAIC;IAED,0BAKC;IAED,wBAOC;IAED,sBAGC;IAED,yDAQC;IAED,2DASC;IAED,qDAQC;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,yGAgBC;IAED,gHAwCC;IAED,kGAkDC;IAED,6FAQC;IAED,qFAwBC;IAED,yHAuBC;IAED,yGASC;IAED,4GAeC;IAED,mGA2BC;IAED,gFAGC;IAED,wFAGC;IAED,sEAWC;IAED,mEAQC;IAED,wDAKC;IAED,sDAOC;IAED,mDAMC;IAED,kDAKC;IAED;;;;;;;;;;;MA2BC;IAED,oFAMC;IAED,6EA2CC;IAED;;;;;;;;;;;;;MAeC;IAED,kGAWC;IAED,wDAUC;IAED,iFAMC;IAED,oEAKC;IAED;;;MAMC;IAED,8DAKC;IAED,4EAKC;IAED,sEAGC;IAED,2DAUC;IAED,yEAYC;IAED,kFAeC;IAED,2DAMC;IAED,uDAkBC;IAED,gDAEC;IAED,gDAEC;IAED,sEAGC;IAED,qEAKC;IAED,2EAWC;IAED,iEAKC;IAED,uEASC;IAED,mEAKC;IAED,yEASC;IAED,gFAGC;IAED,8CAqBC;IAED,gFAGC;IAED,+EAgBC;IAED,qCAWC;IAED,4EAaC;IAED,4DAGC;IAED,sDASC;IAED,gDAYC;IAED,6DAgBC;CACF;AA97CD;IACE,uBAGC;IAFC,YAA2B;IAC3B,qBAAuB;IAGzB,gCAKC;IAED,mBAEC;IAED,0BAUC;IAED,uBAEC;IAED,mBAEC;IAED,cAMC;IASD,6BAKC;IAZD,qDAKC;CAQF;AAED;IASE,0FAMC;IAdD,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/script/midy-GM1.js
CHANGED
|
@@ -173,6 +173,12 @@ const volumeEnvelopeKeys = [
|
|
|
173
173
|
const volumeEnvelopeKeySet = new Set(volumeEnvelopeKeys);
|
|
174
174
|
class MidyGM1 {
|
|
175
175
|
constructor(audioContext) {
|
|
176
|
+
Object.defineProperty(this, "mode", {
|
|
177
|
+
enumerable: true,
|
|
178
|
+
configurable: true,
|
|
179
|
+
writable: true,
|
|
180
|
+
value: "GM1"
|
|
181
|
+
});
|
|
176
182
|
Object.defineProperty(this, "ticksPerBeat", {
|
|
177
183
|
enumerable: true,
|
|
178
184
|
configurable: true,
|
|
@@ -295,10 +301,16 @@ class MidyGM1 {
|
|
|
295
301
|
});
|
|
296
302
|
this.audioContext = audioContext;
|
|
297
303
|
this.masterVolume = new GainNode(audioContext);
|
|
304
|
+
this.scheduler = new GainNode(audioContext, { gain: 0 });
|
|
305
|
+
this.schedulerBuffer = new AudioBuffer({
|
|
306
|
+
length: 1,
|
|
307
|
+
sampleRate: audioContext.sampleRate,
|
|
308
|
+
});
|
|
298
309
|
this.voiceParamsHandlers = this.createVoiceParamsHandlers();
|
|
299
310
|
this.controlChangeHandlers = this.createControlChangeHandlers();
|
|
300
311
|
this.channels = this.createChannels(audioContext);
|
|
301
312
|
this.masterVolume.connect(audioContext.destination);
|
|
313
|
+
this.scheduler.connect(audioContext.destination);
|
|
302
314
|
this.GM1SystemOn();
|
|
303
315
|
}
|
|
304
316
|
initSoundFontTable() {
|
|
@@ -392,7 +404,7 @@ class MidyGM1 {
|
|
|
392
404
|
return audioBuffer;
|
|
393
405
|
}
|
|
394
406
|
}
|
|
395
|
-
|
|
407
|
+
createBufferSource(audioBuffer, voiceParams) {
|
|
396
408
|
const bufferSource = new AudioBufferSourceNode(this.audioContext);
|
|
397
409
|
bufferSource.buffer = audioBuffer;
|
|
398
410
|
bufferSource.loop = voiceParams.sampleModes % 2 !== 0;
|
|
@@ -808,7 +820,7 @@ class MidyGM1 {
|
|
|
808
820
|
const voiceParams = voice.getAllParams(controllerState);
|
|
809
821
|
const note = new Note(noteNumber, velocity, startTime, voice, voiceParams);
|
|
810
822
|
const audioBuffer = await this.getAudioBuffer(channel.program, noteNumber, velocity, voiceParams, isSF3);
|
|
811
|
-
note.bufferSource = this.
|
|
823
|
+
note.bufferSource = this.createBufferSource(audioBuffer, voiceParams);
|
|
812
824
|
note.volumeEnvelopeNode = new GainNode(this.audioContext);
|
|
813
825
|
note.filterNode = new BiquadFilterNode(this.audioContext, {
|
|
814
826
|
type: "lowpass",
|
|
@@ -847,7 +859,7 @@ class MidyGM1 {
|
|
|
847
859
|
if (this.exclusiveClassMap.has(exclusiveClass)) {
|
|
848
860
|
const prevEntry = this.exclusiveClassMap.get(exclusiveClass);
|
|
849
861
|
const [prevNote, prevChannelNumber] = prevEntry;
|
|
850
|
-
if (!prevNote.ending) {
|
|
862
|
+
if (prevNote && !prevNote.ending) {
|
|
851
863
|
this.scheduleNoteOff(prevChannelNumber, prevNote.noteNumber, 0, // velocity,
|
|
852
864
|
startTime, true);
|
|
853
865
|
}
|
|
@@ -955,8 +967,10 @@ class MidyGM1 {
|
|
|
955
967
|
this.setPitchBend(channelNumber, pitchBend, scheduleTime);
|
|
956
968
|
}
|
|
957
969
|
setPitchBend(channelNumber, value, scheduleTime) {
|
|
958
|
-
scheduleTime ??= this.audioContext.currentTime;
|
|
959
970
|
const channel = this.channels[channelNumber];
|
|
971
|
+
if (channel.isDrum)
|
|
972
|
+
return;
|
|
973
|
+
scheduleTime ??= this.audioContext.currentTime;
|
|
960
974
|
const state = channel.state;
|
|
961
975
|
const prev = state.pitchWheel * 2 - 1;
|
|
962
976
|
const next = (value - 8192) / 8192;
|
|
@@ -1117,8 +1131,10 @@ class MidyGM1 {
|
|
|
1117
1131
|
});
|
|
1118
1132
|
}
|
|
1119
1133
|
setModulationDepth(channelNumber, modulation, scheduleTime) {
|
|
1120
|
-
scheduleTime ??= this.audioContext.currentTime;
|
|
1121
1134
|
const channel = this.channels[channelNumber];
|
|
1135
|
+
if (channel.isDrum)
|
|
1136
|
+
return;
|
|
1137
|
+
scheduleTime ??= this.audioContext.currentTime;
|
|
1122
1138
|
channel.state.modulationDepth = modulation / 127;
|
|
1123
1139
|
this.updateModulation(channel, scheduleTime);
|
|
1124
1140
|
}
|
|
@@ -1163,8 +1179,10 @@ class MidyGM1 {
|
|
|
1163
1179
|
.setValueAtTime(volume * gainRight, scheduleTime);
|
|
1164
1180
|
}
|
|
1165
1181
|
setSustainPedal(channelNumber, value, scheduleTime) {
|
|
1166
|
-
scheduleTime ??= this.audioContext.currentTime;
|
|
1167
1182
|
const channel = this.channels[channelNumber];
|
|
1183
|
+
if (channel.isDrum)
|
|
1184
|
+
return;
|
|
1185
|
+
scheduleTime ??= this.audioContext.currentTime;
|
|
1168
1186
|
channel.state.sustainPedal = value / 127;
|
|
1169
1187
|
if (64 <= value) {
|
|
1170
1188
|
this.processScheduledNotes(channel, (note) => {
|
|
@@ -1235,8 +1253,10 @@ class MidyGM1 {
|
|
|
1235
1253
|
this.setPitchBendRange(channelNumber, pitchBendRange, scheduleTime);
|
|
1236
1254
|
}
|
|
1237
1255
|
setPitchBendRange(channelNumber, value, scheduleTime) {
|
|
1238
|
-
scheduleTime ??= this.audioContext.currentTime;
|
|
1239
1256
|
const channel = this.channels[channelNumber];
|
|
1257
|
+
if (channel.isDrum)
|
|
1258
|
+
return;
|
|
1259
|
+
scheduleTime ??= this.audioContext.currentTime;
|
|
1240
1260
|
const state = channel.state;
|
|
1241
1261
|
const prev = state.pitchWheelSensitivity;
|
|
1242
1262
|
const next = value / 128;
|
|
@@ -1252,8 +1272,10 @@ class MidyGM1 {
|
|
|
1252
1272
|
this.setFineTuning(channelNumber, fineTuning, scheduleTime);
|
|
1253
1273
|
}
|
|
1254
1274
|
setFineTuning(channelNumber, value, scheduleTime) {
|
|
1255
|
-
scheduleTime ??= this.audioContext.currentTime;
|
|
1256
1275
|
const channel = this.channels[channelNumber];
|
|
1276
|
+
if (channel.isDrum)
|
|
1277
|
+
return;
|
|
1278
|
+
scheduleTime ??= this.audioContext.currentTime;
|
|
1257
1279
|
const prev = channel.fineTuning;
|
|
1258
1280
|
const next = (value - 8192) / 8.192; // cent
|
|
1259
1281
|
channel.fineTuning = next;
|
|
@@ -1267,8 +1289,10 @@ class MidyGM1 {
|
|
|
1267
1289
|
this.setCoarseTuning(channelNumber, coarseTuning, scheduleTime);
|
|
1268
1290
|
}
|
|
1269
1291
|
setCoarseTuning(channelNumber, value, scheduleTime) {
|
|
1270
|
-
scheduleTime ??= this.audioContext.currentTime;
|
|
1271
1292
|
const channel = this.channels[channelNumber];
|
|
1293
|
+
if (channel.isDrum)
|
|
1294
|
+
return;
|
|
1295
|
+
scheduleTime ??= this.audioContext.currentTime;
|
|
1272
1296
|
const prev = channel.coarseTuning;
|
|
1273
1297
|
const next = (value - 64) * 100; // cent
|
|
1274
1298
|
channel.coarseTuning = next;
|
|
@@ -1305,12 +1329,12 @@ class MidyGM1 {
|
|
|
1305
1329
|
scheduleTime ??= this.audioContext.currentTime;
|
|
1306
1330
|
return this.stopChannelNotes(channelNumber, 0, false, scheduleTime);
|
|
1307
1331
|
}
|
|
1308
|
-
handleUniversalNonRealTimeExclusiveMessage(data,
|
|
1332
|
+
handleUniversalNonRealTimeExclusiveMessage(data, scheduleTime) {
|
|
1309
1333
|
switch (data[2]) {
|
|
1310
1334
|
case 9:
|
|
1311
1335
|
switch (data[3]) {
|
|
1312
1336
|
case 1:
|
|
1313
|
-
this.GM1SystemOn();
|
|
1337
|
+
this.GM1SystemOn(scheduleTime);
|
|
1314
1338
|
break;
|
|
1315
1339
|
case 2: // GM System Off
|
|
1316
1340
|
break;
|
|
@@ -1322,12 +1346,17 @@ class MidyGM1 {
|
|
|
1322
1346
|
console.warn(`Unsupported Exclusive Message: ${data}`);
|
|
1323
1347
|
}
|
|
1324
1348
|
}
|
|
1325
|
-
GM1SystemOn() {
|
|
1349
|
+
GM1SystemOn(scheduleTime) {
|
|
1350
|
+
scheduleTime ??= this.audioContext.currentTime;
|
|
1351
|
+
this.mode = "GM1";
|
|
1326
1352
|
for (let i = 0; i < this.channels.length; i++) {
|
|
1353
|
+
this.allSoundOff(i, 0, scheduleTime);
|
|
1327
1354
|
const channel = this.channels[i];
|
|
1328
1355
|
channel.bank = 0;
|
|
1356
|
+
channel.isDrum = false;
|
|
1329
1357
|
}
|
|
1330
1358
|
this.channels[9].bank = 128;
|
|
1359
|
+
this.channels[9].isDrum = true;
|
|
1331
1360
|
}
|
|
1332
1361
|
handleUniversalRealTimeExclusiveMessage(data, scheduleTime) {
|
|
1333
1362
|
switch (data[2]) {
|
|
@@ -1370,13 +1399,20 @@ class MidyGM1 {
|
|
|
1370
1399
|
}
|
|
1371
1400
|
scheduleTask(callback, scheduleTime) {
|
|
1372
1401
|
return new Promise((resolve) => {
|
|
1373
|
-
const bufferSource = new AudioBufferSourceNode(this.audioContext
|
|
1402
|
+
const bufferSource = new AudioBufferSourceNode(this.audioContext, {
|
|
1403
|
+
buffer: this.schedulerBuffer,
|
|
1404
|
+
});
|
|
1405
|
+
bufferSource.connect(this.scheduler);
|
|
1374
1406
|
bufferSource.onended = () => {
|
|
1375
|
-
|
|
1376
|
-
|
|
1407
|
+
try {
|
|
1408
|
+
callback();
|
|
1409
|
+
}
|
|
1410
|
+
finally {
|
|
1411
|
+
bufferSource.disconnect();
|
|
1412
|
+
resolve();
|
|
1413
|
+
}
|
|
1377
1414
|
};
|
|
1378
1415
|
bufferSource.start(scheduleTime);
|
|
1379
|
-
bufferSource.stop(scheduleTime);
|
|
1380
1416
|
});
|
|
1381
1417
|
}
|
|
1382
1418
|
}
|
|
@@ -1387,6 +1423,7 @@ Object.defineProperty(MidyGM1, "channelSettings", {
|
|
|
1387
1423
|
writable: true,
|
|
1388
1424
|
value: {
|
|
1389
1425
|
currentBufferSource: null,
|
|
1426
|
+
isDrum: false,
|
|
1390
1427
|
detune: 0,
|
|
1391
1428
|
program: 0,
|
|
1392
1429
|
bank: 0,
|
|
@@ -1394,8 +1431,8 @@ Object.defineProperty(MidyGM1, "channelSettings", {
|
|
|
1394
1431
|
dataLSB: 0,
|
|
1395
1432
|
rpnMSB: 127,
|
|
1396
1433
|
rpnLSB: 127,
|
|
1434
|
+
modulationDepthRange: 50, // cent
|
|
1397
1435
|
fineTuning: 0, // cb
|
|
1398
1436
|
coarseTuning: 0, // cb
|
|
1399
|
-
modulationDepthRange: 50, // cent
|
|
1400
1437
|
}
|
|
1401
1438
|
});
|
package/script/midy-GM2.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export class MidyGM2 {
|
|
2
2
|
static channelSettings: {
|
|
3
3
|
currentBufferSource: null;
|
|
4
|
+
isDrum: boolean;
|
|
4
5
|
detune: number;
|
|
5
6
|
program: number;
|
|
6
7
|
bank: number;
|
|
@@ -11,9 +12,9 @@ export class MidyGM2 {
|
|
|
11
12
|
rpnMSB: number;
|
|
12
13
|
rpnLSB: number;
|
|
13
14
|
mono: boolean;
|
|
15
|
+
modulationDepthRange: number;
|
|
14
16
|
fineTuning: number;
|
|
15
17
|
coarseTuning: number;
|
|
16
|
-
modulationDepthRange: number;
|
|
17
18
|
};
|
|
18
19
|
constructor(audioContext: any, options?: {
|
|
19
20
|
reverbAlgorithm: (audioContext: any) => {
|
|
@@ -21,6 +22,7 @@ export class MidyGM2 {
|
|
|
21
22
|
output: any;
|
|
22
23
|
};
|
|
23
24
|
});
|
|
25
|
+
mode: string;
|
|
24
26
|
ticksPerBeat: number;
|
|
25
27
|
totalTime: number;
|
|
26
28
|
masterFineTuning: number;
|
|
@@ -68,6 +70,8 @@ export class MidyGM2 {
|
|
|
68
70
|
};
|
|
69
71
|
};
|
|
70
72
|
masterVolume: any;
|
|
73
|
+
scheduler: any;
|
|
74
|
+
schedulerBuffer: any;
|
|
71
75
|
voiceParamsHandlers: {
|
|
72
76
|
modLfoToPitch: (channel: any, note: any, _prevValue: any, scheduleTime: any) => void;
|
|
73
77
|
vibLfoToPitch: (channel: any, note: any, _prevValue: any, scheduleTime: any) => void;
|
|
@@ -93,7 +97,7 @@ export class MidyGM2 {
|
|
|
93
97
|
64: (channelNumber: any, value: any, scheduleTime: any) => void;
|
|
94
98
|
65: (channelNumber: any, value: any) => void;
|
|
95
99
|
66: (channelNumber: any, value: any, scheduleTime: any) => void;
|
|
96
|
-
67: (channelNumber: any, softPedal: any,
|
|
100
|
+
67: (channelNumber: any, softPedal: any, scheduleTime: any) => void;
|
|
97
101
|
91: (channelNumber: any, reverbSendLevel: any, scheduleTime: any) => void;
|
|
98
102
|
93: (channelNumber: any, chorusSendLevel: any, scheduleTime: any) => void;
|
|
99
103
|
100: (channelNumber: any, value: any) => void;
|
|
@@ -131,7 +135,8 @@ export class MidyGM2 {
|
|
|
131
135
|
};
|
|
132
136
|
createChannels(audioContext: any): any[];
|
|
133
137
|
createNoteBuffer(voiceParams: any, isSF3: any): Promise<any>;
|
|
134
|
-
|
|
138
|
+
calcLoopMode(channel: any, note: any, voiceParams: any): boolean;
|
|
139
|
+
createBufferSource(channel: any, note: any, voiceParams: any, audioBuffer: any): any;
|
|
135
140
|
findPortamentoTarget(queueIndex: any): any;
|
|
136
141
|
scheduleTimelineEvents(t: any, offset: any, queueIndex: any): Promise<any>;
|
|
137
142
|
getQueueIndex(second: any): number;
|
|
@@ -196,7 +201,7 @@ export class MidyGM2 {
|
|
|
196
201
|
startVibrato(channel: any, note: any, scheduleTime: any): void;
|
|
197
202
|
getAudioBuffer(program: any, noteNumber: any, velocity: any, voiceParams: any, isSF3: any): Promise<any>;
|
|
198
203
|
createNote(channel: any, voice: any, noteNumber: any, velocity: any, startTime: any, portamento: any, isSF3: any): Promise<Note>;
|
|
199
|
-
calcBank(channel: any
|
|
204
|
+
calcBank(channel: any): any;
|
|
200
205
|
scheduleNoteOn(channelNumber: any, noteNumber: any, velocity: any, startTime: any, portamento: any): Promise<void>;
|
|
201
206
|
noteOn(channelNumber: any, noteNumber: any, velocity: any, scheduleTime: any): Promise<void>;
|
|
202
207
|
stopNote(endTime: any, stopTime: any, scheduledNotes: any, index: any): Promise<any>;
|
|
@@ -245,7 +250,7 @@ export class MidyGM2 {
|
|
|
245
250
|
64: (channelNumber: any, value: any, scheduleTime: any) => void;
|
|
246
251
|
65: (channelNumber: any, value: any) => void;
|
|
247
252
|
66: (channelNumber: any, value: any, scheduleTime: any) => void;
|
|
248
|
-
67: (channelNumber: any, softPedal: any,
|
|
253
|
+
67: (channelNumber: any, softPedal: any, scheduleTime: any) => void;
|
|
249
254
|
91: (channelNumber: any, reverbSendLevel: any, scheduleTime: any) => void;
|
|
250
255
|
93: (channelNumber: any, chorusSendLevel: any, scheduleTime: any) => void;
|
|
251
256
|
100: (channelNumber: any, value: any) => void;
|
|
@@ -278,7 +283,7 @@ export class MidyGM2 {
|
|
|
278
283
|
setSustainPedal(channelNumber: any, value: any, scheduleTime: any): void;
|
|
279
284
|
setPortamento(channelNumber: any, value: any): void;
|
|
280
285
|
setSostenutoPedal(channelNumber: any, value: any, scheduleTime: any): void;
|
|
281
|
-
setSoftPedal(channelNumber: any, softPedal: any,
|
|
286
|
+
setSoftPedal(channelNumber: any, softPedal: any, scheduleTime: any): void;
|
|
282
287
|
setReverbSendLevel(channelNumber: any, reverbSendLevel: any, scheduleTime: any): void;
|
|
283
288
|
setChorusSendLevel(channelNumber: any, chorusSendLevel: any, scheduleTime: any): void;
|
|
284
289
|
limitData(channel: any, minMSB: any, maxMSB: any, minLSB: any, maxLSB: any): void;
|
|
@@ -303,8 +308,8 @@ export class MidyGM2 {
|
|
|
303
308
|
monoOn(channelNumber: any, value: any, scheduleTime: any): void;
|
|
304
309
|
polyOn(channelNumber: any, value: any, scheduleTime: any): void;
|
|
305
310
|
handleUniversalNonRealTimeExclusiveMessage(data: any, scheduleTime: any): void;
|
|
306
|
-
GM1SystemOn(): void;
|
|
307
|
-
GM2SystemOn(): void;
|
|
311
|
+
GM1SystemOn(scheduleTime: any): void;
|
|
312
|
+
GM2SystemOn(scheduleTime: any): void;
|
|
308
313
|
handleUniversalRealTimeExclusiveMessage(data: any, scheduleTime: any): void;
|
|
309
314
|
handleMasterVolumeSysEx(data: any, scheduleTime: any): void;
|
|
310
315
|
setMasterVolume(volume: 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":"AA8KA;
|
|
1
|
+
{"version":3,"file":"midy-GM2.d.ts","sourceRoot":"","sources":["../src/midy-GM2.js"],"names":[],"mappings":"AA8KA;IAoCE;;;;;;;;;;;;;;;;MAgBE;IAgCF;;;;;OAmBC;IAtGD,aAAa;IACb,qBAAmB;IACnB,kBAAc;IACd,yBAAqB;IACrB,2BAAuB;IACvB;;;MAGE;IACF;;;;;;MAME;IACF,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,6BAAuC;IAoBvC;;;;;MA4BE;IAGA,kBAAgC;IAChC;;;;;MAAqD;IACrD,kBAA8C;IAC9C,eAAwD;IACxD,qBAGE;IACF;;;;;;;;;;;MAA2D;IAC3D;;;;;;;;;;;;;;;;;;;;;;;;;MAA+D;IAC/D,gBAAiD;IACjD;;;MAA8D;IAC9D;;;;;;;;MAAyD;IAQ3D,4BAMC;IAED,mCAWC;IAED,gDAMC;IAED,sCASC;IAED;;;;MAeC;IAED,yCAgBC;IAED,6DA2BC;IAED,iEAWC;IAED,qFASC;IAED,2CAcC;IAED,2EA6DC;IAED,mCAOC;IAED,0BAoDC;IAED,uDAEC;IAED,wDAEC;IAED,6EAEC;IAED;;;MAgHC;IAED,mGAiBC;IAED,wEAMC;IAED,uBAKC;IAED,aAGC;IAED,cAKC;IAED,wBAIC;IAED,0BAKC;IAED,wBAOC;IAED,sBAGC;IAED,yDAQC;IAED,2DASC;IAED,qDAQC;IAED,kFAuBC;IAED;;;;MAWC;IAED,gFAUC;IAED,mFAYC;IAED,sGAcC;IAID;;;MA8BC;IAED;;;;;;;;MA0CC;IAED,2BAEC;IAED,8BAEC;IAED,8BAEC;IAED,4BAEC;IAED,qCAYC;IAED,6CAEC;IAED,2DAIC;IAED,+DA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