@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/esm/midy-GM2.js
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { parseMidi } from "midi-file";
|
|
2
2
|
import { parse, SoundFont } from "@marmooo/soundfont-parser";
|
|
3
3
|
class Note {
|
|
4
|
-
constructor(noteNumber, velocity, startTime
|
|
4
|
+
constructor(noteNumber, velocity, startTime) {
|
|
5
|
+
Object.defineProperty(this, "voice", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true,
|
|
9
|
+
value: void 0
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(this, "voiceParams", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: void 0
|
|
16
|
+
});
|
|
5
17
|
Object.defineProperty(this, "index", {
|
|
6
18
|
enumerable: true,
|
|
7
19
|
configurable: true,
|
|
@@ -14,6 +26,12 @@ class Note {
|
|
|
14
26
|
writable: true,
|
|
15
27
|
value: false
|
|
16
28
|
});
|
|
29
|
+
Object.defineProperty(this, "pending", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true,
|
|
33
|
+
value: true
|
|
34
|
+
});
|
|
17
35
|
Object.defineProperty(this, "bufferSource", {
|
|
18
36
|
enumerable: true,
|
|
19
37
|
configurable: true,
|
|
@@ -89,8 +107,6 @@ class Note {
|
|
|
89
107
|
this.noteNumber = noteNumber;
|
|
90
108
|
this.velocity = velocity;
|
|
91
109
|
this.startTime = startTime;
|
|
92
|
-
this.voice = voice;
|
|
93
|
-
this.voiceParams = voiceParams;
|
|
94
110
|
}
|
|
95
111
|
}
|
|
96
112
|
const drumExclusiveClassesByKit = new Array(57);
|
|
@@ -338,6 +354,12 @@ export class MidyGM2 {
|
|
|
338
354
|
writable: true,
|
|
339
355
|
value: new Map()
|
|
340
356
|
});
|
|
357
|
+
Object.defineProperty(this, "realtimeVoiceCache", {
|
|
358
|
+
enumerable: true,
|
|
359
|
+
configurable: true,
|
|
360
|
+
writable: true,
|
|
361
|
+
value: new Map()
|
|
362
|
+
});
|
|
341
363
|
Object.defineProperty(this, "isPlaying", {
|
|
342
364
|
enumerable: true,
|
|
343
365
|
configurable: true,
|
|
@@ -600,10 +622,10 @@ export class MidyGM2 {
|
|
|
600
622
|
const startTime = event.startTime + schedulingOffset;
|
|
601
623
|
switch (event.type) {
|
|
602
624
|
case "noteOn":
|
|
603
|
-
await this.
|
|
625
|
+
await this.noteOn(event.channel, event.noteNumber, event.velocity, startTime);
|
|
604
626
|
break;
|
|
605
627
|
case "noteOff": {
|
|
606
|
-
const notePromise = this.
|
|
628
|
+
const notePromise = this.noteOff(event.channel, event.noteNumber, event.velocity, startTime, false);
|
|
607
629
|
if (notePromise)
|
|
608
630
|
this.notePromises.push(notePromise);
|
|
609
631
|
break;
|
|
@@ -639,6 +661,7 @@ export class MidyGM2 {
|
|
|
639
661
|
this.exclusiveClassNotes.fill(undefined);
|
|
640
662
|
this.drumExclusiveClassNotes.fill(undefined);
|
|
641
663
|
this.voiceCache.clear();
|
|
664
|
+
this.realtimeVoiceCache.clear();
|
|
642
665
|
for (let i = 0; i < this.channels.length; i++) {
|
|
643
666
|
this.channels[i].scheduledNotes = [];
|
|
644
667
|
this.resetChannelStates(i);
|
|
@@ -683,7 +706,6 @@ export class MidyGM2 {
|
|
|
683
706
|
finished = true;
|
|
684
707
|
break;
|
|
685
708
|
}
|
|
686
|
-
queueIndex = await this.scheduleTimelineEvents(now, queueIndex);
|
|
687
709
|
if (this.isPausing) {
|
|
688
710
|
await this.stopNotes(0, true, now);
|
|
689
711
|
await this.audioContext.suspend();
|
|
@@ -705,6 +727,7 @@ export class MidyGM2 {
|
|
|
705
727
|
this.isSeeking = false;
|
|
706
728
|
continue;
|
|
707
729
|
}
|
|
730
|
+
queueIndex = await this.scheduleTimelineEvents(now, queueIndex);
|
|
708
731
|
const waitTime = now + this.noteCheckInterval;
|
|
709
732
|
await this.scheduleTask(() => { }, waitTime);
|
|
710
733
|
}
|
|
@@ -813,7 +836,7 @@ export class MidyGM2 {
|
|
|
813
836
|
const channel = this.channels[channelNumber];
|
|
814
837
|
const promises = [];
|
|
815
838
|
this.processActiveNotes(channel, scheduleTime, (note) => {
|
|
816
|
-
const promise = this.
|
|
839
|
+
const promise = this.noteOff(channelNumber, note.noteNumber, velocity, scheduleTime, force);
|
|
817
840
|
this.notePromises.push(promise);
|
|
818
841
|
promises.push(promise);
|
|
819
842
|
});
|
|
@@ -823,7 +846,7 @@ export class MidyGM2 {
|
|
|
823
846
|
const channel = this.channels[channelNumber];
|
|
824
847
|
const promises = [];
|
|
825
848
|
this.processScheduledNotes(channel, (note) => {
|
|
826
|
-
const promise = this.
|
|
849
|
+
const promise = this.noteOff(channelNumber, note.noteNumber, velocity, scheduleTime, force);
|
|
827
850
|
this.notePromises.push(promise);
|
|
828
851
|
promises.push(promise);
|
|
829
852
|
});
|
|
@@ -856,7 +879,7 @@ export class MidyGM2 {
|
|
|
856
879
|
if (!this.isPlaying || this.isPaused)
|
|
857
880
|
return;
|
|
858
881
|
const now = this.audioContext.currentTime;
|
|
859
|
-
this.resumeTime
|
|
882
|
+
this.resumeTime = now - this.startTime - this.startDelay;
|
|
860
883
|
this.isPausing = true;
|
|
861
884
|
await this.playPromise;
|
|
862
885
|
this.isPausing = false;
|
|
@@ -882,11 +905,13 @@ export class MidyGM2 {
|
|
|
882
905
|
if (totalTime < event.startTime)
|
|
883
906
|
totalTime = event.startTime;
|
|
884
907
|
}
|
|
885
|
-
return totalTime;
|
|
908
|
+
return totalTime + this.startDelay;
|
|
886
909
|
}
|
|
887
910
|
currentTime() {
|
|
911
|
+
if (!this.isPlaying)
|
|
912
|
+
return this.resumeTime;
|
|
888
913
|
const now = this.audioContext.currentTime;
|
|
889
|
-
return
|
|
914
|
+
return now + this.resumeTime - this.startTime;
|
|
890
915
|
}
|
|
891
916
|
processScheduledNotes(channel, callback) {
|
|
892
917
|
const scheduledNotes = channel.scheduledNotes;
|
|
@@ -1313,31 +1338,42 @@ export class MidyGM2 {
|
|
|
1313
1338
|
note.vibratoLFO.connect(note.vibratoDepth);
|
|
1314
1339
|
note.vibratoDepth.connect(note.bufferSource.detune);
|
|
1315
1340
|
}
|
|
1316
|
-
async getAudioBuffer(channel, noteNumber, velocity, voiceParams) {
|
|
1341
|
+
async getAudioBuffer(channel, noteNumber, velocity, voiceParams, realtime) {
|
|
1317
1342
|
const audioBufferId = this.getVoiceId(channel, noteNumber, velocity);
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
this.voiceCache.delete(audioBufferId);
|
|
1323
|
-
}
|
|
1324
|
-
return cache.audioBuffer;
|
|
1325
|
-
}
|
|
1326
|
-
else {
|
|
1327
|
-
const maxCount = this.voiceCounter.get(audioBufferId) ?? 0;
|
|
1343
|
+
if (realtime) {
|
|
1344
|
+
const cachedAudioBuffer = this.realtimeVoiceCache.get(audioBufferId);
|
|
1345
|
+
if (cachedAudioBuffer)
|
|
1346
|
+
return cachedAudioBuffer;
|
|
1328
1347
|
const audioBuffer = await this.createAudioBuffer(voiceParams);
|
|
1329
|
-
|
|
1330
|
-
this.voiceCache.set(audioBufferId, cache);
|
|
1348
|
+
this.realtimeVoiceCache.set(audioBufferId, audioBuffer);
|
|
1331
1349
|
return audioBuffer;
|
|
1332
1350
|
}
|
|
1351
|
+
else {
|
|
1352
|
+
const cache = this.voiceCache.get(audioBufferId);
|
|
1353
|
+
if (cache) {
|
|
1354
|
+
cache.counter += 1;
|
|
1355
|
+
if (cache.maxCount <= cache.counter) {
|
|
1356
|
+
this.voiceCache.delete(audioBufferId);
|
|
1357
|
+
}
|
|
1358
|
+
return cache.audioBuffer;
|
|
1359
|
+
}
|
|
1360
|
+
else {
|
|
1361
|
+
const maxCount = this.voiceCounter.get(audioBufferId) ?? 0;
|
|
1362
|
+
const audioBuffer = await this.createAudioBuffer(voiceParams);
|
|
1363
|
+
const cache = { audioBuffer, maxCount, counter: 1 };
|
|
1364
|
+
this.voiceCache.set(audioBufferId, cache);
|
|
1365
|
+
return audioBuffer;
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1333
1368
|
}
|
|
1334
|
-
async
|
|
1369
|
+
async setNoteAudioNode(channel, note, realtime) {
|
|
1335
1370
|
const now = this.audioContext.currentTime;
|
|
1371
|
+
const { noteNumber, velocity, startTime } = note;
|
|
1336
1372
|
const state = channel.state;
|
|
1337
1373
|
const controllerState = this.getControllerState(channel, noteNumber, velocity);
|
|
1338
|
-
const voiceParams = voice.getAllParams(controllerState);
|
|
1339
|
-
|
|
1340
|
-
const audioBuffer = await this.getAudioBuffer(channel, noteNumber, velocity, voiceParams);
|
|
1374
|
+
const voiceParams = note.voice.getAllParams(controllerState);
|
|
1375
|
+
note.voiceParams = voiceParams;
|
|
1376
|
+
const audioBuffer = await this.getAudioBuffer(channel, noteNumber, velocity, voiceParams, realtime);
|
|
1341
1377
|
note.bufferSource = this.createBufferSource(channel, noteNumber, voiceParams, audioBuffer);
|
|
1342
1378
|
note.volumeEnvelopeNode = new GainNode(this.audioContext);
|
|
1343
1379
|
note.filterNode = new BiquadFilterNode(this.audioContext, {
|
|
@@ -1384,7 +1420,7 @@ export class MidyGM2 {
|
|
|
1384
1420
|
if (prev) {
|
|
1385
1421
|
const [prevNote, prevChannelNumber] = prev;
|
|
1386
1422
|
if (prevNote && !prevNote.ending) {
|
|
1387
|
-
this.
|
|
1423
|
+
this.noteOff(prevChannelNumber, prevNote.noteNumber, 0, // velocity,
|
|
1388
1424
|
startTime, true);
|
|
1389
1425
|
}
|
|
1390
1426
|
}
|
|
@@ -1404,27 +1440,14 @@ export class MidyGM2 {
|
|
|
1404
1440
|
channelNumber;
|
|
1405
1441
|
const prevNote = this.drumExclusiveClassNotes[index];
|
|
1406
1442
|
if (prevNote && !prevNote.ending) {
|
|
1407
|
-
this.
|
|
1443
|
+
this.noteOff(channelNumber, prevNote.noteNumber, 0, // velocity,
|
|
1408
1444
|
startTime, true);
|
|
1409
1445
|
}
|
|
1410
1446
|
this.drumExclusiveClassNotes[index] = note;
|
|
1411
1447
|
}
|
|
1412
|
-
|
|
1448
|
+
setNoteRouting(channelNumber, note, startTime) {
|
|
1413
1449
|
const channel = this.channels[channelNumber];
|
|
1414
|
-
const
|
|
1415
|
-
const bankTable = this.soundFontTable[programNumber];
|
|
1416
|
-
if (!bankTable)
|
|
1417
|
-
return;
|
|
1418
|
-
const bankLSB = channel.isDrum ? 128 : channel.bankLSB;
|
|
1419
|
-
const bank = bankTable[bankLSB] !== undefined ? bankLSB : 0;
|
|
1420
|
-
const soundFontIndex = bankTable[bank];
|
|
1421
|
-
if (soundFontIndex === undefined)
|
|
1422
|
-
return;
|
|
1423
|
-
const soundFont = this.soundFonts[soundFontIndex];
|
|
1424
|
-
const voice = soundFont.getVoice(bank, programNumber, noteNumber, velocity);
|
|
1425
|
-
if (!voice)
|
|
1426
|
-
return;
|
|
1427
|
-
const note = await this.createNote(channel, voice, noteNumber, velocity, startTime);
|
|
1450
|
+
const { noteNumber, volumeEnvelopeNode } = note;
|
|
1428
1451
|
if (channel.isDrum) {
|
|
1429
1452
|
const { keyBasedGainLs, keyBasedGainRs } = channel;
|
|
1430
1453
|
let gainL = keyBasedGainLs[noteNumber];
|
|
@@ -1434,25 +1457,48 @@ export class MidyGM2 {
|
|
|
1434
1457
|
gainL = keyBasedGainLs[noteNumber] = audioNodes.gainL;
|
|
1435
1458
|
gainR = keyBasedGainRs[noteNumber] = audioNodes.gainR;
|
|
1436
1459
|
}
|
|
1437
|
-
|
|
1438
|
-
|
|
1460
|
+
volumeEnvelopeNode.connect(gainL);
|
|
1461
|
+
volumeEnvelopeNode.connect(gainR);
|
|
1439
1462
|
}
|
|
1440
1463
|
else {
|
|
1441
|
-
|
|
1442
|
-
|
|
1464
|
+
volumeEnvelopeNode.connect(channel.gainL);
|
|
1465
|
+
volumeEnvelopeNode.connect(channel.gainR);
|
|
1443
1466
|
}
|
|
1444
1467
|
if (0.5 <= channel.state.sustainPedal) {
|
|
1445
1468
|
channel.sustainNotes.push(note);
|
|
1446
1469
|
}
|
|
1447
1470
|
this.handleExclusiveClass(note, channelNumber, startTime);
|
|
1448
1471
|
this.handleDrumExclusiveClass(note, channelNumber, startTime);
|
|
1472
|
+
}
|
|
1473
|
+
async noteOn(channelNumber, noteNumber, velocity, startTime) {
|
|
1474
|
+
const channel = this.channels[channelNumber];
|
|
1475
|
+
const realtime = startTime === undefined;
|
|
1476
|
+
if (realtime)
|
|
1477
|
+
startTime = this.audioContext.currentTime;
|
|
1478
|
+
const note = new Note(noteNumber, velocity, startTime);
|
|
1449
1479
|
const scheduledNotes = channel.scheduledNotes;
|
|
1450
1480
|
note.index = scheduledNotes.length;
|
|
1451
1481
|
scheduledNotes.push(note);
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1482
|
+
const programNumber = channel.programNumber;
|
|
1483
|
+
const bankTable = this.soundFontTable[programNumber];
|
|
1484
|
+
if (!bankTable)
|
|
1485
|
+
return;
|
|
1486
|
+
const bankLSB = channel.isDrum ? 128 : channel.bankLSB;
|
|
1487
|
+
const bank = bankTable[bankLSB] !== undefined ? bankLSB : 0;
|
|
1488
|
+
const soundFontIndex = bankTable[bank];
|
|
1489
|
+
if (soundFontIndex === undefined)
|
|
1490
|
+
return;
|
|
1491
|
+
const soundFont = this.soundFonts[soundFontIndex];
|
|
1492
|
+
note.voice = soundFont.getVoice(bank, programNumber, noteNumber, velocity);
|
|
1493
|
+
if (!note.voice)
|
|
1494
|
+
return;
|
|
1495
|
+
await this.setNoteAudioNode(channel, note, realtime);
|
|
1496
|
+
this.setNoteRouting(channelNumber, note, startTime);
|
|
1497
|
+
note.pending = false;
|
|
1498
|
+
const off = note.offEvent;
|
|
1499
|
+
if (off) {
|
|
1500
|
+
this.noteOff(channelNumber, noteNumber, off.velocity, off.startTime);
|
|
1501
|
+
}
|
|
1456
1502
|
}
|
|
1457
1503
|
disconnectNote(note) {
|
|
1458
1504
|
note.bufferSource.disconnect();
|
|
@@ -1475,6 +1521,7 @@ export class MidyGM2 {
|
|
|
1475
1521
|
}
|
|
1476
1522
|
}
|
|
1477
1523
|
releaseNote(channel, note, endTime) {
|
|
1524
|
+
endTime ??= this.audioContext.currentTime;
|
|
1478
1525
|
const volRelease = endTime + note.voiceParams.volRelease;
|
|
1479
1526
|
const modRelease = endTime + note.voiceParams.modRelease;
|
|
1480
1527
|
const stopTime = Math.min(volRelease, modRelease);
|
|
@@ -1495,7 +1542,7 @@ export class MidyGM2 {
|
|
|
1495
1542
|
}, stopTime);
|
|
1496
1543
|
});
|
|
1497
1544
|
}
|
|
1498
|
-
|
|
1545
|
+
noteOff(channelNumber, noteNumber, velocity, endTime, force) {
|
|
1499
1546
|
const channel = this.channels[channelNumber];
|
|
1500
1547
|
const state = channel.state;
|
|
1501
1548
|
if (!force) {
|
|
@@ -1514,6 +1561,10 @@ export class MidyGM2 {
|
|
|
1514
1561
|
if (index < 0)
|
|
1515
1562
|
return;
|
|
1516
1563
|
const note = channel.scheduledNotes[index];
|
|
1564
|
+
if (note.pending) {
|
|
1565
|
+
note.offEvent = { velocity, startTime: endTime };
|
|
1566
|
+
return;
|
|
1567
|
+
}
|
|
1517
1568
|
note.ending = true;
|
|
1518
1569
|
this.setNoteIndex(channel, index);
|
|
1519
1570
|
this.releaseNote(channel, note, endTime);
|
|
@@ -1544,16 +1595,12 @@ export class MidyGM2 {
|
|
|
1544
1595
|
}
|
|
1545
1596
|
return -1;
|
|
1546
1597
|
}
|
|
1547
|
-
noteOff(channelNumber, noteNumber, velocity, scheduleTime) {
|
|
1548
|
-
scheduleTime ??= this.audioContext.currentTime;
|
|
1549
|
-
return this.scheduleNoteOff(channelNumber, noteNumber, velocity, scheduleTime, false);
|
|
1550
|
-
}
|
|
1551
1598
|
releaseSustainPedal(channelNumber, halfVelocity, scheduleTime) {
|
|
1552
1599
|
const velocity = halfVelocity * 2;
|
|
1553
1600
|
const channel = this.channels[channelNumber];
|
|
1554
1601
|
const promises = [];
|
|
1555
1602
|
for (let i = 0; i < channel.sustainNotes.length; i++) {
|
|
1556
|
-
const promise = this.
|
|
1603
|
+
const promise = this.noteOff(channelNumber, channel.sustainNotes[i].noteNumber, velocity, scheduleTime);
|
|
1557
1604
|
promises.push(promise);
|
|
1558
1605
|
}
|
|
1559
1606
|
channel.sustainNotes = [];
|
|
@@ -1567,7 +1614,7 @@ export class MidyGM2 {
|
|
|
1567
1614
|
channel.state.sostenutoPedal = 0;
|
|
1568
1615
|
for (let i = 0; i < sostenutoNotes.length; i++) {
|
|
1569
1616
|
const note = sostenutoNotes[i];
|
|
1570
|
-
const promise = this.
|
|
1617
|
+
const promise = this.noteOff(channelNumber, note.noteNumber, velocity, scheduleTime);
|
|
1571
1618
|
promises.push(promise);
|
|
1572
1619
|
}
|
|
1573
1620
|
channel.sostenutoNotes = [];
|
package/esm/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
|
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":"
|
|
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"}
|