@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/esm/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/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":"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/esm/midy-GM1.js
CHANGED
|
@@ -170,6 +170,12 @@ const volumeEnvelopeKeys = [
|
|
|
170
170
|
const volumeEnvelopeKeySet = new Set(volumeEnvelopeKeys);
|
|
171
171
|
export class MidyGM1 {
|
|
172
172
|
constructor(audioContext) {
|
|
173
|
+
Object.defineProperty(this, "mode", {
|
|
174
|
+
enumerable: true,
|
|
175
|
+
configurable: true,
|
|
176
|
+
writable: true,
|
|
177
|
+
value: "GM1"
|
|
178
|
+
});
|
|
173
179
|
Object.defineProperty(this, "ticksPerBeat", {
|
|
174
180
|
enumerable: true,
|
|
175
181
|
configurable: true,
|
|
@@ -292,10 +298,16 @@ export class MidyGM1 {
|
|
|
292
298
|
});
|
|
293
299
|
this.audioContext = audioContext;
|
|
294
300
|
this.masterVolume = new GainNode(audioContext);
|
|
301
|
+
this.scheduler = new GainNode(audioContext, { gain: 0 });
|
|
302
|
+
this.schedulerBuffer = new AudioBuffer({
|
|
303
|
+
length: 1,
|
|
304
|
+
sampleRate: audioContext.sampleRate,
|
|
305
|
+
});
|
|
295
306
|
this.voiceParamsHandlers = this.createVoiceParamsHandlers();
|
|
296
307
|
this.controlChangeHandlers = this.createControlChangeHandlers();
|
|
297
308
|
this.channels = this.createChannels(audioContext);
|
|
298
309
|
this.masterVolume.connect(audioContext.destination);
|
|
310
|
+
this.scheduler.connect(audioContext.destination);
|
|
299
311
|
this.GM1SystemOn();
|
|
300
312
|
}
|
|
301
313
|
initSoundFontTable() {
|
|
@@ -389,7 +401,7 @@ export class MidyGM1 {
|
|
|
389
401
|
return audioBuffer;
|
|
390
402
|
}
|
|
391
403
|
}
|
|
392
|
-
|
|
404
|
+
createBufferSource(audioBuffer, voiceParams) {
|
|
393
405
|
const bufferSource = new AudioBufferSourceNode(this.audioContext);
|
|
394
406
|
bufferSource.buffer = audioBuffer;
|
|
395
407
|
bufferSource.loop = voiceParams.sampleModes % 2 !== 0;
|
|
@@ -805,7 +817,7 @@ export class MidyGM1 {
|
|
|
805
817
|
const voiceParams = voice.getAllParams(controllerState);
|
|
806
818
|
const note = new Note(noteNumber, velocity, startTime, voice, voiceParams);
|
|
807
819
|
const audioBuffer = await this.getAudioBuffer(channel.program, noteNumber, velocity, voiceParams, isSF3);
|
|
808
|
-
note.bufferSource = this.
|
|
820
|
+
note.bufferSource = this.createBufferSource(audioBuffer, voiceParams);
|
|
809
821
|
note.volumeEnvelopeNode = new GainNode(this.audioContext);
|
|
810
822
|
note.filterNode = new BiquadFilterNode(this.audioContext, {
|
|
811
823
|
type: "lowpass",
|
|
@@ -844,7 +856,7 @@ export class MidyGM1 {
|
|
|
844
856
|
if (this.exclusiveClassMap.has(exclusiveClass)) {
|
|
845
857
|
const prevEntry = this.exclusiveClassMap.get(exclusiveClass);
|
|
846
858
|
const [prevNote, prevChannelNumber] = prevEntry;
|
|
847
|
-
if (!prevNote.ending) {
|
|
859
|
+
if (prevNote && !prevNote.ending) {
|
|
848
860
|
this.scheduleNoteOff(prevChannelNumber, prevNote.noteNumber, 0, // velocity,
|
|
849
861
|
startTime, true);
|
|
850
862
|
}
|
|
@@ -952,8 +964,10 @@ export class MidyGM1 {
|
|
|
952
964
|
this.setPitchBend(channelNumber, pitchBend, scheduleTime);
|
|
953
965
|
}
|
|
954
966
|
setPitchBend(channelNumber, value, scheduleTime) {
|
|
955
|
-
scheduleTime ??= this.audioContext.currentTime;
|
|
956
967
|
const channel = this.channels[channelNumber];
|
|
968
|
+
if (channel.isDrum)
|
|
969
|
+
return;
|
|
970
|
+
scheduleTime ??= this.audioContext.currentTime;
|
|
957
971
|
const state = channel.state;
|
|
958
972
|
const prev = state.pitchWheel * 2 - 1;
|
|
959
973
|
const next = (value - 8192) / 8192;
|
|
@@ -1114,8 +1128,10 @@ export class MidyGM1 {
|
|
|
1114
1128
|
});
|
|
1115
1129
|
}
|
|
1116
1130
|
setModulationDepth(channelNumber, modulation, scheduleTime) {
|
|
1117
|
-
scheduleTime ??= this.audioContext.currentTime;
|
|
1118
1131
|
const channel = this.channels[channelNumber];
|
|
1132
|
+
if (channel.isDrum)
|
|
1133
|
+
return;
|
|
1134
|
+
scheduleTime ??= this.audioContext.currentTime;
|
|
1119
1135
|
channel.state.modulationDepth = modulation / 127;
|
|
1120
1136
|
this.updateModulation(channel, scheduleTime);
|
|
1121
1137
|
}
|
|
@@ -1160,8 +1176,10 @@ export class MidyGM1 {
|
|
|
1160
1176
|
.setValueAtTime(volume * gainRight, scheduleTime);
|
|
1161
1177
|
}
|
|
1162
1178
|
setSustainPedal(channelNumber, value, scheduleTime) {
|
|
1163
|
-
scheduleTime ??= this.audioContext.currentTime;
|
|
1164
1179
|
const channel = this.channels[channelNumber];
|
|
1180
|
+
if (channel.isDrum)
|
|
1181
|
+
return;
|
|
1182
|
+
scheduleTime ??= this.audioContext.currentTime;
|
|
1165
1183
|
channel.state.sustainPedal = value / 127;
|
|
1166
1184
|
if (64 <= value) {
|
|
1167
1185
|
this.processScheduledNotes(channel, (note) => {
|
|
@@ -1232,8 +1250,10 @@ export class MidyGM1 {
|
|
|
1232
1250
|
this.setPitchBendRange(channelNumber, pitchBendRange, scheduleTime);
|
|
1233
1251
|
}
|
|
1234
1252
|
setPitchBendRange(channelNumber, value, scheduleTime) {
|
|
1235
|
-
scheduleTime ??= this.audioContext.currentTime;
|
|
1236
1253
|
const channel = this.channels[channelNumber];
|
|
1254
|
+
if (channel.isDrum)
|
|
1255
|
+
return;
|
|
1256
|
+
scheduleTime ??= this.audioContext.currentTime;
|
|
1237
1257
|
const state = channel.state;
|
|
1238
1258
|
const prev = state.pitchWheelSensitivity;
|
|
1239
1259
|
const next = value / 128;
|
|
@@ -1249,8 +1269,10 @@ export class MidyGM1 {
|
|
|
1249
1269
|
this.setFineTuning(channelNumber, fineTuning, scheduleTime);
|
|
1250
1270
|
}
|
|
1251
1271
|
setFineTuning(channelNumber, value, scheduleTime) {
|
|
1252
|
-
scheduleTime ??= this.audioContext.currentTime;
|
|
1253
1272
|
const channel = this.channels[channelNumber];
|
|
1273
|
+
if (channel.isDrum)
|
|
1274
|
+
return;
|
|
1275
|
+
scheduleTime ??= this.audioContext.currentTime;
|
|
1254
1276
|
const prev = channel.fineTuning;
|
|
1255
1277
|
const next = (value - 8192) / 8.192; // cent
|
|
1256
1278
|
channel.fineTuning = next;
|
|
@@ -1264,8 +1286,10 @@ export class MidyGM1 {
|
|
|
1264
1286
|
this.setCoarseTuning(channelNumber, coarseTuning, scheduleTime);
|
|
1265
1287
|
}
|
|
1266
1288
|
setCoarseTuning(channelNumber, value, scheduleTime) {
|
|
1267
|
-
scheduleTime ??= this.audioContext.currentTime;
|
|
1268
1289
|
const channel = this.channels[channelNumber];
|
|
1290
|
+
if (channel.isDrum)
|
|
1291
|
+
return;
|
|
1292
|
+
scheduleTime ??= this.audioContext.currentTime;
|
|
1269
1293
|
const prev = channel.coarseTuning;
|
|
1270
1294
|
const next = (value - 64) * 100; // cent
|
|
1271
1295
|
channel.coarseTuning = next;
|
|
@@ -1302,12 +1326,12 @@ export class MidyGM1 {
|
|
|
1302
1326
|
scheduleTime ??= this.audioContext.currentTime;
|
|
1303
1327
|
return this.stopChannelNotes(channelNumber, 0, false, scheduleTime);
|
|
1304
1328
|
}
|
|
1305
|
-
handleUniversalNonRealTimeExclusiveMessage(data,
|
|
1329
|
+
handleUniversalNonRealTimeExclusiveMessage(data, scheduleTime) {
|
|
1306
1330
|
switch (data[2]) {
|
|
1307
1331
|
case 9:
|
|
1308
1332
|
switch (data[3]) {
|
|
1309
1333
|
case 1:
|
|
1310
|
-
this.GM1SystemOn();
|
|
1334
|
+
this.GM1SystemOn(scheduleTime);
|
|
1311
1335
|
break;
|
|
1312
1336
|
case 2: // GM System Off
|
|
1313
1337
|
break;
|
|
@@ -1319,12 +1343,17 @@ export class MidyGM1 {
|
|
|
1319
1343
|
console.warn(`Unsupported Exclusive Message: ${data}`);
|
|
1320
1344
|
}
|
|
1321
1345
|
}
|
|
1322
|
-
GM1SystemOn() {
|
|
1346
|
+
GM1SystemOn(scheduleTime) {
|
|
1347
|
+
scheduleTime ??= this.audioContext.currentTime;
|
|
1348
|
+
this.mode = "GM1";
|
|
1323
1349
|
for (let i = 0; i < this.channels.length; i++) {
|
|
1350
|
+
this.allSoundOff(i, 0, scheduleTime);
|
|
1324
1351
|
const channel = this.channels[i];
|
|
1325
1352
|
channel.bank = 0;
|
|
1353
|
+
channel.isDrum = false;
|
|
1326
1354
|
}
|
|
1327
1355
|
this.channels[9].bank = 128;
|
|
1356
|
+
this.channels[9].isDrum = true;
|
|
1328
1357
|
}
|
|
1329
1358
|
handleUniversalRealTimeExclusiveMessage(data, scheduleTime) {
|
|
1330
1359
|
switch (data[2]) {
|
|
@@ -1367,13 +1396,20 @@ export class MidyGM1 {
|
|
|
1367
1396
|
}
|
|
1368
1397
|
scheduleTask(callback, scheduleTime) {
|
|
1369
1398
|
return new Promise((resolve) => {
|
|
1370
|
-
const bufferSource = new AudioBufferSourceNode(this.audioContext
|
|
1399
|
+
const bufferSource = new AudioBufferSourceNode(this.audioContext, {
|
|
1400
|
+
buffer: this.schedulerBuffer,
|
|
1401
|
+
});
|
|
1402
|
+
bufferSource.connect(this.scheduler);
|
|
1371
1403
|
bufferSource.onended = () => {
|
|
1372
|
-
|
|
1373
|
-
|
|
1404
|
+
try {
|
|
1405
|
+
callback();
|
|
1406
|
+
}
|
|
1407
|
+
finally {
|
|
1408
|
+
bufferSource.disconnect();
|
|
1409
|
+
resolve();
|
|
1410
|
+
}
|
|
1374
1411
|
};
|
|
1375
1412
|
bufferSource.start(scheduleTime);
|
|
1376
|
-
bufferSource.stop(scheduleTime);
|
|
1377
1413
|
});
|
|
1378
1414
|
}
|
|
1379
1415
|
}
|
|
@@ -1383,6 +1419,7 @@ Object.defineProperty(MidyGM1, "channelSettings", {
|
|
|
1383
1419
|
writable: true,
|
|
1384
1420
|
value: {
|
|
1385
1421
|
currentBufferSource: null,
|
|
1422
|
+
isDrum: false,
|
|
1386
1423
|
detune: 0,
|
|
1387
1424
|
program: 0,
|
|
1388
1425
|
bank: 0,
|
|
@@ -1390,8 +1427,8 @@ Object.defineProperty(MidyGM1, "channelSettings", {
|
|
|
1390
1427
|
dataLSB: 0,
|
|
1391
1428
|
rpnMSB: 127,
|
|
1392
1429
|
rpnLSB: 127,
|
|
1430
|
+
modulationDepthRange: 50, // cent
|
|
1393
1431
|
fineTuning: 0, // cb
|
|
1394
1432
|
coarseTuning: 0, // cb
|
|
1395
|
-
modulationDepthRange: 50, // cent
|
|
1396
1433
|
}
|
|
1397
1434
|
});
|
package/esm/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/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":"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,6CAE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