@marmooo/midy 0.3.8 → 0.4.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 +6 -24
- package/esm/midy-GM1.d.ts.map +1 -1
- package/esm/midy-GM1.js +98 -51
- package/esm/midy-GM2.d.ts +6 -29
- package/esm/midy-GM2.d.ts.map +1 -1
- package/esm/midy-GM2.js +107 -60
- package/esm/midy-GMLite.d.ts +6 -24
- package/esm/midy-GMLite.d.ts.map +1 -1
- package/esm/midy-GMLite.js +100 -53
- package/esm/midy.d.ts +6 -30
- package/esm/midy.d.ts.map +1 -1
- package/esm/midy.js +107 -60
- package/package.json +1 -1
- package/script/midy-GM1.d.ts +6 -24
- package/script/midy-GM1.d.ts.map +1 -1
- package/script/midy-GM1.js +98 -51
- package/script/midy-GM2.d.ts +6 -29
- package/script/midy-GM2.d.ts.map +1 -1
- package/script/midy-GM2.js +107 -60
- package/script/midy-GMLite.d.ts +6 -24
- package/script/midy-GMLite.d.ts.map +1 -1
- package/script/midy-GMLite.js +100 -53
- package/script/midy.d.ts +6 -30
- package/script/midy.d.ts.map +1 -1
- package/script/midy.js +107 -60
package/script/midy-GM2.js
CHANGED
|
@@ -4,7 +4,19 @@ exports.MidyGM2 = void 0;
|
|
|
4
4
|
const midi_file_1 = require("midi-file");
|
|
5
5
|
const soundfont_parser_1 = require("@marmooo/soundfont-parser");
|
|
6
6
|
class Note {
|
|
7
|
-
constructor(noteNumber, velocity, startTime
|
|
7
|
+
constructor(noteNumber, velocity, startTime) {
|
|
8
|
+
Object.defineProperty(this, "voice", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
configurable: true,
|
|
11
|
+
writable: true,
|
|
12
|
+
value: void 0
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(this, "voiceParams", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
configurable: true,
|
|
17
|
+
writable: true,
|
|
18
|
+
value: void 0
|
|
19
|
+
});
|
|
8
20
|
Object.defineProperty(this, "index", {
|
|
9
21
|
enumerable: true,
|
|
10
22
|
configurable: true,
|
|
@@ -17,6 +29,12 @@ class Note {
|
|
|
17
29
|
writable: true,
|
|
18
30
|
value: false
|
|
19
31
|
});
|
|
32
|
+
Object.defineProperty(this, "pending", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
writable: true,
|
|
36
|
+
value: true
|
|
37
|
+
});
|
|
20
38
|
Object.defineProperty(this, "bufferSource", {
|
|
21
39
|
enumerable: true,
|
|
22
40
|
configurable: true,
|
|
@@ -92,8 +110,6 @@ class Note {
|
|
|
92
110
|
this.noteNumber = noteNumber;
|
|
93
111
|
this.velocity = velocity;
|
|
94
112
|
this.startTime = startTime;
|
|
95
|
-
this.voice = voice;
|
|
96
|
-
this.voiceParams = voiceParams;
|
|
97
113
|
}
|
|
98
114
|
}
|
|
99
115
|
const drumExclusiveClassesByKit = new Array(57);
|
|
@@ -341,6 +357,12 @@ class MidyGM2 {
|
|
|
341
357
|
writable: true,
|
|
342
358
|
value: new Map()
|
|
343
359
|
});
|
|
360
|
+
Object.defineProperty(this, "realtimeVoiceCache", {
|
|
361
|
+
enumerable: true,
|
|
362
|
+
configurable: true,
|
|
363
|
+
writable: true,
|
|
364
|
+
value: new Map()
|
|
365
|
+
});
|
|
344
366
|
Object.defineProperty(this, "isPlaying", {
|
|
345
367
|
enumerable: true,
|
|
346
368
|
configurable: true,
|
|
@@ -603,10 +625,10 @@ class MidyGM2 {
|
|
|
603
625
|
const startTime = event.startTime + schedulingOffset;
|
|
604
626
|
switch (event.type) {
|
|
605
627
|
case "noteOn":
|
|
606
|
-
await this.
|
|
628
|
+
await this.noteOn(event.channel, event.noteNumber, event.velocity, startTime);
|
|
607
629
|
break;
|
|
608
630
|
case "noteOff": {
|
|
609
|
-
const notePromise = this.
|
|
631
|
+
const notePromise = this.noteOff(event.channel, event.noteNumber, event.velocity, startTime, false);
|
|
610
632
|
if (notePromise)
|
|
611
633
|
this.notePromises.push(notePromise);
|
|
612
634
|
break;
|
|
@@ -642,6 +664,7 @@ class MidyGM2 {
|
|
|
642
664
|
this.exclusiveClassNotes.fill(undefined);
|
|
643
665
|
this.drumExclusiveClassNotes.fill(undefined);
|
|
644
666
|
this.voiceCache.clear();
|
|
667
|
+
this.realtimeVoiceCache.clear();
|
|
645
668
|
for (let i = 0; i < this.channels.length; i++) {
|
|
646
669
|
this.channels[i].scheduledNotes = [];
|
|
647
670
|
this.resetChannelStates(i);
|
|
@@ -686,7 +709,6 @@ class MidyGM2 {
|
|
|
686
709
|
finished = true;
|
|
687
710
|
break;
|
|
688
711
|
}
|
|
689
|
-
queueIndex = await this.scheduleTimelineEvents(now, queueIndex);
|
|
690
712
|
if (this.isPausing) {
|
|
691
713
|
await this.stopNotes(0, true, now);
|
|
692
714
|
await this.audioContext.suspend();
|
|
@@ -708,6 +730,7 @@ class MidyGM2 {
|
|
|
708
730
|
this.isSeeking = false;
|
|
709
731
|
continue;
|
|
710
732
|
}
|
|
733
|
+
queueIndex = await this.scheduleTimelineEvents(now, queueIndex);
|
|
711
734
|
const waitTime = now + this.noteCheckInterval;
|
|
712
735
|
await this.scheduleTask(() => { }, waitTime);
|
|
713
736
|
}
|
|
@@ -816,7 +839,7 @@ class MidyGM2 {
|
|
|
816
839
|
const channel = this.channels[channelNumber];
|
|
817
840
|
const promises = [];
|
|
818
841
|
this.processActiveNotes(channel, scheduleTime, (note) => {
|
|
819
|
-
const promise = this.
|
|
842
|
+
const promise = this.noteOff(channelNumber, note.noteNumber, velocity, scheduleTime, force);
|
|
820
843
|
this.notePromises.push(promise);
|
|
821
844
|
promises.push(promise);
|
|
822
845
|
});
|
|
@@ -826,7 +849,7 @@ class MidyGM2 {
|
|
|
826
849
|
const channel = this.channels[channelNumber];
|
|
827
850
|
const promises = [];
|
|
828
851
|
this.processScheduledNotes(channel, (note) => {
|
|
829
|
-
const promise = this.
|
|
852
|
+
const promise = this.noteOff(channelNumber, note.noteNumber, velocity, scheduleTime, force);
|
|
830
853
|
this.notePromises.push(promise);
|
|
831
854
|
promises.push(promise);
|
|
832
855
|
});
|
|
@@ -859,7 +882,7 @@ class MidyGM2 {
|
|
|
859
882
|
if (!this.isPlaying || this.isPaused)
|
|
860
883
|
return;
|
|
861
884
|
const now = this.audioContext.currentTime;
|
|
862
|
-
this.resumeTime
|
|
885
|
+
this.resumeTime = now - this.startTime - this.startDelay;
|
|
863
886
|
this.isPausing = true;
|
|
864
887
|
await this.playPromise;
|
|
865
888
|
this.isPausing = false;
|
|
@@ -885,11 +908,13 @@ class MidyGM2 {
|
|
|
885
908
|
if (totalTime < event.startTime)
|
|
886
909
|
totalTime = event.startTime;
|
|
887
910
|
}
|
|
888
|
-
return totalTime;
|
|
911
|
+
return totalTime + this.startDelay;
|
|
889
912
|
}
|
|
890
913
|
currentTime() {
|
|
914
|
+
if (!this.isPlaying)
|
|
915
|
+
return this.resumeTime;
|
|
891
916
|
const now = this.audioContext.currentTime;
|
|
892
|
-
return
|
|
917
|
+
return now + this.resumeTime - this.startTime;
|
|
893
918
|
}
|
|
894
919
|
processScheduledNotes(channel, callback) {
|
|
895
920
|
const scheduledNotes = channel.scheduledNotes;
|
|
@@ -1316,31 +1341,42 @@ class MidyGM2 {
|
|
|
1316
1341
|
note.vibratoLFO.connect(note.vibratoDepth);
|
|
1317
1342
|
note.vibratoDepth.connect(note.bufferSource.detune);
|
|
1318
1343
|
}
|
|
1319
|
-
async getAudioBuffer(channel, noteNumber, velocity, voiceParams) {
|
|
1344
|
+
async getAudioBuffer(channel, noteNumber, velocity, voiceParams, realtime) {
|
|
1320
1345
|
const audioBufferId = this.getVoiceId(channel, noteNumber, velocity);
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
this.voiceCache.delete(audioBufferId);
|
|
1326
|
-
}
|
|
1327
|
-
return cache.audioBuffer;
|
|
1328
|
-
}
|
|
1329
|
-
else {
|
|
1330
|
-
const maxCount = this.voiceCounter.get(audioBufferId) ?? 0;
|
|
1346
|
+
if (realtime) {
|
|
1347
|
+
const cachedAudioBuffer = this.realtimeVoiceCache.get(audioBufferId);
|
|
1348
|
+
if (cachedAudioBuffer)
|
|
1349
|
+
return cachedAudioBuffer;
|
|
1331
1350
|
const audioBuffer = await this.createAudioBuffer(voiceParams);
|
|
1332
|
-
|
|
1333
|
-
this.voiceCache.set(audioBufferId, cache);
|
|
1351
|
+
this.realtimeVoiceCache.set(audioBufferId, audioBuffer);
|
|
1334
1352
|
return audioBuffer;
|
|
1335
1353
|
}
|
|
1354
|
+
else {
|
|
1355
|
+
const cache = this.voiceCache.get(audioBufferId);
|
|
1356
|
+
if (cache) {
|
|
1357
|
+
cache.counter += 1;
|
|
1358
|
+
if (cache.maxCount <= cache.counter) {
|
|
1359
|
+
this.voiceCache.delete(audioBufferId);
|
|
1360
|
+
}
|
|
1361
|
+
return cache.audioBuffer;
|
|
1362
|
+
}
|
|
1363
|
+
else {
|
|
1364
|
+
const maxCount = this.voiceCounter.get(audioBufferId) ?? 0;
|
|
1365
|
+
const audioBuffer = await this.createAudioBuffer(voiceParams);
|
|
1366
|
+
const cache = { audioBuffer, maxCount, counter: 1 };
|
|
1367
|
+
this.voiceCache.set(audioBufferId, cache);
|
|
1368
|
+
return audioBuffer;
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1336
1371
|
}
|
|
1337
|
-
async
|
|
1372
|
+
async setNoteAudioNode(channel, note, realtime) {
|
|
1338
1373
|
const now = this.audioContext.currentTime;
|
|
1374
|
+
const { noteNumber, velocity, startTime } = note;
|
|
1339
1375
|
const state = channel.state;
|
|
1340
1376
|
const controllerState = this.getControllerState(channel, noteNumber, velocity);
|
|
1341
|
-
const voiceParams = voice.getAllParams(controllerState);
|
|
1342
|
-
|
|
1343
|
-
const audioBuffer = await this.getAudioBuffer(channel, noteNumber, velocity, voiceParams);
|
|
1377
|
+
const voiceParams = note.voice.getAllParams(controllerState);
|
|
1378
|
+
note.voiceParams = voiceParams;
|
|
1379
|
+
const audioBuffer = await this.getAudioBuffer(channel, noteNumber, velocity, voiceParams, realtime);
|
|
1344
1380
|
note.bufferSource = this.createBufferSource(channel, noteNumber, voiceParams, audioBuffer);
|
|
1345
1381
|
note.volumeEnvelopeNode = new GainNode(this.audioContext);
|
|
1346
1382
|
note.filterNode = new BiquadFilterNode(this.audioContext, {
|
|
@@ -1387,7 +1423,7 @@ class MidyGM2 {
|
|
|
1387
1423
|
if (prev) {
|
|
1388
1424
|
const [prevNote, prevChannelNumber] = prev;
|
|
1389
1425
|
if (prevNote && !prevNote.ending) {
|
|
1390
|
-
this.
|
|
1426
|
+
this.noteOff(prevChannelNumber, prevNote.noteNumber, 0, // velocity,
|
|
1391
1427
|
startTime, true);
|
|
1392
1428
|
}
|
|
1393
1429
|
}
|
|
@@ -1407,27 +1443,14 @@ class MidyGM2 {
|
|
|
1407
1443
|
channelNumber;
|
|
1408
1444
|
const prevNote = this.drumExclusiveClassNotes[index];
|
|
1409
1445
|
if (prevNote && !prevNote.ending) {
|
|
1410
|
-
this.
|
|
1446
|
+
this.noteOff(channelNumber, prevNote.noteNumber, 0, // velocity,
|
|
1411
1447
|
startTime, true);
|
|
1412
1448
|
}
|
|
1413
1449
|
this.drumExclusiveClassNotes[index] = note;
|
|
1414
1450
|
}
|
|
1415
|
-
|
|
1451
|
+
setNoteRouting(channelNumber, note, startTime) {
|
|
1416
1452
|
const channel = this.channels[channelNumber];
|
|
1417
|
-
const
|
|
1418
|
-
const bankTable = this.soundFontTable[programNumber];
|
|
1419
|
-
if (!bankTable)
|
|
1420
|
-
return;
|
|
1421
|
-
const bankLSB = channel.isDrum ? 128 : channel.bankLSB;
|
|
1422
|
-
const bank = bankTable[bankLSB] !== undefined ? bankLSB : 0;
|
|
1423
|
-
const soundFontIndex = bankTable[bank];
|
|
1424
|
-
if (soundFontIndex === undefined)
|
|
1425
|
-
return;
|
|
1426
|
-
const soundFont = this.soundFonts[soundFontIndex];
|
|
1427
|
-
const voice = soundFont.getVoice(bank, programNumber, noteNumber, velocity);
|
|
1428
|
-
if (!voice)
|
|
1429
|
-
return;
|
|
1430
|
-
const note = await this.createNote(channel, voice, noteNumber, velocity, startTime);
|
|
1453
|
+
const { noteNumber, volumeEnvelopeNode } = note;
|
|
1431
1454
|
if (channel.isDrum) {
|
|
1432
1455
|
const { keyBasedGainLs, keyBasedGainRs } = channel;
|
|
1433
1456
|
let gainL = keyBasedGainLs[noteNumber];
|
|
@@ -1437,25 +1460,48 @@ class MidyGM2 {
|
|
|
1437
1460
|
gainL = keyBasedGainLs[noteNumber] = audioNodes.gainL;
|
|
1438
1461
|
gainR = keyBasedGainRs[noteNumber] = audioNodes.gainR;
|
|
1439
1462
|
}
|
|
1440
|
-
|
|
1441
|
-
|
|
1463
|
+
volumeEnvelopeNode.connect(gainL);
|
|
1464
|
+
volumeEnvelopeNode.connect(gainR);
|
|
1442
1465
|
}
|
|
1443
1466
|
else {
|
|
1444
|
-
|
|
1445
|
-
|
|
1467
|
+
volumeEnvelopeNode.connect(channel.gainL);
|
|
1468
|
+
volumeEnvelopeNode.connect(channel.gainR);
|
|
1446
1469
|
}
|
|
1447
1470
|
if (0.5 <= channel.state.sustainPedal) {
|
|
1448
1471
|
channel.sustainNotes.push(note);
|
|
1449
1472
|
}
|
|
1450
1473
|
this.handleExclusiveClass(note, channelNumber, startTime);
|
|
1451
1474
|
this.handleDrumExclusiveClass(note, channelNumber, startTime);
|
|
1475
|
+
}
|
|
1476
|
+
async noteOn(channelNumber, noteNumber, velocity, startTime) {
|
|
1477
|
+
const channel = this.channels[channelNumber];
|
|
1478
|
+
const realtime = startTime === undefined;
|
|
1479
|
+
if (realtime)
|
|
1480
|
+
startTime = this.audioContext.currentTime;
|
|
1481
|
+
const note = new Note(noteNumber, velocity, startTime);
|
|
1452
1482
|
const scheduledNotes = channel.scheduledNotes;
|
|
1453
1483
|
note.index = scheduledNotes.length;
|
|
1454
1484
|
scheduledNotes.push(note);
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1485
|
+
const programNumber = channel.programNumber;
|
|
1486
|
+
const bankTable = this.soundFontTable[programNumber];
|
|
1487
|
+
if (!bankTable)
|
|
1488
|
+
return;
|
|
1489
|
+
const bankLSB = channel.isDrum ? 128 : channel.bankLSB;
|
|
1490
|
+
const bank = bankTable[bankLSB] !== undefined ? bankLSB : 0;
|
|
1491
|
+
const soundFontIndex = bankTable[bank];
|
|
1492
|
+
if (soundFontIndex === undefined)
|
|
1493
|
+
return;
|
|
1494
|
+
const soundFont = this.soundFonts[soundFontIndex];
|
|
1495
|
+
note.voice = soundFont.getVoice(bank, programNumber, noteNumber, velocity);
|
|
1496
|
+
if (!note.voice)
|
|
1497
|
+
return;
|
|
1498
|
+
await this.setNoteAudioNode(channel, note, realtime);
|
|
1499
|
+
this.setNoteRouting(channelNumber, note, startTime);
|
|
1500
|
+
note.pending = false;
|
|
1501
|
+
const off = note.offEvent;
|
|
1502
|
+
if (off) {
|
|
1503
|
+
this.noteOff(channelNumber, noteNumber, off.velocity, off.startTime);
|
|
1504
|
+
}
|
|
1459
1505
|
}
|
|
1460
1506
|
disconnectNote(note) {
|
|
1461
1507
|
note.bufferSource.disconnect();
|
|
@@ -1478,6 +1524,7 @@ class MidyGM2 {
|
|
|
1478
1524
|
}
|
|
1479
1525
|
}
|
|
1480
1526
|
releaseNote(channel, note, endTime) {
|
|
1527
|
+
endTime ??= this.audioContext.currentTime;
|
|
1481
1528
|
const volRelease = endTime + note.voiceParams.volRelease;
|
|
1482
1529
|
const modRelease = endTime + note.voiceParams.modRelease;
|
|
1483
1530
|
const stopTime = Math.min(volRelease, modRelease);
|
|
@@ -1498,7 +1545,7 @@ class MidyGM2 {
|
|
|
1498
1545
|
}, stopTime);
|
|
1499
1546
|
});
|
|
1500
1547
|
}
|
|
1501
|
-
|
|
1548
|
+
noteOff(channelNumber, noteNumber, velocity, endTime, force) {
|
|
1502
1549
|
const channel = this.channels[channelNumber];
|
|
1503
1550
|
const state = channel.state;
|
|
1504
1551
|
if (!force) {
|
|
@@ -1517,6 +1564,10 @@ class MidyGM2 {
|
|
|
1517
1564
|
if (index < 0)
|
|
1518
1565
|
return;
|
|
1519
1566
|
const note = channel.scheduledNotes[index];
|
|
1567
|
+
if (note.pending) {
|
|
1568
|
+
note.offEvent = { velocity, startTime: endTime };
|
|
1569
|
+
return;
|
|
1570
|
+
}
|
|
1520
1571
|
note.ending = true;
|
|
1521
1572
|
this.setNoteIndex(channel, index);
|
|
1522
1573
|
this.releaseNote(channel, note, endTime);
|
|
@@ -1547,16 +1598,12 @@ class MidyGM2 {
|
|
|
1547
1598
|
}
|
|
1548
1599
|
return -1;
|
|
1549
1600
|
}
|
|
1550
|
-
noteOff(channelNumber, noteNumber, velocity, scheduleTime) {
|
|
1551
|
-
scheduleTime ??= this.audioContext.currentTime;
|
|
1552
|
-
return this.scheduleNoteOff(channelNumber, noteNumber, velocity, scheduleTime, false);
|
|
1553
|
-
}
|
|
1554
1601
|
releaseSustainPedal(channelNumber, halfVelocity, scheduleTime) {
|
|
1555
1602
|
const velocity = halfVelocity * 2;
|
|
1556
1603
|
const channel = this.channels[channelNumber];
|
|
1557
1604
|
const promises = [];
|
|
1558
1605
|
for (let i = 0; i < channel.sustainNotes.length; i++) {
|
|
1559
|
-
const promise = this.
|
|
1606
|
+
const promise = this.noteOff(channelNumber, channel.sustainNotes[i].noteNumber, velocity, scheduleTime);
|
|
1560
1607
|
promises.push(promise);
|
|
1561
1608
|
}
|
|
1562
1609
|
channel.sustainNotes = [];
|
|
@@ -1570,7 +1617,7 @@ class MidyGM2 {
|
|
|
1570
1617
|
channel.state.sostenutoPedal = 0;
|
|
1571
1618
|
for (let i = 0; i < sostenutoNotes.length; i++) {
|
|
1572
1619
|
const note = sostenutoNotes[i];
|
|
1573
|
-
const promise = this.
|
|
1620
|
+
const promise = this.noteOff(channelNumber, note.noteNumber, velocity, scheduleTime);
|
|
1574
1621
|
promises.push(promise);
|
|
1575
1622
|
}
|
|
1576
1623
|
channel.sostenutoNotes = [];
|
package/script/midy-GMLite.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export class MidyGMLite {
|
|
|
23
23
|
soundFontTable: never[][];
|
|
24
24
|
voiceCounter: Map<any, any>;
|
|
25
25
|
voiceCache: Map<any, any>;
|
|
26
|
+
realtimeVoiceCache: Map<any, any>;
|
|
26
27
|
isPlaying: boolean;
|
|
27
28
|
isPausing: boolean;
|
|
28
29
|
isPaused: boolean;
|
|
@@ -103,18 +104,17 @@ export class MidyGMLite {
|
|
|
103
104
|
clampCutoffFrequency(frequency: any): number;
|
|
104
105
|
setFilterEnvelope(note: any, scheduleTime: any): void;
|
|
105
106
|
startModulation(channel: any, note: any, scheduleTime: any): void;
|
|
106
|
-
getAudioBuffer(channel: any, noteNumber: any, velocity: any, voiceParams: any): Promise<any>;
|
|
107
|
-
|
|
107
|
+
getAudioBuffer(channel: any, noteNumber: any, velocity: any, voiceParams: any, realtime: any): Promise<any>;
|
|
108
|
+
setNoteAudioNode(channel: any, note: any, realtime: any): Promise<any>;
|
|
108
109
|
handleExclusiveClass(note: any, channelNumber: any, startTime: any): void;
|
|
109
110
|
handleDrumExclusiveClass(note: any, channelNumber: any, startTime: any): void;
|
|
110
|
-
|
|
111
|
-
noteOn(channelNumber: any, noteNumber: any, velocity: any,
|
|
111
|
+
setNoteRouting(channelNumber: any, note: any, startTime: any): void;
|
|
112
|
+
noteOn(channelNumber: any, noteNumber: any, velocity: any, startTime: any): Promise<void>;
|
|
112
113
|
disconnectNote(note: any): void;
|
|
113
114
|
releaseNote(channel: any, note: any, endTime: any): Promise<any>;
|
|
114
|
-
|
|
115
|
+
noteOff(channelNumber: any, noteNumber: any, velocity: any, endTime: any, force: any): void;
|
|
115
116
|
setNoteIndex(channel: any, index: any): void;
|
|
116
117
|
findNoteOffIndex(channel: any, noteNumber: any): any;
|
|
117
|
-
noteOff(channelNumber: any, noteNumber: any, velocity: any, scheduleTime: any): void;
|
|
118
118
|
releaseSustainPedal(channelNumber: any, halfVelocity: any, scheduleTime: any): void[];
|
|
119
119
|
createMessageHandlers(): any[];
|
|
120
120
|
handleMessage(data: any, scheduleTime: any): void;
|
|
@@ -174,22 +174,4 @@ export class MidyGMLite {
|
|
|
174
174
|
handleSysEx(data: any, scheduleTime: any): void;
|
|
175
175
|
scheduleTask(callback: any, scheduleTime: any): Promise<any>;
|
|
176
176
|
}
|
|
177
|
-
declare class Note {
|
|
178
|
-
constructor(noteNumber: any, velocity: any, startTime: any, voice: any, voiceParams: any);
|
|
179
|
-
index: number;
|
|
180
|
-
ending: boolean;
|
|
181
|
-
bufferSource: any;
|
|
182
|
-
filterNode: any;
|
|
183
|
-
filterDepth: any;
|
|
184
|
-
volumeEnvelopeNode: any;
|
|
185
|
-
volumeDepth: any;
|
|
186
|
-
modulationLFO: any;
|
|
187
|
-
modulationDepth: any;
|
|
188
|
-
noteNumber: any;
|
|
189
|
-
velocity: any;
|
|
190
|
-
startTime: any;
|
|
191
|
-
voice: any;
|
|
192
|
-
voiceParams: any;
|
|
193
|
-
}
|
|
194
|
-
export {};
|
|
195
177
|
//# sourceMappingURL=midy-GMLite.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"midy-GMLite.d.ts","sourceRoot":"","sources":["../src/midy-GMLite.js"],"names":[],"mappings":"
|
|
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,kDAUC;IAED,0EAUC;IAED,yEAqDC;IAED,mCAOC;IAED,uBASC;IAED,yDA2BC;IAED,2BAwCC;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,uEAuCC;IAED,0EAiBC;IAED,8EAiBC;IAED,oEAUC;IAED,0FAwBC;IAED,gCASC;IAED,iEAqBC;IAED,4FAsBC;IAED,6CAUC;IAED,qDAUC;IAED,sFAeC;IAED,+BAmBC;IAED,kDAOC;IAED,uGA2BC;IAED,mFAGC;IAED,wFAGC;IAED,sEAUC;IAED,mEAWC;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"}
|