@marmooo/midy 0.3.3 → 0.3.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/esm/midy-GM1.d.ts +3 -3
- package/esm/midy-GM1.d.ts.map +1 -1
- package/esm/midy-GM1.js +47 -50
- package/esm/midy-GM2.d.ts +13 -31
- package/esm/midy-GM2.d.ts.map +1 -1
- package/esm/midy-GM2.js +185 -206
- package/esm/midy-GMLite.d.ts +3 -3
- package/esm/midy-GMLite.d.ts.map +1 -1
- package/esm/midy-GMLite.js +47 -50
- package/esm/midy.d.ts +14 -31
- package/esm/midy.d.ts.map +1 -1
- package/esm/midy.js +225 -225
- package/package.json +1 -1
- package/script/midy-GM1.d.ts +3 -3
- package/script/midy-GM1.d.ts.map +1 -1
- package/script/midy-GM1.js +47 -50
- package/script/midy-GM2.d.ts +13 -31
- package/script/midy-GM2.d.ts.map +1 -1
- package/script/midy-GM2.js +185 -206
- package/script/midy-GMLite.d.ts +3 -3
- package/script/midy-GMLite.d.ts.map +1 -1
- package/script/midy-GMLite.js +47 -50
- package/script/midy.d.ts +14 -31
- package/script/midy.d.ts.map +1 -1
- package/script/midy.js +225 -225
package/esm/midy-GM1.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export class MidyGM1 {
|
|
|
56
56
|
addSoundFont(soundFont: any): void;
|
|
57
57
|
loadSoundFont(input: any): Promise<void>;
|
|
58
58
|
loadMIDI(input: any): Promise<void>;
|
|
59
|
-
|
|
59
|
+
createChannelAudioNodes(audioContext: any): {
|
|
60
60
|
gainL: any;
|
|
61
61
|
gainR: any;
|
|
62
62
|
merger: any;
|
|
@@ -84,7 +84,7 @@ export class MidyGM1 {
|
|
|
84
84
|
seekTo(second: any): void;
|
|
85
85
|
calcTotalTime(): number;
|
|
86
86
|
currentTime(): number;
|
|
87
|
-
processScheduledNotes(channel: any, callback: any): void;
|
|
87
|
+
processScheduledNotes(channel: any, scheduleTime: any, callback: any): void;
|
|
88
88
|
processActiveNotes(channel: any, scheduleTime: any, callback: any): void;
|
|
89
89
|
cbToRatio(cb: any): number;
|
|
90
90
|
rateToCent(rate: any): number;
|
|
@@ -101,7 +101,7 @@ export class MidyGM1 {
|
|
|
101
101
|
getAudioBuffer(programNumber: any, noteNumber: any, velocity: any, voiceParams: any, isSF3: any): Promise<any>;
|
|
102
102
|
createNote(channel: any, voice: any, noteNumber: any, velocity: any, startTime: any, isSF3: any): Promise<Note>;
|
|
103
103
|
handleExclusiveClass(note: any, channelNumber: any, startTime: any): void;
|
|
104
|
-
scheduleNoteOn(channelNumber: any, noteNumber: any, velocity: any, startTime: any
|
|
104
|
+
scheduleNoteOn(channelNumber: any, noteNumber: any, velocity: any, startTime: any): Promise<void>;
|
|
105
105
|
noteOn(channelNumber: any, noteNumber: any, velocity: any, scheduleTime: any): Promise<void>;
|
|
106
106
|
disconnectNote(note: any): void;
|
|
107
107
|
releaseNote(channel: any, note: any, endTime: any): Promise<any>;
|
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":"
|
|
1
|
+
{"version":3,"file":"midy-GM1.d.ts","sourceRoot":"","sources":["../src/midy-GM1.js"],"names":[],"mappings":"AA4FA;IAwBE;;;;;;;;;;;MAWE;IAEF,+BAcC;IAlDD,aAAa;IACb,oBAAiB;IACjB,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,2BAAqC;IAgBnC,kBAAgC;IAChC,kBAA8C;IAC9C,eAAwD;IACxD,qBAGE;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AGD,6DAgBC;CACF;AAv9CD;IAWE,0FAMC;IAhBD,cAAW;IACX,gBAAe;IACf,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
|
@@ -70,13 +70,11 @@ const defaultControllerState = {
|
|
|
70
70
|
pitchWheel: { type: 14, defaultValue: 8192 / 16383 },
|
|
71
71
|
pitchWheelSensitivity: { type: 16, defaultValue: 2 / 128 },
|
|
72
72
|
link: { type: 127, defaultValue: 0 },
|
|
73
|
-
// bankMSB: { type: 128 + 0, defaultValue: 121, },
|
|
74
73
|
modulationDepth: { type: 128 + 1, defaultValue: 0 },
|
|
75
74
|
// dataMSB: { type: 128 + 6, defaultValue: 0, },
|
|
76
75
|
volume: { type: 128 + 7, defaultValue: 100 / 127 },
|
|
77
76
|
pan: { type: 128 + 10, defaultValue: 64 / 127 },
|
|
78
77
|
expression: { type: 128 + 11, defaultValue: 1 },
|
|
79
|
-
// bankLSB: { type: 128 + 32, defaultValue: 0, },
|
|
80
78
|
// dataLSB: { type: 128 + 38, defaultValue: 0, },
|
|
81
79
|
sustainPedal: { type: 128 + 64, defaultValue: 0 },
|
|
82
80
|
// rpnLSB: { type: 128 + 100, defaultValue: 127 },
|
|
@@ -105,6 +103,16 @@ class ControllerState {
|
|
|
105
103
|
}
|
|
106
104
|
}
|
|
107
105
|
}
|
|
106
|
+
const volumeEnvelopeKeys = [
|
|
107
|
+
"volDelay",
|
|
108
|
+
"volAttack",
|
|
109
|
+
"volHold",
|
|
110
|
+
"volDecay",
|
|
111
|
+
"volSustain",
|
|
112
|
+
"volRelease",
|
|
113
|
+
"initialAttenuation",
|
|
114
|
+
];
|
|
115
|
+
const volumeEnvelopeKeySet = new Set(volumeEnvelopeKeys);
|
|
108
116
|
const filterEnvelopeKeys = [
|
|
109
117
|
"modEnvToPitch",
|
|
110
118
|
"initialFilterFc",
|
|
@@ -114,20 +122,18 @@ const filterEnvelopeKeys = [
|
|
|
114
122
|
"modHold",
|
|
115
123
|
"modDecay",
|
|
116
124
|
"modSustain",
|
|
117
|
-
"modRelease",
|
|
118
|
-
"playbackRate",
|
|
119
125
|
];
|
|
120
126
|
const filterEnvelopeKeySet = new Set(filterEnvelopeKeys);
|
|
121
|
-
const
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
127
|
+
const pitchEnvelopeKeys = [
|
|
128
|
+
"modEnvToPitch",
|
|
129
|
+
"modDelay",
|
|
130
|
+
"modAttack",
|
|
131
|
+
"modHold",
|
|
132
|
+
"modDecay",
|
|
133
|
+
"modSustain",
|
|
134
|
+
"playbackRate",
|
|
129
135
|
];
|
|
130
|
-
const
|
|
136
|
+
const pitchEnvelopeKeySet = new Set(pitchEnvelopeKeys);
|
|
131
137
|
export class MidyGM1 {
|
|
132
138
|
constructor(audioContext) {
|
|
133
139
|
Object.defineProperty(this, "mode", {
|
|
@@ -332,7 +338,7 @@ export class MidyGM1 {
|
|
|
332
338
|
this.timeline = midiData.timeline;
|
|
333
339
|
this.totalTime = this.calcTotalTime();
|
|
334
340
|
}
|
|
335
|
-
|
|
341
|
+
createChannelAudioNodes(audioContext) {
|
|
336
342
|
const { gainLeft, gainRight } = this.panToGain(defaultControllerState.pan.defaultValue);
|
|
337
343
|
const gainL = new GainNode(audioContext, { gain: gainLeft });
|
|
338
344
|
const gainR = new GainNode(audioContext, { gain: gainRight });
|
|
@@ -353,7 +359,7 @@ export class MidyGM1 {
|
|
|
353
359
|
isDrum: false,
|
|
354
360
|
state: new ControllerState(),
|
|
355
361
|
...this.constructor.channelSettings,
|
|
356
|
-
...this.
|
|
362
|
+
...this.createChannelAudioNodes(audioContext),
|
|
357
363
|
scheduledNotes: [],
|
|
358
364
|
sustainNotes: [],
|
|
359
365
|
};
|
|
@@ -591,7 +597,7 @@ export class MidyGM1 {
|
|
|
591
597
|
stopChannelNotes(channelNumber, velocity, force, scheduleTime) {
|
|
592
598
|
const channel = this.channels[channelNumber];
|
|
593
599
|
const promises = [];
|
|
594
|
-
this.processScheduledNotes(channel, (note) => {
|
|
600
|
+
this.processScheduledNotes(channel, scheduleTime, (note) => {
|
|
595
601
|
const promise = this.scheduleNoteOff(channelNumber, note.noteNumber, velocity, scheduleTime, force);
|
|
596
602
|
this.notePromises.push(promise);
|
|
597
603
|
promises.push(promise);
|
|
@@ -650,7 +656,7 @@ export class MidyGM1 {
|
|
|
650
656
|
const now = this.audioContext.currentTime;
|
|
651
657
|
return this.resumeTime + now - this.startTime - this.startDelay;
|
|
652
658
|
}
|
|
653
|
-
processScheduledNotes(channel, callback) {
|
|
659
|
+
processScheduledNotes(channel, scheduleTime, callback) {
|
|
654
660
|
const scheduledNotes = channel.scheduledNotes;
|
|
655
661
|
for (let i = 0; i < scheduledNotes.length; i++) {
|
|
656
662
|
const note = scheduledNotes[i];
|
|
@@ -658,6 +664,8 @@ export class MidyGM1 {
|
|
|
658
664
|
continue;
|
|
659
665
|
if (note.ending)
|
|
660
666
|
continue;
|
|
667
|
+
if (note.startTime < scheduleTime)
|
|
668
|
+
continue;
|
|
661
669
|
callback(note);
|
|
662
670
|
}
|
|
663
671
|
}
|
|
@@ -670,7 +678,7 @@ export class MidyGM1 {
|
|
|
670
678
|
if (note.ending)
|
|
671
679
|
continue;
|
|
672
680
|
if (scheduleTime < note.startTime)
|
|
673
|
-
|
|
681
|
+
break;
|
|
674
682
|
callback(note);
|
|
675
683
|
}
|
|
676
684
|
}
|
|
@@ -694,7 +702,7 @@ export class MidyGM1 {
|
|
|
694
702
|
return tuning + pitch;
|
|
695
703
|
}
|
|
696
704
|
updateChannelDetune(channel, scheduleTime) {
|
|
697
|
-
this.processScheduledNotes(channel, (note) => {
|
|
705
|
+
this.processScheduledNotes(channel, scheduleTime, (note) => {
|
|
698
706
|
this.updateDetune(channel, note, scheduleTime);
|
|
699
707
|
});
|
|
700
708
|
}
|
|
@@ -844,7 +852,7 @@ export class MidyGM1 {
|
|
|
844
852
|
}
|
|
845
853
|
this.exclusiveClassNotes[exclusiveClass] = [note, channelNumber];
|
|
846
854
|
}
|
|
847
|
-
async scheduleNoteOn(channelNumber, noteNumber, velocity, startTime
|
|
855
|
+
async scheduleNoteOn(channelNumber, noteNumber, velocity, startTime) {
|
|
848
856
|
const channel = this.channels[channelNumber];
|
|
849
857
|
const bankNumber = channel.bank;
|
|
850
858
|
const soundFontIndex = this.soundFontTable[channel.programNumber].get(bankNumber);
|
|
@@ -856,7 +864,6 @@ export class MidyGM1 {
|
|
|
856
864
|
return;
|
|
857
865
|
const isSF3 = soundFont.parsed.info.version.major === 3;
|
|
858
866
|
const note = await this.createNote(channel, voice, noteNumber, velocity, startTime, isSF3);
|
|
859
|
-
note.noteOffEvent = noteOffEvent;
|
|
860
867
|
note.volumeEnvelopeNode.connect(channel.gainL);
|
|
861
868
|
note.volumeEnvelopeNode.connect(channel.gainR);
|
|
862
869
|
if (0.5 <= channel.state.sustainPedal) {
|
|
@@ -1048,11 +1055,12 @@ export class MidyGM1 {
|
|
|
1048
1055
|
return state;
|
|
1049
1056
|
}
|
|
1050
1057
|
applyVoiceParams(channel, controllerType, scheduleTime) {
|
|
1051
|
-
this.processScheduledNotes(channel, (note) => {
|
|
1058
|
+
this.processScheduledNotes(channel, scheduleTime, (note) => {
|
|
1052
1059
|
const controllerState = this.getControllerState(channel, note.noteNumber, note.velocity);
|
|
1053
1060
|
const voiceParams = note.voice.getParams(controllerType, controllerState);
|
|
1054
|
-
let
|
|
1055
|
-
let
|
|
1061
|
+
let applyVolumeEnvelope = false;
|
|
1062
|
+
let applyFilterEnvelope = false;
|
|
1063
|
+
let applyPitchEnvelope = false;
|
|
1056
1064
|
for (const [key, value] of Object.entries(voiceParams)) {
|
|
1057
1065
|
const prevValue = note.voiceParams[key];
|
|
1058
1066
|
if (value === prevValue)
|
|
@@ -1061,32 +1069,21 @@ export class MidyGM1 {
|
|
|
1061
1069
|
if (key in this.voiceParamsHandlers) {
|
|
1062
1070
|
this.voiceParamsHandlers[key](channel, note, prevValue, scheduleTime);
|
|
1063
1071
|
}
|
|
1064
|
-
else
|
|
1065
|
-
if (
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
if (key in voiceParams)
|
|
1072
|
-
noteVoiceParams[key] = voiceParams[key];
|
|
1073
|
-
}
|
|
1074
|
-
this.setFilterEnvelope(note, scheduleTime);
|
|
1075
|
-
this.setPitchEnvelope(note, scheduleTime);
|
|
1076
|
-
}
|
|
1077
|
-
else if (volumeEnvelopeKeySet.has(key)) {
|
|
1078
|
-
if (appliedVolumeEnvelope)
|
|
1079
|
-
continue;
|
|
1080
|
-
appliedVolumeEnvelope = true;
|
|
1081
|
-
const noteVoiceParams = note.voiceParams;
|
|
1082
|
-
for (let i = 0; i < volumeEnvelopeKeys.length; i++) {
|
|
1083
|
-
const key = volumeEnvelopeKeys[i];
|
|
1084
|
-
if (key in voiceParams)
|
|
1085
|
-
noteVoiceParams[key] = voiceParams[key];
|
|
1086
|
-
}
|
|
1087
|
-
this.setVolumeEnvelope(note, scheduleTime);
|
|
1072
|
+
else {
|
|
1073
|
+
if (volumeEnvelopeKeySet.has(key))
|
|
1074
|
+
applyVolumeEnvelope = true;
|
|
1075
|
+
if (filterEnvelopeKeySet.has(key))
|
|
1076
|
+
applyFilterEnvelope = true;
|
|
1077
|
+
if (pitchEnvelopeKeySet.has(key))
|
|
1078
|
+
applyPitchEnvelope = true;
|
|
1088
1079
|
}
|
|
1089
1080
|
}
|
|
1081
|
+
if (applyVolumeEnvelope)
|
|
1082
|
+
this.setVolumeEnvelope(note, scheduleTime);
|
|
1083
|
+
if (applyFilterEnvelope)
|
|
1084
|
+
this.setFilterEnvelope(note, scheduleTime);
|
|
1085
|
+
if (applyPitchEnvelope)
|
|
1086
|
+
this.setPitchEnvelope(note, scheduleTime);
|
|
1090
1087
|
});
|
|
1091
1088
|
}
|
|
1092
1089
|
createControlChangeHandlers() {
|
|
@@ -1117,7 +1114,7 @@ export class MidyGM1 {
|
|
|
1117
1114
|
}
|
|
1118
1115
|
updateModulation(channel, scheduleTime) {
|
|
1119
1116
|
const depth = channel.state.modulationDepth * channel.modulationDepthRange;
|
|
1120
|
-
this.processScheduledNotes(channel, (note) => {
|
|
1117
|
+
this.processScheduledNotes(channel, scheduleTime, (note) => {
|
|
1121
1118
|
if (note.modulationDepth) {
|
|
1122
1119
|
note.modulationDepth.gain.setValueAtTime(depth, scheduleTime);
|
|
1123
1120
|
}
|
|
@@ -1178,7 +1175,7 @@ export class MidyGM1 {
|
|
|
1178
1175
|
scheduleTime ??= this.audioContext.currentTime;
|
|
1179
1176
|
channel.state.sustainPedal = value / 127;
|
|
1180
1177
|
if (64 <= value) {
|
|
1181
|
-
this.processScheduledNotes(channel, (note) => {
|
|
1178
|
+
this.processScheduledNotes(channel, scheduleTime, (note) => {
|
|
1182
1179
|
channel.sustainNotes.push(note);
|
|
1183
1180
|
});
|
|
1184
1181
|
}
|
package/esm/midy-GM2.d.ts
CHANGED
|
@@ -14,16 +14,12 @@ export class MidyGM2 {
|
|
|
14
14
|
fineTuning: number;
|
|
15
15
|
coarseTuning: number;
|
|
16
16
|
};
|
|
17
|
-
constructor(audioContext: any
|
|
18
|
-
reverbAlgorithm: (audioContext: any) => {
|
|
19
|
-
input: any;
|
|
20
|
-
output: any;
|
|
21
|
-
};
|
|
22
|
-
});
|
|
17
|
+
constructor(audioContext: any);
|
|
23
18
|
mode: string;
|
|
24
19
|
masterFineTuning: number;
|
|
25
20
|
masterCoarseTuning: number;
|
|
26
21
|
reverb: {
|
|
22
|
+
algorithm: string;
|
|
27
23
|
time: number;
|
|
28
24
|
feedback: number;
|
|
29
25
|
};
|
|
@@ -56,19 +52,7 @@ export class MidyGM2 {
|
|
|
56
52
|
notePromises: any[];
|
|
57
53
|
exclusiveClassNotes: any[];
|
|
58
54
|
drumExclusiveClassNotes: any[];
|
|
59
|
-
defaultOptions: {
|
|
60
|
-
reverbAlgorithm: (audioContext: any) => {
|
|
61
|
-
input: any;
|
|
62
|
-
output: any;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
55
|
audioContext: any;
|
|
66
|
-
options: {
|
|
67
|
-
reverbAlgorithm: (audioContext: any) => {
|
|
68
|
-
input: any;
|
|
69
|
-
output: any;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
56
|
masterVolume: any;
|
|
73
57
|
scheduler: any;
|
|
74
58
|
schedulerBuffer: any;
|
|
@@ -89,7 +73,7 @@ export class MidyGM2 {
|
|
|
89
73
|
reverbEffect: {
|
|
90
74
|
input: any;
|
|
91
75
|
output: any;
|
|
92
|
-
};
|
|
76
|
+
} | undefined;
|
|
93
77
|
chorusEffect: {
|
|
94
78
|
input: any;
|
|
95
79
|
output: any;
|
|
@@ -103,7 +87,7 @@ export class MidyGM2 {
|
|
|
103
87
|
addSoundFont(soundFont: any): void;
|
|
104
88
|
loadSoundFont(input: any): Promise<void>;
|
|
105
89
|
loadMIDI(input: any): Promise<void>;
|
|
106
|
-
|
|
90
|
+
createChannelAudioNodes(audioContext: any): {
|
|
107
91
|
gainL: any;
|
|
108
92
|
gainR: any;
|
|
109
93
|
merger: any;
|
|
@@ -133,7 +117,7 @@ export class MidyGM2 {
|
|
|
133
117
|
seekTo(second: any): void;
|
|
134
118
|
calcTotalTime(): number;
|
|
135
119
|
currentTime(): number;
|
|
136
|
-
processScheduledNotes(channel: any, callback: any): void;
|
|
120
|
+
processScheduledNotes(channel: any, scheduleTime: any, callback: any): void;
|
|
137
121
|
processActiveNotes(channel: any, scheduleTime: any, callback: any): void;
|
|
138
122
|
createConvolutionReverbImpulse(audioContext: any, decay: any, preDecay: any): any;
|
|
139
123
|
createConvolutionReverb(audioContext: any, impulse: any): {
|
|
@@ -148,6 +132,10 @@ export class MidyGM2 {
|
|
|
148
132
|
input: any;
|
|
149
133
|
output: any;
|
|
150
134
|
};
|
|
135
|
+
createReverbEffect(audioContext: any): {
|
|
136
|
+
input: any;
|
|
137
|
+
output: any;
|
|
138
|
+
} | undefined;
|
|
151
139
|
createChorusEffect(audioContext: any): {
|
|
152
140
|
input: any;
|
|
153
141
|
output: any;
|
|
@@ -181,8 +169,7 @@ export class MidyGM2 {
|
|
|
181
169
|
calcBank(channel: any): any;
|
|
182
170
|
handleExclusiveClass(note: any, channelNumber: any, startTime: any): void;
|
|
183
171
|
handleDrumExclusiveClass(note: any, channelNumber: any, startTime: any): void;
|
|
184
|
-
|
|
185
|
-
scheduleNoteOn(channelNumber: any, noteNumber: any, velocity: any, startTime: any, noteOffEvent: any): Promise<void>;
|
|
172
|
+
scheduleNoteOn(channelNumber: any, noteNumber: any, velocity: any, startTime: any): Promise<void>;
|
|
186
173
|
noteOn(channelNumber: any, noteNumber: any, velocity: any, scheduleTime: any): Promise<void>;
|
|
187
174
|
disconnectNote(note: any): void;
|
|
188
175
|
releaseNote(channel: any, note: any, endTime: any): Promise<any>;
|
|
@@ -226,18 +213,17 @@ export class MidyGM2 {
|
|
|
226
213
|
setModulationDepth(channelNumber: any, modulation: any, scheduleTime: any): void;
|
|
227
214
|
updatePortamento(channel: any, scheduleTime: any): void;
|
|
228
215
|
setPortamentoTime(channelNumber: any, portamentoTime: any, scheduleTime: any): void;
|
|
229
|
-
setKeyBasedVolume(channel: any, scheduleTime: any): void;
|
|
230
216
|
setVolume(channelNumber: any, volume: any, scheduleTime: any): void;
|
|
231
217
|
panToGain(pan: any): {
|
|
232
218
|
gainLeft: number;
|
|
233
219
|
gainRight: number;
|
|
234
220
|
};
|
|
235
|
-
setKeyBasedPan(channel: any, scheduleTime: any): void;
|
|
236
221
|
setPan(channelNumber: any, pan: any, scheduleTime: any): void;
|
|
237
222
|
setExpression(channelNumber: any, expression: any, scheduleTime: any): void;
|
|
238
223
|
setBankLSB(channelNumber: any, lsb: any): void;
|
|
239
224
|
dataEntryLSB(channelNumber: any, value: any, scheduleTime: any): void;
|
|
240
225
|
updateChannelVolume(channel: any, scheduleTime: any): void;
|
|
226
|
+
updateKeyBasedVolume(channel: any, scheduleTime: any): void;
|
|
241
227
|
setSustainPedal(channelNumber: any, value: any, scheduleTime: any): void;
|
|
242
228
|
setPortamento(channelNumber: any, value: any, scheduleTime: any): void;
|
|
243
229
|
setSostenutoPedal(channelNumber: any, value: any, scheduleTime: any): void;
|
|
@@ -304,9 +290,8 @@ export class MidyGM2 {
|
|
|
304
290
|
getLFOAmplitudeDepth(channel: any): number;
|
|
305
291
|
setControllerParameters(channel: any, note: any, table: any): void;
|
|
306
292
|
handlePressureSysEx(data: any, tableName: any): void;
|
|
307
|
-
initControlTable():
|
|
308
|
-
|
|
309
|
-
applyControlTable(channel: any, controllerType: any): void;
|
|
293
|
+
initControlTable(): Int8Array<ArrayBuffer>;
|
|
294
|
+
applyControlTable(channel: any, controllerType: any, scheduleTime: any): void;
|
|
310
295
|
handleControlChangeSysEx(data: any): void;
|
|
311
296
|
getKeyBasedInstrumentControlValue(channel: any, keyNumber: any, controllerType: any): any;
|
|
312
297
|
handleKeyBasedInstrumentControlSysEx(data: any, scheduleTime: any): void;
|
|
@@ -322,9 +307,6 @@ declare class Note {
|
|
|
322
307
|
filterDepth: any;
|
|
323
308
|
volumeEnvelopeNode: any;
|
|
324
309
|
volumeDepth: any;
|
|
325
|
-
volumeNode: any;
|
|
326
|
-
gainL: any;
|
|
327
|
-
gainR: any;
|
|
328
310
|
modulationLFO: any;
|
|
329
311
|
modulationDepth: any;
|
|
330
312
|
vibratoLFO: any;
|
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":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C;IAED,+DAKC;IAED,qDAoBC;IAED,6CAIC;IAED,8EAoBC;IAED,oEAwBC;IAED,kEAoBC;IAED,+DAaC;IAED,+GA0BC;IAED,gHAuEC;IAED,4BAYC;IAED,0EAiBC;IAED,8EAoBC;IAED,kGAgDC;IAED,6FASC;IAED,gCAmBC;IAED,iEAoBC;IAED,qGAqBC;IAED,sDASC;IAED,qFASC;IAED,sFAeC;IAED,wFAkBC;IAED,oGA6BC;IAED,sFAcC;IAED,+EAgBC;IAED,wFAGC;IAED,sEAWC;IAED,mEAQC;IAED,mEAQC;IAED,sEAMC;IAED,oEAQC;IAED,uFA+BC;IAED,uFA+BC;IAED,mDAMC;IAED,kDAKC;IAED,gEAKC;IAED;;;;;;;;;;;MAiDC;IAED,oFAOC;IAED,6EAoCC;IAED,qCA2BC;IAED,kGAYC;IAED,+CAEC;IAED,wDAUC;IAED,iFAMC;IAED,wDAkBC;IAED,oFAMC;IAED,oEAMC;IAED;;;MAMC;IAED,8DAMC;IAED,4EAKC;IAED,+CAEC;IAED,sEAGC;IAED,2DAUC;IAED,4DAgCC;IAED,yEAYC;IAED,uEAMC;IAED,2EAcC;IAED,oDAEC;IAED,0EAeC;IAED,sFA4BC;IAED,sFA4BC;IAED,kFAeC;IAED,2DAMC;IAED,uDAqBC;IAED,gDAEC;IAED,gDAEC;IAED,sEAGC;IAED,qEAKC;IAED,2EAWC;IAED,iEAKC;IAED,uEASC;IAED,mEAKC;IAED,yEASC;IAED,2EASC;IAED,gGAMC;IAED,gFAGC;IAED,yCAwBC;IAGD,8EAoCC;IAED,gFAGC;IAED,iEAEC;IAED,gEAEC;IAED,gEAIC;IAED,gEAIC;IAED,+EAgCC;IAED,qCAcC;IAED,qCAcC;IAED,4EAwCC;IAED,4DAGC;IAED,sDASC;IAED,gEAGC;IAED,yDAWC;IAED,kEAGC;IAED,2DAWC;IAED,sEAeC;IAED,4CAOC;IAED,+BAIC;IAED,qDAiBC;IAED,gCAGC;IAED,kCAEC;IA6BD,4C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