@marmooo/midy 0.2.2 → 0.2.4
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/README.md +3 -5
- package/esm/midy-GM1.d.ts +5 -4
- package/esm/midy-GM1.d.ts.map +1 -1
- package/esm/midy-GM1.js +31 -25
- package/esm/midy-GM2.d.ts +19 -22
- package/esm/midy-GM2.d.ts.map +1 -1
- package/esm/midy-GM2.js +148 -119
- package/esm/midy-GMLite.d.ts +6 -5
- package/esm/midy-GMLite.d.ts.map +1 -1
- package/esm/midy-GMLite.js +28 -21
- package/esm/midy.d.ts +21 -22
- package/esm/midy.d.ts.map +1 -1
- package/esm/midy.js +229 -139
- package/package.json +1 -1
- package/script/midy-GM1.d.ts +5 -4
- package/script/midy-GM1.d.ts.map +1 -1
- package/script/midy-GM1.js +31 -25
- package/script/midy-GM2.d.ts +19 -22
- package/script/midy-GM2.d.ts.map +1 -1
- package/script/midy-GM2.js +148 -119
- package/script/midy-GMLite.d.ts +6 -5
- package/script/midy-GMLite.d.ts.map +1 -1
- package/script/midy-GMLite.js +28 -21
- package/script/midy.d.ts +21 -22
- package/script/midy.d.ts.map +1 -1
- package/script/midy.js +229 -139
package/README.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# Midy
|
|
2
2
|
|
|
3
|
-
A MIDI player/synthesizer written in JavaScript that supports GM-Lite/GM1
|
|
4
|
-
SF2/SF3.
|
|
3
|
+
A MIDI player/synthesizer written in JavaScript that supports GM-Lite/GM1/GM2
|
|
4
|
+
and SF2/SF3.
|
|
5
5
|
|
|
6
|
-
This library provides several files depending on the implementation level.
|
|
7
|
-
support is in progress and should be completed soon.
|
|
6
|
+
This library provides several files depending on the implementation level.
|
|
8
7
|
|
|
9
8
|
- midy-GMLite.js: support minimal GM-Lite (ref:
|
|
10
9
|
[en](https://amei.or.jp/midistandardcommittee/Recommended_Practice/e/gml-v1.pdf),
|
|
@@ -16,7 +15,6 @@ support is in progress and should be completed soon.
|
|
|
16
15
|
[en v1.2a](https://amei.or.jp/midistandardcommittee/Recommended_Practice/e/GM2-v12a.pdf),
|
|
17
16
|
[en v1.0](https://amei.or.jp/midistandardcommittee/Recommended_Practice/e/rp24(e).pdf),
|
|
18
17
|
[ja v1.0](https://amei.or.jp/midistandardcommittee/Recommended_Practice/GM2_japanese.pdf))
|
|
19
|
-
(in progress)
|
|
20
18
|
- midy.js: full implementation (in progress)
|
|
21
19
|
|
|
22
20
|
## Usage
|
package/esm/midy-GM1.d.ts
CHANGED
|
@@ -32,12 +32,12 @@ export class MidyGM1 {
|
|
|
32
32
|
notePromises: any[];
|
|
33
33
|
exclusiveClassMap: Map<any, any>;
|
|
34
34
|
audioContext: any;
|
|
35
|
-
|
|
35
|
+
masterVolume: any;
|
|
36
36
|
voiceParamsHandlers: {
|
|
37
37
|
modLfoToPitch: (channel: any, note: any, _prevValue: any) => void;
|
|
38
38
|
vibLfoToPitch: (channel: any, note: any, _prevValue: any) => void;
|
|
39
39
|
modLfoToFilterFc: (channel: any, note: any, _prevValue: any) => void;
|
|
40
|
-
modLfoToVolume: (channel: any, note: any) => void;
|
|
40
|
+
modLfoToVolume: (channel: any, note: any, _prevValue: any) => void;
|
|
41
41
|
chorusEffectsSend: (_channel: any, _note: any, _prevValue: any) => void;
|
|
42
42
|
reverbEffectsSend: (_channel: any, _note: any, _prevValue: any) => void;
|
|
43
43
|
delayModLFO: (_channel: any, note: any, _prevValue: any) => void;
|
|
@@ -97,7 +97,8 @@ export class MidyGM1 {
|
|
|
97
97
|
centToRate(cent: any): number;
|
|
98
98
|
centToHz(cent: any): number;
|
|
99
99
|
calcChannelDetune(channel: any): any;
|
|
100
|
-
|
|
100
|
+
updateChannelDetune(channel: any): void;
|
|
101
|
+
updateDetune(channel: any, note: any): void;
|
|
101
102
|
setVolumeEnvelope(note: any): void;
|
|
102
103
|
setPitchEnvelope(note: any): void;
|
|
103
104
|
clampCutoffFrequency(frequency: any): number;
|
|
@@ -124,7 +125,7 @@ export class MidyGM1 {
|
|
|
124
125
|
modLfoToPitch: (channel: any, note: any, _prevValue: any) => void;
|
|
125
126
|
vibLfoToPitch: (channel: any, note: any, _prevValue: any) => void;
|
|
126
127
|
modLfoToFilterFc: (channel: any, note: any, _prevValue: any) => void;
|
|
127
|
-
modLfoToVolume: (channel: any, note: any) => void;
|
|
128
|
+
modLfoToVolume: (channel: any, note: any, _prevValue: any) => void;
|
|
128
129
|
chorusEffectsSend: (_channel: any, _note: any, _prevValue: any) => void;
|
|
129
130
|
reverbEffectsSend: (_channel: any, _note: any, _prevValue: any) => void;
|
|
130
131
|
delayModLFO: (_channel: any, note: any, _prevValue: 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":"AAqFA;IAoBE;;;;;;;;;;;;MAYE;IAEF,+BAQC;IAzCD,qBAAmB;IACnB,kBAAc;IACd,0BAAwB;IACxB,kBAAc;IACd,mBAAiB;IACjB,kBAAc;IACd,mBAAe;IACf,kBAAgB;IAChB,sBAA2C;IAC3C,mBAAkB;IAClB,mBAAkB;IAClB,kBAAiB;IACjB,oBAAmB;IACnB,mBAAkB;IAClB,gBAAc;IACd,mBAAiB;IACjB,oBAAkB;IAClB,iCAA8B;IAiB5B,kBAAgC;IAChC,
|
|
1
|
+
{"version":3,"file":"midy-GM1.d.ts","sourceRoot":"","sources":["../src/midy-GM1.js"],"names":[],"mappings":"AAqFA;IAoBE;;;;;;;;;;;;MAYE;IAEF,+BAQC;IAzCD,qBAAmB;IACnB,kBAAc;IACd,0BAAwB;IACxB,kBAAc;IACd,mBAAiB;IACjB,kBAAc;IACd,mBAAe;IACf,kBAAgB;IAChB,sBAA2C;IAC3C,mBAAkB;IAClB,mBAAkB;IAClB,kBAAiB;IACjB,oBAAmB;IACnB,mBAAkB;IAClB,gBAAc;IACd,mBAAiB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QC;IAED,wCAEC;IAED,6BASC;IAED,0DAUC;CACF;AArzCD;IAUE,0FAMC;IAfD,kBAAa;IACb,gBAAW;IACX,wBAAmB;IACnB,iBAAY;IACZ,mBAAc;IACd,qBAAgB;IAChB,gBAAW;IACX,kBAAa;IAGX,gBAA4B;IAC5B,cAAwB;IACxB,eAA0B;IAC1B,WAAkB;IAClB,iBAA8B;CAEjC"}
|
package/esm/midy-GM1.js
CHANGED
|
@@ -233,11 +233,11 @@ export class MidyGM1 {
|
|
|
233
233
|
value: new Map()
|
|
234
234
|
});
|
|
235
235
|
this.audioContext = audioContext;
|
|
236
|
-
this.
|
|
236
|
+
this.masterVolume = new GainNode(audioContext);
|
|
237
237
|
this.voiceParamsHandlers = this.createVoiceParamsHandlers();
|
|
238
238
|
this.controlChangeHandlers = this.createControlChangeHandlers();
|
|
239
239
|
this.channels = this.createChannels(audioContext);
|
|
240
|
-
this.
|
|
240
|
+
this.masterVolume.connect(audioContext.destination);
|
|
241
241
|
this.GM1SystemOn();
|
|
242
242
|
}
|
|
243
243
|
initSoundFontTable() {
|
|
@@ -283,7 +283,7 @@ export class MidyGM1 {
|
|
|
283
283
|
const merger = new ChannelMergerNode(audioContext, { numberOfInputs: 2 });
|
|
284
284
|
gainL.connect(merger, 0, 0);
|
|
285
285
|
gainR.connect(merger, 0, 1);
|
|
286
|
-
merger.connect(this.
|
|
286
|
+
merger.connect(this.masterVolume);
|
|
287
287
|
return {
|
|
288
288
|
gainL,
|
|
289
289
|
gainR,
|
|
@@ -609,19 +609,22 @@ export class MidyGM1 {
|
|
|
609
609
|
const pitch = pitchWheel * pitchWheelSensitivity;
|
|
610
610
|
return tuning + pitch;
|
|
611
611
|
}
|
|
612
|
-
|
|
613
|
-
const now = this.audioContext.currentTime;
|
|
612
|
+
updateChannelDetune(channel) {
|
|
614
613
|
channel.scheduledNotes.forEach((noteList) => {
|
|
615
614
|
for (let i = 0; i < noteList.length; i++) {
|
|
616
615
|
const note = noteList[i];
|
|
617
616
|
if (!note)
|
|
618
617
|
continue;
|
|
619
|
-
note
|
|
620
|
-
.cancelScheduledValues(now)
|
|
621
|
-
.setValueAtTime(channel.detune, now);
|
|
618
|
+
this.updateDetune(channel, note);
|
|
622
619
|
}
|
|
623
620
|
});
|
|
624
621
|
}
|
|
622
|
+
updateDetune(channel, note) {
|
|
623
|
+
const now = this.audioContext.currentTime;
|
|
624
|
+
note.bufferSource.detune
|
|
625
|
+
.cancelScheduledValues(now)
|
|
626
|
+
.setValueAtTime(channel.detune, now);
|
|
627
|
+
}
|
|
625
628
|
setVolumeEnvelope(note) {
|
|
626
629
|
const now = this.audioContext.currentTime;
|
|
627
630
|
const { voiceParams, startTime } = note;
|
|
@@ -874,7 +877,7 @@ export class MidyGM1 {
|
|
|
874
877
|
const next = (value - 8192) / 8192;
|
|
875
878
|
state.pitchWheel = value / 16383;
|
|
876
879
|
channel.detune += (next - prev) * state.pitchWheelSensitivity * 12800;
|
|
877
|
-
this.
|
|
880
|
+
this.updateChannelDetune(channel);
|
|
878
881
|
this.applyVoiceParams(channel, 14);
|
|
879
882
|
}
|
|
880
883
|
setModLfoToPitch(channel, note) {
|
|
@@ -945,7 +948,7 @@ export class MidyGM1 {
|
|
|
945
948
|
if (0 < channel.state.modulationDepth)
|
|
946
949
|
this.setModLfoToFilterFc(note);
|
|
947
950
|
},
|
|
948
|
-
modLfoToVolume: (channel, note) => {
|
|
951
|
+
modLfoToVolume: (channel, note, _prevValue) => {
|
|
949
952
|
if (0 < channel.state.modulationDepth)
|
|
950
953
|
this.setModLfoToVolume(note);
|
|
951
954
|
},
|
|
@@ -956,12 +959,12 @@ export class MidyGM1 {
|
|
|
956
959
|
delayVibLFO: (channel, note, prevValue) => {
|
|
957
960
|
if (0 < channel.state.vibratoDepth) {
|
|
958
961
|
const now = this.audioContext.currentTime;
|
|
959
|
-
const
|
|
960
|
-
|
|
962
|
+
const vibratoDelay = channel.state.vibratoDelay * 2;
|
|
963
|
+
const prevStartTime = note.startTime + prevValue * vibratoDelay;
|
|
961
964
|
if (now < prevStartTime)
|
|
962
965
|
return;
|
|
963
|
-
const
|
|
964
|
-
|
|
966
|
+
const value = note.voiceParams.delayVibLFO;
|
|
967
|
+
const startTime = note.startTime + value * vibratoDelay;
|
|
965
968
|
note.vibratoLFO.stop(now);
|
|
966
969
|
note.vibratoLFO.start(startTime);
|
|
967
970
|
}
|
|
@@ -969,9 +972,10 @@ export class MidyGM1 {
|
|
|
969
972
|
freqVibLFO: (channel, note, _prevValue) => {
|
|
970
973
|
if (0 < channel.state.vibratoDepth) {
|
|
971
974
|
const now = this.audioContext.currentTime;
|
|
975
|
+
const freqVibLFO = note.voiceParams.freqVibLFO;
|
|
972
976
|
note.vibratoLFO.frequency
|
|
973
977
|
.cancelScheduledValues(now)
|
|
974
|
-
.setValueAtTime(
|
|
978
|
+
.setValueAtTime(freqVibLFO * channel.state.vibratoRate * 2, now);
|
|
975
979
|
}
|
|
976
980
|
},
|
|
977
981
|
};
|
|
@@ -1011,7 +1015,7 @@ export class MidyGM1 {
|
|
|
1011
1015
|
if (key in voiceParams)
|
|
1012
1016
|
noteVoiceParams[key] = voiceParams[key];
|
|
1013
1017
|
}
|
|
1014
|
-
this.setFilterEnvelope(
|
|
1018
|
+
this.setFilterEnvelope(note);
|
|
1015
1019
|
this.setPitchEnvelope(note);
|
|
1016
1020
|
}
|
|
1017
1021
|
else if (volumeEnvelopeKeySet.has(key)) {
|
|
@@ -1050,6 +1054,8 @@ export class MidyGM1 {
|
|
|
1050
1054
|
const handler = this.controlChangeHandlers[controllerType];
|
|
1051
1055
|
if (handler) {
|
|
1052
1056
|
handler.call(this, channelNumber, value);
|
|
1057
|
+
const channel = this.channels[channelNumber];
|
|
1058
|
+
this.applyVoiceParams(channel, controllerType + 128);
|
|
1053
1059
|
}
|
|
1054
1060
|
else {
|
|
1055
1061
|
console.warn(`Unsupported Control change: controllerType=${controllerType} value=${value}`);
|
|
@@ -1057,13 +1063,14 @@ export class MidyGM1 {
|
|
|
1057
1063
|
}
|
|
1058
1064
|
updateModulation(channel) {
|
|
1059
1065
|
const now = this.audioContext.currentTime;
|
|
1066
|
+
const depth = channel.state.modulationDepth * channel.modulationDepthRange;
|
|
1060
1067
|
channel.scheduledNotes.forEach((noteList) => {
|
|
1061
1068
|
for (let i = 0; i < noteList.length; i++) {
|
|
1062
1069
|
const note = noteList[i];
|
|
1063
1070
|
if (!note)
|
|
1064
1071
|
continue;
|
|
1065
1072
|
if (note.modulationDepth) {
|
|
1066
|
-
note.modulationDepth.gain.setValueAtTime(
|
|
1073
|
+
note.modulationDepth.gain.setValueAtTime(depth, now);
|
|
1067
1074
|
}
|
|
1068
1075
|
else {
|
|
1069
1076
|
this.setPitchEnvelope(note);
|
|
@@ -1074,8 +1081,7 @@ export class MidyGM1 {
|
|
|
1074
1081
|
}
|
|
1075
1082
|
setModulationDepth(channelNumber, modulation) {
|
|
1076
1083
|
const channel = this.channels[channelNumber];
|
|
1077
|
-
channel.state.modulationDepth =
|
|
1078
|
-
channel.modulationDepthRange;
|
|
1084
|
+
channel.state.modulationDepth = modulation / 127;
|
|
1079
1085
|
this.updateModulation(channel);
|
|
1080
1086
|
}
|
|
1081
1087
|
setVolume(channelNumber, volume) {
|
|
@@ -1188,7 +1194,7 @@ export class MidyGM1 {
|
|
|
1188
1194
|
const next = value / 128;
|
|
1189
1195
|
state.pitchWheelSensitivity = next;
|
|
1190
1196
|
channel.detune += (state.pitchWheel * 2 - 1) * (next - prev) * 12800;
|
|
1191
|
-
this.
|
|
1197
|
+
this.updateChannelDetune(channel);
|
|
1192
1198
|
this.applyVoiceParams(channel, 16);
|
|
1193
1199
|
}
|
|
1194
1200
|
handleFineTuningRPN(channelNumber) {
|
|
@@ -1203,7 +1209,7 @@ export class MidyGM1 {
|
|
|
1203
1209
|
const next = (value - 8192) / 8.192; // cent
|
|
1204
1210
|
channel.fineTuning = next;
|
|
1205
1211
|
channel.detune += next - prev;
|
|
1206
|
-
this.
|
|
1212
|
+
this.updateChannelDetune(channel);
|
|
1207
1213
|
}
|
|
1208
1214
|
handleCoarseTuningRPN(channelNumber) {
|
|
1209
1215
|
const channel = this.channels[channelNumber];
|
|
@@ -1217,7 +1223,7 @@ export class MidyGM1 {
|
|
|
1217
1223
|
const next = (value - 64) * 100; // cent
|
|
1218
1224
|
channel.coarseTuning = next;
|
|
1219
1225
|
channel.detune += next - prev;
|
|
1220
|
-
this.
|
|
1226
|
+
this.updateChannelDetune(channel);
|
|
1221
1227
|
}
|
|
1222
1228
|
allSoundOff(channelNumber) {
|
|
1223
1229
|
return this.stopChannelNotes(channelNumber, 0, true);
|
|
@@ -1233,7 +1239,7 @@ export class MidyGM1 {
|
|
|
1233
1239
|
const state = channel.state;
|
|
1234
1240
|
for (let i = 0; i < stateTypes.length; i++) {
|
|
1235
1241
|
const type = stateTypes[i];
|
|
1236
|
-
state[type] = defaultControllerState[type];
|
|
1242
|
+
state[type] = defaultControllerState[type].defaultValue;
|
|
1237
1243
|
}
|
|
1238
1244
|
const settingTypes = [
|
|
1239
1245
|
"rpnMSB",
|
|
@@ -1295,8 +1301,8 @@ export class MidyGM1 {
|
|
|
1295
1301
|
}
|
|
1296
1302
|
else {
|
|
1297
1303
|
const now = this.audioContext.currentTime;
|
|
1298
|
-
this.
|
|
1299
|
-
this.
|
|
1304
|
+
this.masterVolume.gain.cancelScheduledValues(now);
|
|
1305
|
+
this.masterVolume.gain.setValueAtTime(volume * volume, now);
|
|
1300
1306
|
}
|
|
1301
1307
|
}
|
|
1302
1308
|
handleExclusiveMessage(data) {
|
package/esm/midy-GM2.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export class MidyGM2 {
|
|
|
3
3
|
currentBufferSource: null;
|
|
4
4
|
detune: number;
|
|
5
5
|
scaleOctaveTuningTable: any[];
|
|
6
|
-
|
|
6
|
+
channelPressureTable: Uint8Array<ArrayBuffer>;
|
|
7
7
|
keyBasedInstrumentControlTable: Int8Array<ArrayBuffer>;
|
|
8
8
|
program: number;
|
|
9
9
|
bank: number;
|
|
@@ -17,14 +17,6 @@ export class MidyGM2 {
|
|
|
17
17
|
coarseTuning: number;
|
|
18
18
|
modulationDepthRange: number;
|
|
19
19
|
};
|
|
20
|
-
static controllerDestinationSettings: {
|
|
21
|
-
pitchControl: number;
|
|
22
|
-
filterCutoffControl: number;
|
|
23
|
-
amplitudeControl: number;
|
|
24
|
-
lfoPitchDepth: number;
|
|
25
|
-
lfoFilterDepth: number;
|
|
26
|
-
lfoAmplitudeDepth: number;
|
|
27
|
-
};
|
|
28
20
|
constructor(audioContext: any, options?: {
|
|
29
21
|
reverbAlgorithm: (audioContext: any) => {
|
|
30
22
|
input: any;
|
|
@@ -77,12 +69,12 @@ export class MidyGM2 {
|
|
|
77
69
|
output: any;
|
|
78
70
|
};
|
|
79
71
|
};
|
|
80
|
-
|
|
72
|
+
masterVolume: any;
|
|
81
73
|
voiceParamsHandlers: {
|
|
82
74
|
modLfoToPitch: (channel: any, note: any, _prevValue: any) => void;
|
|
83
75
|
vibLfoToPitch: (channel: any, note: any, _prevValue: any) => void;
|
|
84
76
|
modLfoToFilterFc: (channel: any, note: any, _prevValue: any) => void;
|
|
85
|
-
modLfoToVolume: (channel: any, note: any) => void;
|
|
77
|
+
modLfoToVolume: (channel: any, note: any, _prevValue: any) => void;
|
|
86
78
|
chorusEffectsSend: (channel: any, note: any, prevValue: any) => void;
|
|
87
79
|
reverbEffectsSend: (channel: any, note: any, prevValue: any) => void;
|
|
88
80
|
delayModLFO: (_channel: any, note: any, _prevValue: any) => void;
|
|
@@ -191,14 +183,15 @@ export class MidyGM2 {
|
|
|
191
183
|
centToHz(cent: any): number;
|
|
192
184
|
calcChannelDetune(channel: any): any;
|
|
193
185
|
calcNoteDetune(channel: any, note: any): any;
|
|
194
|
-
|
|
186
|
+
updateChannelDetune(channel: any): void;
|
|
187
|
+
updateDetune(channel: any, note: any, pressure: any): void;
|
|
195
188
|
getPortamentoTime(channel: any): number;
|
|
196
189
|
setPortamentoStartVolumeEnvelope(channel: any, note: any): void;
|
|
197
|
-
setVolumeEnvelope(
|
|
190
|
+
setVolumeEnvelope(note: any, pressure: any): void;
|
|
198
191
|
setPitchEnvelope(note: any): void;
|
|
199
192
|
clampCutoffFrequency(frequency: any): number;
|
|
200
193
|
setPortamentoStartFilterEnvelope(channel: any, note: any): void;
|
|
201
|
-
setFilterEnvelope(channel: any, note: any): void;
|
|
194
|
+
setFilterEnvelope(channel: any, note: any, pressure: any): void;
|
|
202
195
|
startModulation(channel: any, note: any, startTime: any): void;
|
|
203
196
|
startVibrato(channel: any, note: any, startTime: any): void;
|
|
204
197
|
createNote(channel: any, voice: any, noteNumber: any, velocity: any, startTime: any, portamento: any, isSF3: any): Promise<Note>;
|
|
@@ -213,22 +206,22 @@ export class MidyGM2 {
|
|
|
213
206
|
handleMIDIMessage(statusByte: any, data1: any, data2: any): void | Promise<any>;
|
|
214
207
|
handleProgramChange(channelNumber: any, program: any): void;
|
|
215
208
|
handleChannelPressure(channelNumber: any, value: any): void;
|
|
216
|
-
setChannelPressure(channel: any, note: any): void;
|
|
217
209
|
handlePitchBendMessage(channelNumber: any, lsb: any, msb: any): void;
|
|
218
210
|
setPitchBend(channelNumber: any, value: any): void;
|
|
219
|
-
setModLfoToPitch(channel: any, note: any): void;
|
|
211
|
+
setModLfoToPitch(channel: any, note: any, pressure: any): void;
|
|
220
212
|
setVibLfoToPitch(channel: any, note: any): void;
|
|
221
|
-
setModLfoToFilterFc(
|
|
222
|
-
setModLfoToVolume(
|
|
213
|
+
setModLfoToFilterFc(note: any, pressure: any): void;
|
|
214
|
+
setModLfoToVolume(note: any, pressure: any): void;
|
|
223
215
|
setReverbEffectsSend(channel: any, note: any, prevValue: any): void;
|
|
224
216
|
setChorusEffectsSend(channel: any, note: any, prevValue: any): void;
|
|
225
217
|
setDelayModLFO(note: any): void;
|
|
226
218
|
setFreqModLFO(note: any): void;
|
|
219
|
+
setFreqVibLFO(channel: any, note: any): void;
|
|
227
220
|
createVoiceParamsHandlers(): {
|
|
228
221
|
modLfoToPitch: (channel: any, note: any, _prevValue: any) => void;
|
|
229
222
|
vibLfoToPitch: (channel: any, note: any, _prevValue: any) => void;
|
|
230
223
|
modLfoToFilterFc: (channel: any, note: any, _prevValue: any) => void;
|
|
231
|
-
modLfoToVolume: (channel: any, note: any) => void;
|
|
224
|
+
modLfoToVolume: (channel: any, note: any, _prevValue: any) => void;
|
|
232
225
|
chorusEffectsSend: (channel: any, note: any, prevValue: any) => void;
|
|
233
226
|
reverbEffectsSend: (channel: any, note: any, prevValue: any) => void;
|
|
234
227
|
delayModLFO: (_channel: any, note: any, _prevValue: any) => void;
|
|
@@ -311,7 +304,7 @@ export class MidyGM2 {
|
|
|
311
304
|
handleUniversalNonRealTimeExclusiveMessage(data: any): void;
|
|
312
305
|
GM1SystemOn(): void;
|
|
313
306
|
GM2SystemOn(): void;
|
|
314
|
-
handleUniversalRealTimeExclusiveMessage(data: any):
|
|
307
|
+
handleUniversalRealTimeExclusiveMessage(data: any): any;
|
|
315
308
|
handleMasterVolumeSysEx(data: any): void;
|
|
316
309
|
setMasterVolume(volume: any): void;
|
|
317
310
|
handleMasterFineTuningSysEx(data: any): void;
|
|
@@ -338,11 +331,15 @@ export class MidyGM2 {
|
|
|
338
331
|
getChorusSendToReverb(value: any): number;
|
|
339
332
|
getChannelBitmap(data: any): any[];
|
|
340
333
|
handleScaleOctaveTuning1ByteFormatSysEx(data: any): void;
|
|
341
|
-
|
|
334
|
+
applyDestinationSettings(channel: any, note: any, table: any): void;
|
|
335
|
+
handleChannelPressureSysEx(data: any, tableName: any): void;
|
|
336
|
+
initControlTable(): Uint8Array<ArrayBuffer>;
|
|
337
|
+
applyControlTable(channel: any, controllerType: any): void;
|
|
338
|
+
handleControlChangeSysEx(data: any): void;
|
|
342
339
|
getKeyBasedInstrumentControlValue(channel: any, keyNumber: any, controllerType: any): number;
|
|
343
340
|
handleKeyBasedInstrumentControlSysEx(data: any): void;
|
|
344
341
|
handleExclusiveMessage(data: any): void;
|
|
345
|
-
handleSysEx(data: any):
|
|
342
|
+
handleSysEx(data: any): any;
|
|
346
343
|
scheduleTask(callback: any, startTime: any): Promise<any>;
|
|
347
344
|
}
|
|
348
345
|
declare class Note {
|
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":"
|
|
1
|
+
{"version":3,"file":"midy-GM2.d.ts","sourceRoot":"","sources":["../src/midy-GM2.js"],"names":[],"mappings":"AAgHA;IAmCE;;;;;;;;;;;;;;;;;MAiBE;IAgCF;;;;;OAaC;IAhGD,qBAAmB;IACnB,kBAAc;IACd,yBAAqB;IACrB,2BAAuB;IACvB;;;MAGE;IACF;;;;;;MAME;IACF,cAAa;IACb,cAAa;IACb,0BAAwB;IACxB,kBAAc;IACd,mBAAiB;IACjB,kBAAc;IACd,mBAAe;IACf,kBAAgB;IAChB,sBAA2C;IAC3C,mBAAkB;IAClB,mBAAkB;IAClB,kBAAiB;IACjB,oBAAmB;IACnB,mBAAkB;IAClB,gBAAc;IACd,mBAAiB;IACjB,oBAAkB;IAClB,iCAA8B;IAqB9B;;;;;MA4BE;IAGA,kBAAgC;IAChC;;;;;MAAqD;IACrD,kBAA8C;IAC9C;;;;;;;;;;;MAA2D;IAC3D;;;;;;;;;;;;;;;;;;;;;;;;;MAA+D;IAC/D,gBAAiD;IACjD;;;MAA8D;IAC9D;;;;;;;;MAAyD;IAO3D,4BAMC;IAED,mCAWC;IAED,gDAMC;IAED,sCASC;IAED;;;;MAeC;IAED,yCAYC;IAED,6DA2BC;IAED,iEAUC;IAED,2CAcC;IAED,2EAuDC;IAED,mCAOC;IAED,0BAkDC;IAED,uDAEC;IAED,wDAEC;IAED;;;MAoGC;IAED,+EAoBC;IAED,qDAKC;IAED,uBAKC;IAED,aAGC;IAED,cAKC;IAED,wBAIC;IAED,0BAKC;IAED,wBAOC;IAED,sBAGC;IAED,uDASC;IAED,6CAQC;IAED,kFAuBC;IAED;;;;MAWC;IAED,gFAUC;IAED,mFAYC;IAED,sGAcC;IAID;;;MA8BC;IAED;;;;;;;;MA0CC;IAED,2BAEC;IAED,8BAEC;IAED,8BAEC;IAED,4BAEC;IAED,qCAUC;IAED,6CAEC;IAED,wCAQC;IAED,2DAOC;IAED,wCAIC;IAED,gEAWC;IAED,kDAiBC;IAED,kCAqBC;IAED,6CAIC;IAED,gEAsBC;IAED,gEA0BC;IAED,+DAoBC;IAED,4DAaC;IAED,iIA6DC;IAED,gDAQC;IAED,mHA0DC;IAED,2FASC;IAED,qFAqCC;IAED,wJAuCC;IAED,qHAUC;IAED,kEAeC;IAED,oEAYC;IAED,gFAmBC;IAED,4DAIC;IAED,4DAkBC;IAED,qEAGC;IAED,mDASC;IAED,+DAQC;IAED,gDASC;IAED,oDAMC;IAED,kDAQC;IAED,oEA2BC;IAED,oEA2BC;IAED,gCAOC;IAED,+BAMC;IAED,6CAMC;IAED;;;;;;;;;;;MAgDC;IAED,oFAMC;IAED,0DAiDC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;MA2BC;IAED,+EAYC;IAED,+CAEC;IAED,qCAeC;IAED,8DAIC;IAED,iEAIC;IAED,sCAiBC;IAED,iDAKC;IAED;;;MAMC;IAED,mCAqBC;IAED,2CAKC;IAED,yDAIC;IAED,+CAEC;IAED,mDAGC;IAED,wCAWC;IAED,sDAKC;IAED,oDAEC;IAED,wDAUC;IAED,uDAGC;IAED,mEAmCC;IAED,mEAmCC;IAED,kFAeC;IAED,2DAMC;IAED,oCAqBC;IAED,gDAEC;IAED,gDAEC;IAED,mDAGC;IAED,kDAKC;IAED,wDASC;IAED,8CAKC;IAED,oDAOC;IAED,gDAKC;IAED,sDAOC;IAED,wDAKC;IAED,6EAIC;IAED,+CAEC;IAED,8CAyBC;IAED,+CAEC;IAED,gBAEC;IAED,eAEC;IAED,eAEC;IAED,eAEC;IAED,4DA4BC;IAED,oBASC;IAED,oBASC;IA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