@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.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,
|
|
@@ -95,8 +113,6 @@ class Note {
|
|
|
95
113
|
this.noteNumber = noteNumber;
|
|
96
114
|
this.velocity = velocity;
|
|
97
115
|
this.startTime = startTime;
|
|
98
|
-
this.voice = voice;
|
|
99
|
-
this.voiceParams = voiceParams;
|
|
100
116
|
}
|
|
101
117
|
}
|
|
102
118
|
const drumExclusiveClassesByKit = new Array(57);
|
|
@@ -353,6 +369,12 @@ export class Midy {
|
|
|
353
369
|
writable: true,
|
|
354
370
|
value: new Map()
|
|
355
371
|
});
|
|
372
|
+
Object.defineProperty(this, "realtimeVoiceCache", {
|
|
373
|
+
enumerable: true,
|
|
374
|
+
configurable: true,
|
|
375
|
+
writable: true,
|
|
376
|
+
value: new Map()
|
|
377
|
+
});
|
|
356
378
|
Object.defineProperty(this, "isPlaying", {
|
|
357
379
|
enumerable: true,
|
|
358
380
|
configurable: true,
|
|
@@ -617,10 +639,10 @@ export class Midy {
|
|
|
617
639
|
const startTime = event.startTime + schedulingOffset;
|
|
618
640
|
switch (event.type) {
|
|
619
641
|
case "noteOn":
|
|
620
|
-
await this.
|
|
642
|
+
await this.noteOn(event.channel, event.noteNumber, event.velocity, startTime);
|
|
621
643
|
break;
|
|
622
644
|
case "noteOff": {
|
|
623
|
-
const notePromise = this.
|
|
645
|
+
const notePromise = this.noteOff(event.channel, event.noteNumber, event.velocity, startTime, false);
|
|
624
646
|
if (notePromise)
|
|
625
647
|
this.notePromises.push(notePromise);
|
|
626
648
|
break;
|
|
@@ -659,6 +681,7 @@ export class Midy {
|
|
|
659
681
|
this.exclusiveClassNotes.fill(undefined);
|
|
660
682
|
this.drumExclusiveClassNotes.fill(undefined);
|
|
661
683
|
this.voiceCache.clear();
|
|
684
|
+
this.realtimeVoiceCache.clear();
|
|
662
685
|
for (let i = 0; i < this.channels.length; i++) {
|
|
663
686
|
this.channels[i].scheduledNotes = [];
|
|
664
687
|
this.resetChannelStates(i);
|
|
@@ -703,7 +726,6 @@ export class Midy {
|
|
|
703
726
|
finished = true;
|
|
704
727
|
break;
|
|
705
728
|
}
|
|
706
|
-
queueIndex = await this.scheduleTimelineEvents(now, queueIndex);
|
|
707
729
|
if (this.isPausing) {
|
|
708
730
|
await this.stopNotes(0, true, now);
|
|
709
731
|
await this.audioContext.suspend();
|
|
@@ -725,6 +747,7 @@ export class Midy {
|
|
|
725
747
|
this.isSeeking = false;
|
|
726
748
|
continue;
|
|
727
749
|
}
|
|
750
|
+
queueIndex = await this.scheduleTimelineEvents(now, queueIndex);
|
|
728
751
|
const waitTime = now + this.noteCheckInterval;
|
|
729
752
|
await this.scheduleTask(() => { }, waitTime);
|
|
730
753
|
}
|
|
@@ -833,7 +856,7 @@ export class Midy {
|
|
|
833
856
|
const channel = this.channels[channelNumber];
|
|
834
857
|
const promises = [];
|
|
835
858
|
this.processActiveNotes(channel, scheduleTime, (note) => {
|
|
836
|
-
const promise = this.
|
|
859
|
+
const promise = this.noteOff(channelNumber, note.noteNumber, velocity, scheduleTime, force);
|
|
837
860
|
this.notePromises.push(promise);
|
|
838
861
|
promises.push(promise);
|
|
839
862
|
});
|
|
@@ -843,7 +866,7 @@ export class Midy {
|
|
|
843
866
|
const channel = this.channels[channelNumber];
|
|
844
867
|
const promises = [];
|
|
845
868
|
this.processScheduledNotes(channel, (note) => {
|
|
846
|
-
const promise = this.
|
|
869
|
+
const promise = this.noteOff(channelNumber, note.noteNumber, velocity, scheduleTime, force);
|
|
847
870
|
this.notePromises.push(promise);
|
|
848
871
|
promises.push(promise);
|
|
849
872
|
});
|
|
@@ -876,7 +899,7 @@ export class Midy {
|
|
|
876
899
|
if (!this.isPlaying || this.isPaused)
|
|
877
900
|
return;
|
|
878
901
|
const now = this.audioContext.currentTime;
|
|
879
|
-
this.resumeTime
|
|
902
|
+
this.resumeTime = now - this.startTime - this.startDelay;
|
|
880
903
|
this.isPausing = true;
|
|
881
904
|
await this.playPromise;
|
|
882
905
|
this.isPausing = false;
|
|
@@ -902,11 +925,13 @@ export class Midy {
|
|
|
902
925
|
if (totalTime < event.startTime)
|
|
903
926
|
totalTime = event.startTime;
|
|
904
927
|
}
|
|
905
|
-
return totalTime;
|
|
928
|
+
return totalTime + this.startDelay;
|
|
906
929
|
}
|
|
907
930
|
currentTime() {
|
|
931
|
+
if (!this.isPlaying)
|
|
932
|
+
return this.resumeTime;
|
|
908
933
|
const now = this.audioContext.currentTime;
|
|
909
|
-
return
|
|
934
|
+
return now + this.resumeTime - this.startTime;
|
|
910
935
|
}
|
|
911
936
|
processScheduledNotes(channel, callback) {
|
|
912
937
|
const scheduledNotes = channel.scheduledNotes;
|
|
@@ -1338,31 +1363,42 @@ export class Midy {
|
|
|
1338
1363
|
note.vibratoLFO.connect(note.vibratoDepth);
|
|
1339
1364
|
note.vibratoDepth.connect(note.bufferSource.detune);
|
|
1340
1365
|
}
|
|
1341
|
-
async getAudioBuffer(channel, noteNumber, velocity, voiceParams) {
|
|
1366
|
+
async getAudioBuffer(channel, noteNumber, velocity, voiceParams, realtime) {
|
|
1342
1367
|
const audioBufferId = this.getVoiceId(channel, noteNumber, velocity);
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
this.voiceCache.delete(audioBufferId);
|
|
1348
|
-
}
|
|
1349
|
-
return cache.audioBuffer;
|
|
1350
|
-
}
|
|
1351
|
-
else {
|
|
1352
|
-
const maxCount = this.voiceCounter.get(audioBufferId) ?? 0;
|
|
1368
|
+
if (realtime) {
|
|
1369
|
+
const cachedAudioBuffer = this.realtimeVoiceCache.get(audioBufferId);
|
|
1370
|
+
if (cachedAudioBuffer)
|
|
1371
|
+
return cachedAudioBuffer;
|
|
1353
1372
|
const audioBuffer = await this.createAudioBuffer(voiceParams);
|
|
1354
|
-
|
|
1355
|
-
this.voiceCache.set(audioBufferId, cache);
|
|
1373
|
+
this.realtimeVoiceCache.set(audioBufferId, audioBuffer);
|
|
1356
1374
|
return audioBuffer;
|
|
1357
1375
|
}
|
|
1376
|
+
else {
|
|
1377
|
+
const cache = this.voiceCache.get(audioBufferId);
|
|
1378
|
+
if (cache) {
|
|
1379
|
+
cache.counter += 1;
|
|
1380
|
+
if (cache.maxCount <= cache.counter) {
|
|
1381
|
+
this.voiceCache.delete(audioBufferId);
|
|
1382
|
+
}
|
|
1383
|
+
return cache.audioBuffer;
|
|
1384
|
+
}
|
|
1385
|
+
else {
|
|
1386
|
+
const maxCount = this.voiceCounter.get(audioBufferId) ?? 0;
|
|
1387
|
+
const audioBuffer = await this.createAudioBuffer(voiceParams);
|
|
1388
|
+
const cache = { audioBuffer, maxCount, counter: 1 };
|
|
1389
|
+
this.voiceCache.set(audioBufferId, cache);
|
|
1390
|
+
return audioBuffer;
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1358
1393
|
}
|
|
1359
|
-
async
|
|
1394
|
+
async setNoteAudioNode(channel, note, realtime) {
|
|
1360
1395
|
const now = this.audioContext.currentTime;
|
|
1396
|
+
const { noteNumber, velocity, startTime } = note;
|
|
1361
1397
|
const state = channel.state;
|
|
1362
1398
|
const controllerState = this.getControllerState(channel, noteNumber, velocity, 0);
|
|
1363
|
-
const voiceParams = voice.getAllParams(controllerState);
|
|
1364
|
-
|
|
1365
|
-
const audioBuffer = await this.getAudioBuffer(channel, noteNumber, velocity, voiceParams);
|
|
1399
|
+
const voiceParams = note.voice.getAllParams(controllerState);
|
|
1400
|
+
note.voiceParams = voiceParams;
|
|
1401
|
+
const audioBuffer = await this.getAudioBuffer(channel, noteNumber, velocity, voiceParams, realtime);
|
|
1366
1402
|
note.bufferSource = this.createBufferSource(channel, noteNumber, voiceParams, audioBuffer);
|
|
1367
1403
|
note.volumeEnvelopeNode = new GainNode(this.audioContext);
|
|
1368
1404
|
const filterResonance = this.getRelativeKeyBasedValue(channel, note, 71);
|
|
@@ -1410,7 +1446,7 @@ export class Midy {
|
|
|
1410
1446
|
if (prev) {
|
|
1411
1447
|
const [prevNote, prevChannelNumber] = prev;
|
|
1412
1448
|
if (prevNote && !prevNote.ending) {
|
|
1413
|
-
this.
|
|
1449
|
+
this.noteOff(prevChannelNumber, prevNote.noteNumber, 0, // velocity,
|
|
1414
1450
|
startTime, true);
|
|
1415
1451
|
}
|
|
1416
1452
|
}
|
|
@@ -1430,27 +1466,14 @@ export class Midy {
|
|
|
1430
1466
|
channelNumber;
|
|
1431
1467
|
const prevNote = this.drumExclusiveClassNotes[index];
|
|
1432
1468
|
if (prevNote && !prevNote.ending) {
|
|
1433
|
-
this.
|
|
1469
|
+
this.noteOff(channelNumber, prevNote.noteNumber, 0, // velocity,
|
|
1434
1470
|
startTime, true);
|
|
1435
1471
|
}
|
|
1436
1472
|
this.drumExclusiveClassNotes[index] = note;
|
|
1437
1473
|
}
|
|
1438
|
-
|
|
1474
|
+
setNoteRouting(channelNumber, note, startTime) {
|
|
1439
1475
|
const channel = this.channels[channelNumber];
|
|
1440
|
-
const
|
|
1441
|
-
const bankTable = this.soundFontTable[programNumber];
|
|
1442
|
-
if (!bankTable)
|
|
1443
|
-
return;
|
|
1444
|
-
const bankLSB = channel.isDrum ? 128 : channel.bankLSB;
|
|
1445
|
-
const bank = bankTable[bankLSB] !== undefined ? bankLSB : 0;
|
|
1446
|
-
const soundFontIndex = bankTable[bank];
|
|
1447
|
-
if (soundFontIndex === undefined)
|
|
1448
|
-
return;
|
|
1449
|
-
const soundFont = this.soundFonts[soundFontIndex];
|
|
1450
|
-
const voice = soundFont.getVoice(bank, programNumber, noteNumber, velocity);
|
|
1451
|
-
if (!voice)
|
|
1452
|
-
return;
|
|
1453
|
-
const note = await this.createNote(channel, voice, noteNumber, velocity, startTime);
|
|
1476
|
+
const { noteNumber, volumeEnvelopeNode } = note;
|
|
1454
1477
|
if (channel.isDrum) {
|
|
1455
1478
|
const { keyBasedGainLs, keyBasedGainRs } = channel;
|
|
1456
1479
|
let gainL = keyBasedGainLs[noteNumber];
|
|
@@ -1460,25 +1483,48 @@ export class Midy {
|
|
|
1460
1483
|
gainL = keyBasedGainLs[noteNumber] = audioNodes.gainL;
|
|
1461
1484
|
gainR = keyBasedGainRs[noteNumber] = audioNodes.gainR;
|
|
1462
1485
|
}
|
|
1463
|
-
|
|
1464
|
-
|
|
1486
|
+
volumeEnvelopeNode.connect(gainL);
|
|
1487
|
+
volumeEnvelopeNode.connect(gainR);
|
|
1465
1488
|
}
|
|
1466
1489
|
else {
|
|
1467
|
-
|
|
1468
|
-
|
|
1490
|
+
volumeEnvelopeNode.connect(channel.gainL);
|
|
1491
|
+
volumeEnvelopeNode.connect(channel.gainR);
|
|
1469
1492
|
}
|
|
1470
1493
|
if (0.5 <= channel.state.sustainPedal) {
|
|
1471
1494
|
channel.sustainNotes.push(note);
|
|
1472
1495
|
}
|
|
1473
1496
|
this.handleExclusiveClass(note, channelNumber, startTime);
|
|
1474
1497
|
this.handleDrumExclusiveClass(note, channelNumber, startTime);
|
|
1498
|
+
}
|
|
1499
|
+
async noteOn(channelNumber, noteNumber, velocity, startTime) {
|
|
1500
|
+
const channel = this.channels[channelNumber];
|
|
1501
|
+
const realtime = startTime === undefined;
|
|
1502
|
+
if (realtime)
|
|
1503
|
+
startTime = this.audioContext.currentTime;
|
|
1504
|
+
const note = new Note(noteNumber, velocity, startTime);
|
|
1475
1505
|
const scheduledNotes = channel.scheduledNotes;
|
|
1476
1506
|
note.index = scheduledNotes.length;
|
|
1477
1507
|
scheduledNotes.push(note);
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1508
|
+
const programNumber = channel.programNumber;
|
|
1509
|
+
const bankTable = this.soundFontTable[programNumber];
|
|
1510
|
+
if (!bankTable)
|
|
1511
|
+
return;
|
|
1512
|
+
const bankLSB = channel.isDrum ? 128 : channel.bankLSB;
|
|
1513
|
+
const bank = bankTable[bankLSB] !== undefined ? bankLSB : 0;
|
|
1514
|
+
const soundFontIndex = bankTable[bank];
|
|
1515
|
+
if (soundFontIndex === undefined)
|
|
1516
|
+
return;
|
|
1517
|
+
const soundFont = this.soundFonts[soundFontIndex];
|
|
1518
|
+
note.voice = soundFont.getVoice(bank, programNumber, noteNumber, velocity);
|
|
1519
|
+
if (!note.voice)
|
|
1520
|
+
return;
|
|
1521
|
+
await this.setNoteAudioNode(channel, note, realtime);
|
|
1522
|
+
this.setNoteRouting(channelNumber, note, startTime);
|
|
1523
|
+
note.pending = false;
|
|
1524
|
+
const off = note.offEvent;
|
|
1525
|
+
if (off) {
|
|
1526
|
+
this.noteOff(channelNumber, noteNumber, off.velocity, off.startTime);
|
|
1527
|
+
}
|
|
1482
1528
|
}
|
|
1483
1529
|
disconnectNote(note) {
|
|
1484
1530
|
note.bufferSource.disconnect();
|
|
@@ -1501,6 +1547,7 @@ export class Midy {
|
|
|
1501
1547
|
}
|
|
1502
1548
|
}
|
|
1503
1549
|
releaseNote(channel, note, endTime) {
|
|
1550
|
+
endTime ??= this.audioContext.currentTime;
|
|
1504
1551
|
const releaseTime = this.getRelativeKeyBasedValue(channel, note, 72) * 2;
|
|
1505
1552
|
const volRelease = endTime + note.voiceParams.volRelease * releaseTime;
|
|
1506
1553
|
const modRelease = endTime + note.voiceParams.modRelease;
|
|
@@ -1522,7 +1569,7 @@ export class Midy {
|
|
|
1522
1569
|
}, stopTime);
|
|
1523
1570
|
});
|
|
1524
1571
|
}
|
|
1525
|
-
|
|
1572
|
+
noteOff(channelNumber, noteNumber, velocity, endTime, force) {
|
|
1526
1573
|
const channel = this.channels[channelNumber];
|
|
1527
1574
|
const state = channel.state;
|
|
1528
1575
|
if (!force) {
|
|
@@ -1541,6 +1588,10 @@ export class Midy {
|
|
|
1541
1588
|
if (index < 0)
|
|
1542
1589
|
return;
|
|
1543
1590
|
const note = channel.scheduledNotes[index];
|
|
1591
|
+
if (note.pending) {
|
|
1592
|
+
note.offEvent = { velocity, startTime: endTime };
|
|
1593
|
+
return;
|
|
1594
|
+
}
|
|
1544
1595
|
note.ending = true;
|
|
1545
1596
|
this.setNoteIndex(channel, index);
|
|
1546
1597
|
this.releaseNote(channel, note, endTime);
|
|
@@ -1571,16 +1622,12 @@ export class Midy {
|
|
|
1571
1622
|
}
|
|
1572
1623
|
return -1;
|
|
1573
1624
|
}
|
|
1574
|
-
noteOff(channelNumber, noteNumber, velocity, scheduleTime) {
|
|
1575
|
-
scheduleTime ??= this.audioContext.currentTime;
|
|
1576
|
-
return this.scheduleNoteOff(channelNumber, noteNumber, velocity, scheduleTime, false);
|
|
1577
|
-
}
|
|
1578
1625
|
releaseSustainPedal(channelNumber, halfVelocity, scheduleTime) {
|
|
1579
1626
|
const velocity = halfVelocity * 2;
|
|
1580
1627
|
const channel = this.channels[channelNumber];
|
|
1581
1628
|
const promises = [];
|
|
1582
1629
|
for (let i = 0; i < channel.sustainNotes.length; i++) {
|
|
1583
|
-
const promise = this.
|
|
1630
|
+
const promise = this.noteOff(channelNumber, channel.sustainNotes[i].noteNumber, velocity, scheduleTime);
|
|
1584
1631
|
promises.push(promise);
|
|
1585
1632
|
}
|
|
1586
1633
|
channel.sustainNotes = [];
|
|
@@ -1594,7 +1641,7 @@ export class Midy {
|
|
|
1594
1641
|
channel.state.sostenutoPedal = 0;
|
|
1595
1642
|
for (let i = 0; i < sostenutoNotes.length; i++) {
|
|
1596
1643
|
const note = sostenutoNotes[i];
|
|
1597
|
-
const promise = this.
|
|
1644
|
+
const promise = this.noteOff(channelNumber, note.noteNumber, velocity, scheduleTime);
|
|
1598
1645
|
promises.push(promise);
|
|
1599
1646
|
}
|
|
1600
1647
|
channel.sostenutoNotes = [];
|
package/package.json
CHANGED
package/script/midy-GM1.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export class MidyGM1 {
|
|
|
25
25
|
soundFontTable: never[][];
|
|
26
26
|
voiceCounter: Map<any, any>;
|
|
27
27
|
voiceCache: Map<any, any>;
|
|
28
|
+
realtimeVoiceCache: Map<any, any>;
|
|
28
29
|
isPlaying: boolean;
|
|
29
30
|
isPausing: boolean;
|
|
30
31
|
isPaused: boolean;
|
|
@@ -104,17 +105,16 @@ export class MidyGM1 {
|
|
|
104
105
|
clampCutoffFrequency(frequency: any): number;
|
|
105
106
|
setFilterEnvelope(note: any, scheduleTime: any): void;
|
|
106
107
|
startModulation(channel: any, note: any, scheduleTime: any): void;
|
|
107
|
-
getAudioBuffer(channel: any, noteNumber: any, velocity: any, voiceParams: any): Promise<any>;
|
|
108
|
-
|
|
108
|
+
getAudioBuffer(channel: any, noteNumber: any, velocity: any, voiceParams: any, realtime: any): Promise<any>;
|
|
109
|
+
setNoteAudioNode(channel: any, note: any, realtime: any): Promise<any>;
|
|
109
110
|
handleExclusiveClass(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;
|
|
@@ -179,22 +179,4 @@ export class MidyGM1 {
|
|
|
179
179
|
handleSysEx(data: any, scheduleTime: any): void;
|
|
180
180
|
scheduleTask(callback: any, scheduleTime: any): Promise<any>;
|
|
181
181
|
}
|
|
182
|
-
declare class Note {
|
|
183
|
-
constructor(noteNumber: any, velocity: any, startTime: any, voice: any, voiceParams: any);
|
|
184
|
-
index: number;
|
|
185
|
-
ending: boolean;
|
|
186
|
-
bufferSource: any;
|
|
187
|
-
filterNode: any;
|
|
188
|
-
filterDepth: any;
|
|
189
|
-
volumeEnvelopeNode: any;
|
|
190
|
-
volumeDepth: any;
|
|
191
|
-
modulationLFO: any;
|
|
192
|
-
modulationDepth: any;
|
|
193
|
-
noteNumber: any;
|
|
194
|
-
velocity: any;
|
|
195
|
-
startTime: any;
|
|
196
|
-
voice: any;
|
|
197
|
-
voiceParams: any;
|
|
198
|
-
}
|
|
199
|
-
export {};
|
|
200
182
|
//# sourceMappingURL=midy-GM1.d.ts.map
|
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":"
|
|
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,kDAUC;IAED,4DASC;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,qCAMC;IAED,2DAIC;IAED,+DAIC;IAED,sDAeC;IAED,qDAoBC;IAED,6CAIC;IAED,sDAsBC;IAED,kEAoBC;IAED,4GAkCC;IAED,uEAmCC;IAED,0EAiBC;IAED,oEASC;IAED,0FAwBC;IAED,gCASC;IAED,iEAqBC;IAED,4FAmBC;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,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"}
|