@marmooo/midy 0.1.3 → 0.1.5

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.
Files changed (35) hide show
  1. package/esm/deps/cdn.jsdelivr.net/npm/@marmooo/{soundfont-parser@0.0.4 → soundfont-parser@0.0.6}/+esm.d.ts +16 -20
  2. package/esm/deps/cdn.jsdelivr.net/npm/@marmooo/soundfont-parser@0.0.6/+esm.d.ts.map +1 -0
  3. package/esm/deps/cdn.jsdelivr.net/npm/@marmooo/soundfont-parser@0.0.6/+esm.js +180 -0
  4. package/esm/midy-GM1.d.ts +32 -3
  5. package/esm/midy-GM1.d.ts.map +1 -1
  6. package/esm/midy-GM1.js +93 -87
  7. package/esm/midy-GM2.d.ts +56 -3
  8. package/esm/midy-GM2.d.ts.map +1 -1
  9. package/esm/midy-GM2.js +142 -126
  10. package/esm/midy-GMLite.d.ts +32 -3
  11. package/esm/midy-GMLite.d.ts.map +1 -1
  12. package/esm/midy-GMLite.js +91 -85
  13. package/esm/midy.d.ts +87 -4
  14. package/esm/midy.d.ts.map +1 -1
  15. package/esm/midy.js +234 -140
  16. package/package.json +1 -1
  17. package/script/deps/cdn.jsdelivr.net/npm/@marmooo/{soundfont-parser@0.0.4 → soundfont-parser@0.0.6}/+esm.d.ts +16 -20
  18. package/script/deps/cdn.jsdelivr.net/npm/@marmooo/soundfont-parser@0.0.6/+esm.d.ts.map +1 -0
  19. package/script/deps/cdn.jsdelivr.net/npm/@marmooo/soundfont-parser@0.0.6/+esm.js +190 -0
  20. package/script/midy-GM1.d.ts +32 -3
  21. package/script/midy-GM1.d.ts.map +1 -1
  22. package/script/midy-GM1.js +93 -87
  23. package/script/midy-GM2.d.ts +56 -3
  24. package/script/midy-GM2.d.ts.map +1 -1
  25. package/script/midy-GM2.js +142 -126
  26. package/script/midy-GMLite.d.ts +32 -3
  27. package/script/midy-GMLite.d.ts.map +1 -1
  28. package/script/midy-GMLite.js +91 -85
  29. package/script/midy.d.ts +87 -4
  30. package/script/midy.d.ts.map +1 -1
  31. package/script/midy.js +234 -140
  32. package/esm/deps/cdn.jsdelivr.net/npm/@marmooo/soundfont-parser@0.0.4/+esm.d.ts.map +0 -1
  33. package/esm/deps/cdn.jsdelivr.net/npm/@marmooo/soundfont-parser@0.0.4/+esm.js +0 -162
  34. package/script/deps/cdn.jsdelivr.net/npm/@marmooo/soundfont-parser@0.0.4/+esm.d.ts.map +0 -1
  35. package/script/deps/cdn.jsdelivr.net/npm/@marmooo/soundfont-parser@0.0.4/+esm.js +0 -169
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MidyGMLite = void 0;
4
4
  const _esm_js_1 = require("./deps/cdn.jsdelivr.net/npm/midi-file@1.2.4/+esm.js");
5
- const _esm_js_2 = require("./deps/cdn.jsdelivr.net/npm/@marmooo/soundfont-parser@0.0.4/+esm.js");
5
+ const _esm_js_2 = require("./deps/cdn.jsdelivr.net/npm/@marmooo/soundfont-parser@0.0.6/+esm.js");
6
6
  class Note {
7
7
  constructor(noteNumber, velocity, startTime, instrumentKey) {
8
8
  Object.defineProperty(this, "bufferSource", {
@@ -153,6 +153,7 @@ class MidyGMLite {
153
153
  });
154
154
  this.audioContext = audioContext;
155
155
  this.masterGain = new GainNode(audioContext);
156
+ this.controlChangeHandlers = this.createControlChangeHandlers();
156
157
  this.channels = this.createChannels(audioContext);
157
158
  this.masterGain.connect(audioContext.destination);
158
159
  this.GM1SystemOn();
@@ -423,12 +424,13 @@ class MidyGMLite {
423
424
  const now = this.audioContext.currentTime;
424
425
  const channel = this.channels[channelNumber];
425
426
  channel.scheduledNotes.forEach((noteList) => {
426
- noteList.forEach((note) => {
427
- if (note) {
428
- const promise = this.scheduleNoteRelease(channelNumber, note.noteNumber, velocity, now, stopPedal);
429
- this.notePromises.push(promise);
430
- }
431
- });
427
+ for (let i = 0; i < noteList.length; i++) {
428
+ const note = noteList[i];
429
+ if (!note)
430
+ continue;
431
+ const promise = this.scheduleNoteRelease(channelNumber, note.noteNumber, velocity, now, stopPedal);
432
+ this.notePromises.push(promise);
433
+ }
432
434
  });
433
435
  channel.scheduledNotes.clear();
434
436
  await Promise.all(this.notePromises);
@@ -519,7 +521,6 @@ class MidyGMLite {
519
521
  }
520
522
  setVolumeEnvelope(note) {
521
523
  const { instrumentKey, startTime } = note;
522
- note.volumeNode = new GainNode(this.audioContext, { gain: 0 });
523
524
  const attackVolume = this.cbToRatio(-instrumentKey.initialAttenuation);
524
525
  const sustainVolume = attackVolume * (1 - instrumentKey.volSustain);
525
526
  const volDelay = startTime + instrumentKey.volDelay;
@@ -527,6 +528,8 @@ class MidyGMLite {
527
528
  const volHold = volAttack + instrumentKey.volHold;
528
529
  const volDecay = volHold + instrumentKey.volDecay;
529
530
  note.volumeNode.gain
531
+ .cancelScheduledValues(startTime)
532
+ .setValueAtTime(0, startTime)
530
533
  .setValueAtTime(1e-6, volDelay) // exponentialRampToValueAtTime() requires a non-zero value
531
534
  .exponentialRampToValueAtTime(attackVolume, volAttack)
532
535
  .setValueAtTime(attackVolume, volHold)
@@ -550,29 +553,27 @@ class MidyGMLite {
550
553
  .setValueAtTime(peekPitch, modHold)
551
554
  .linearRampToValueAtTime(basePitch, modDecay);
552
555
  }
553
- setFilterNode(channel, note) {
554
- const { instrumentKey, noteNumber, startTime } = note;
555
- const softPedalFactor = 1 -
556
- (0.1 + (noteNumber / 127) * 0.2) * channel.softPedal;
557
- const maxFreq = this.audioContext.sampleRate / 2;
558
- const baseFreq = this.centToHz(instrumentKey.initialFilterFc) *
559
- softPedalFactor;
560
- const peekFreq = this.centToHz(instrumentKey.initialFilterFc + instrumentKey.modEnvToFilterFc) * softPedalFactor;
556
+ clampCutoffFrequency(frequency) {
557
+ const minFrequency = 20; // min Hz of initialFilterFc
558
+ const maxFrequency = 20000; // max Hz of initialFilterFc
559
+ return Math.max(minFrequency, Math.min(frequency, maxFrequency));
560
+ }
561
+ setFilterEnvelope(note) {
562
+ const { instrumentKey, startTime } = note;
563
+ const baseFreq = this.centToHz(instrumentKey.initialFilterFc);
564
+ const peekFreq = this.centToHz(instrumentKey.initialFilterFc + instrumentKey.modEnvToFilterFc);
561
565
  const sustainFreq = baseFreq +
562
566
  (peekFreq - baseFreq) * (1 - instrumentKey.modSustain);
563
- const adjustedBaseFreq = Math.min(maxFreq, baseFreq);
564
- const adjustedPeekFreq = Math.min(maxFreq, peekFreq);
565
- const adjustedSustainFreq = Math.min(maxFreq, sustainFreq);
567
+ const adjustedBaseFreq = this.clampCutoffFrequency(baseFreq);
568
+ const adjustedPeekFreq = this.clampCutoffFrequency(peekFreq);
569
+ const adjustedSustainFreq = this.clampCutoffFrequency(sustainFreq);
566
570
  const modDelay = startTime + instrumentKey.modDelay;
567
571
  const modAttack = modDelay + instrumentKey.modAttack;
568
572
  const modHold = modAttack + instrumentKey.modHold;
569
573
  const modDecay = modHold + instrumentKey.modDecay;
570
- note.filterNode = new BiquadFilterNode(this.audioContext, {
571
- type: "lowpass",
572
- Q: instrumentKey.initialFilterQ / 10, // dB
573
- frequency: adjustedBaseFreq,
574
- });
575
574
  note.filterNode.frequency
575
+ .cancelScheduledValues(startTime)
576
+ .setValueAtTime(adjustedBaseFreq, startTime)
576
577
  .setValueAtTime(adjustedBaseFreq, modDelay)
577
578
  .exponentialRampToValueAtTime(adjustedPeekFreq, modAttack)
578
579
  .setValueAtTime(adjustedPeekFreq, modHold)
@@ -609,8 +610,13 @@ class MidyGMLite {
609
610
  const semitoneOffset = this.calcSemitoneOffset(channel);
610
611
  const note = new Note(noteNumber, velocity, startTime, instrumentKey);
611
612
  note.bufferSource = await this.createNoteBufferNode(instrumentKey, isSF3);
612
- this.setFilterNode(channel, note);
613
+ note.volumeNode = new GainNode(this.audioContext);
614
+ note.filterNode = new BiquadFilterNode(this.audioContext, {
615
+ type: "lowpass",
616
+ Q: instrumentKey.initialFilterQ / 10 * channel.filterResonance, // dB
617
+ });
613
618
  this.setVolumeEnvelope(note);
619
+ this.setFilterEnvelope(note);
614
620
  if (0 < channel.modulationDepth) {
615
621
  this.setPitch(note, semitoneOffset);
616
622
  this.startModulation(channel, note, startTime);
@@ -631,7 +637,7 @@ class MidyGMLite {
631
637
  return;
632
638
  const soundFont = this.soundFonts[soundFontIndex];
633
639
  const isSF3 = soundFont.parsed.info.version.major === 3;
634
- const instrumentKey = soundFont.getInstrumentKey(bankNumber, channel.program, noteNumber);
640
+ const instrumentKey = soundFont.getInstrumentKey(bankNumber, channel.program, noteNumber, velocity);
635
641
  if (!instrumentKey)
636
642
  return;
637
643
  const note = await this.createNote(channel, instrumentKey, noteNumber, velocity, startTime, isSF3);
@@ -649,7 +655,7 @@ class MidyGMLite {
649
655
  const now = this.audioContext.currentTime;
650
656
  return this.scheduleNoteOn(channelNumber, noteNumber, velocity, now);
651
657
  }
652
- scheduleNoteRelease(channelNumber, noteNumber, velocity, stopTime, stopPedal = false) {
658
+ scheduleNoteRelease(channelNumber, noteNumber, _velocity, stopTime, stopPedal = false) {
653
659
  const channel = this.channels[channelNumber];
654
660
  if (stopPedal && channel.sustainPedal)
655
661
  return;
@@ -662,14 +668,11 @@ class MidyGMLite {
662
668
  continue;
663
669
  if (note.ending)
664
670
  continue;
665
- const velocityRate = (velocity + 127) / 127;
666
- const volEndTime = stopTime +
667
- note.instrumentKey.volRelease * velocityRate;
671
+ const volEndTime = stopTime + note.instrumentKey.volRelease;
668
672
  note.volumeNode.gain
669
673
  .cancelScheduledValues(stopTime)
670
674
  .linearRampToValueAtTime(0, volEndTime);
671
- const modRelease = stopTime +
672
- note.instrumentKey.modRelease * velocityRate;
675
+ const modRelease = stopTime + note.instrumentKey.modRelease;
673
676
  note.filterNode.frequency
674
677
  .cancelScheduledValues(stopTime)
675
678
  .linearRampToValueAtTime(0, modRelease);
@@ -683,12 +686,11 @@ class MidyGMLite {
683
686
  note.bufferSource.disconnect();
684
687
  note.volumeNode.disconnect();
685
688
  note.filterNode.disconnect();
686
- if (note.volumeDepth)
689
+ if (note.modulationDepth) {
687
690
  note.volumeDepth.disconnect();
688
- if (note.modulationDepth)
689
691
  note.modulationDepth.disconnect();
690
- if (note.modulationLFO)
691
692
  note.modulationLFO.stop();
693
+ }
692
694
  resolve();
693
695
  };
694
696
  note.bufferSource.stop(volEndTime);
@@ -705,13 +707,14 @@ class MidyGMLite {
705
707
  const promises = [];
706
708
  channel.sustainPedal = false;
707
709
  channel.scheduledNotes.forEach((noteList) => {
708
- noteList.forEach((note) => {
709
- if (note) {
710
- const { noteNumber } = note;
711
- const promise = this.releaseNote(channelNumber, noteNumber, velocity);
712
- promises.push(promise);
713
- }
714
- });
710
+ for (let i = 0; i < noteList.length; i++) {
711
+ const note = noteList[i];
712
+ if (!note)
713
+ continue;
714
+ const { noteNumber } = note;
715
+ const promise = this.releaseNote(channelNumber, noteNumber, velocity);
716
+ promises.push(promise);
717
+ }
715
718
  });
716
719
  return promises;
717
720
  }
@@ -749,47 +752,46 @@ class MidyGMLite {
749
752
  channel.pitchBendRange * 100;
750
753
  this.updateDetune(channel, detuneChange);
751
754
  }
755
+ createControlChangeHandlers() {
756
+ return {
757
+ 1: this.setModulationDepth,
758
+ 6: this.dataEntryMSB,
759
+ 7: this.setVolume,
760
+ 10: this.setPan,
761
+ 11: this.setExpression,
762
+ 38: this.dataEntryLSB,
763
+ 64: this.setSustainPedal,
764
+ 100: this.setRPNLSB,
765
+ 101: this.setRPNMSB,
766
+ 120: this.allSoundOff,
767
+ 121: this.resetAllControllers,
768
+ 123: this.allNotesOff,
769
+ };
770
+ }
752
771
  handleControlChange(channelNumber, controller, value) {
753
- switch (controller) {
754
- case 1:
755
- return this.setModulationDepth(channelNumber, value);
756
- case 6:
757
- return this.dataEntryMSB(channelNumber, value);
758
- case 7:
759
- return this.setVolume(channelNumber, value);
760
- case 10:
761
- return this.setPan(channelNumber, value);
762
- case 11:
763
- return this.setExpression(channelNumber, value);
764
- case 38:
765
- return this.dataEntryLSB(channelNumber, value);
766
- case 64:
767
- return this.setSustainPedal(channelNumber, value);
768
- case 100:
769
- return this.setRPNLSB(channelNumber, value);
770
- case 101:
771
- return this.setRPNMSB(channelNumber, value);
772
- case 120:
773
- return this.allSoundOff(channelNumber);
774
- case 121:
775
- return this.resetAllControllers(channelNumber);
776
- case 123:
777
- return this.allNotesOff(channelNumber);
778
- default:
779
- console.warn(`Unsupported Control change: controller=${controller} value=${value}`);
772
+ const handler = this.controlChangeHandlers[controller];
773
+ if (handler) {
774
+ handler.call(this, channelNumber, value);
775
+ }
776
+ else {
777
+ console.warn(`Unsupported Control change: controller=${controller} value=${value}`);
780
778
  }
781
779
  }
782
780
  updateModulation(channel) {
783
781
  const now = this.audioContext.currentTime;
784
- const activeNotes = this.getActiveNotes(channel, now);
785
- activeNotes.forEach((activeNote) => {
786
- if (activeNote.modulationDepth) {
787
- activeNote.modulationDepth.gain.setValueAtTime(channel.modulationDepth, now);
788
- }
789
- else {
790
- const semitoneOffset = this.calcSemitoneOffset(channel);
791
- this.setPitch(activeNote, semitoneOffset);
792
- this.startModulation(channel, activeNote, now);
782
+ channel.scheduledNotes.forEach((noteList) => {
783
+ for (let i = 0; i < noteList.length; i++) {
784
+ const note = noteList[i];
785
+ if (!note)
786
+ continue;
787
+ if (note.modulationDepth) {
788
+ note.modulationDepth.gain.setValueAtTime(channel.modulationDepth, now);
789
+ }
790
+ else {
791
+ const semitoneOffset = this.calcSemitoneOffset(channel);
792
+ this.setPitch(note, semitoneOffset);
793
+ this.startModulation(channel, note, now);
794
+ }
793
795
  }
794
796
  });
795
797
  }
@@ -865,13 +867,17 @@ class MidyGMLite {
865
867
  }
866
868
  updateDetune(channel, detuneChange) {
867
869
  const now = this.audioContext.currentTime;
868
- const activeNotes = this.getActiveNotes(channel, now);
869
- activeNotes.forEach((activeNote) => {
870
- const { bufferSource } = activeNote;
871
- const detune = bufferSource.detune.value + detuneChange;
872
- bufferSource.detune
873
- .cancelScheduledValues(now)
874
- .setValueAtTime(detune, now);
870
+ channel.scheduledNotes.forEach((noteList) => {
871
+ for (let i = 0; i < noteList.length; i++) {
872
+ const note = noteList[i];
873
+ if (!note)
874
+ continue;
875
+ const { bufferSource } = note;
876
+ const detune = bufferSource.detune.value + detuneChange;
877
+ bufferSource.detune
878
+ .cancelScheduledValues(now)
879
+ .setValueAtTime(detune, now);
880
+ }
875
881
  });
876
882
  }
877
883
  handlePitchBendRangeRPN(channelNumber) {
package/script/midy.d.ts CHANGED
@@ -4,6 +4,11 @@ export class Midy {
4
4
  volume: number;
5
5
  pan: number;
6
6
  portamentoTime: number;
7
+ filterResonance: number;
8
+ releaseTime: number;
9
+ attackTime: number;
10
+ brightness: number;
11
+ decayTime: number;
7
12
  reverbSendLevel: number;
8
13
  chorusSendLevel: number;
9
14
  vibratoRate: number;
@@ -92,6 +97,42 @@ export class Midy {
92
97
  };
93
98
  };
94
99
  masterGain: any;
100
+ controlChangeHandlers: {
101
+ 0: (channelNumber: any, msb: any) => void;
102
+ 1: (channelNumber: any, modulation: any) => void;
103
+ 5: (channelNumber: any, portamentoTime: any) => void;
104
+ 6: (channelNumber: any, value: any) => void;
105
+ 7: (channelNumber: any, volume: any) => void;
106
+ 10: (channelNumber: any, pan: any) => void;
107
+ 11: (channelNumber: any, expression: any) => void;
108
+ 32: (channelNumber: any, lsb: any) => void;
109
+ 38: (channelNumber: any, value: any) => void;
110
+ 64: (channelNumber: any, value: any) => void;
111
+ 65: (channelNumber: any, value: any) => void;
112
+ 66: (channelNumber: any, value: any) => void;
113
+ 67: (channelNumber: any, softPedal: any) => void;
114
+ 71: (channelNumber: any, filterResonance: any) => void;
115
+ 72: (channelNumber: any, releaseTime: any) => void;
116
+ 73: (channelNumber: any, attackTime: any) => void;
117
+ 74: (channelNumber: any, brightness: any) => void;
118
+ 75: (channelNumber: any, dacayTime: any) => void;
119
+ 76: (channelNumber: any, vibratoRate: any) => void;
120
+ 77: (channelNumber: any, vibratoDepth: any) => void;
121
+ 78: (channelNumber: any, vibratoDelay: any) => void;
122
+ 91: (channelNumber: any, reverbSendLevel: any) => void;
123
+ 93: (channelNumber: any, chorusSendLevel: any) => void;
124
+ 96: (channelNumber: any) => void;
125
+ 97: (channelNumber: any) => void;
126
+ 100: (channelNumber: any, value: any) => void;
127
+ 101: (channelNumber: any, value: any) => void;
128
+ 120: (channelNumber: any) => Promise<void>;
129
+ 121: (channelNumber: any) => void;
130
+ 123: (channelNumber: any) => Promise<void>;
131
+ 124: () => void;
132
+ 125: () => void;
133
+ 126: () => void;
134
+ 127: () => void;
135
+ };
95
136
  channels: any[];
96
137
  reverbEffect: {
97
138
  input: any;
@@ -165,16 +206,17 @@ export class Midy {
165
206
  centToHz(cent: any): number;
166
207
  calcSemitoneOffset(channel: any): any;
167
208
  calcPlaybackRate(instrumentKey: any, noteNumber: any, semitoneOffset: any): number;
168
- setVolumeEnvelope(note: any): void;
209
+ setVolumeEnvelope(channel: any, note: any): void;
169
210
  setPitch(note: any, semitoneOffset: any): void;
170
- setFilterNode(channel: any, note: any): void;
211
+ clampCutoffFrequency(frequency: any): number;
212
+ setFilterEnvelope(channel: any, note: any): void;
171
213
  startModulation(channel: any, note: any, startTime: any): void;
172
214
  startVibrato(channel: any, note: any, startTime: any): void;
173
215
  createNote(channel: any, instrumentKey: any, noteNumber: any, velocity: any, startTime: any, isSF3: any): Promise<Note>;
174
216
  calcBank(channel: any, channelNumber: any): any;
175
217
  scheduleNoteOn(channelNumber: any, noteNumber: any, velocity: any, startTime: any): Promise<void>;
176
218
  noteOn(channelNumber: any, noteNumber: any, velocity: any): Promise<void>;
177
- scheduleNoteRelease(channelNumber: any, noteNumber: any, velocity: any, stopTime: any, stopPedal?: boolean): Promise<any> | undefined;
219
+ scheduleNoteRelease(channelNumber: any, noteNumber: any, _velocity: any, stopTime: any, stopPedal?: boolean): Promise<any> | undefined;
178
220
  releaseNote(channelNumber: any, noteNumber: any, velocity: any): Promise<any> | undefined;
179
221
  releaseSustainPedal(channelNumber: any, halfVelocity: any): any[];
180
222
  releaseSostenutoPedal(channelNumber: any, halfVelocity: any): any[];
@@ -184,7 +226,43 @@ export class Midy {
184
226
  handleChannelPressure(channelNumber: any, pressure: any): void;
185
227
  handlePitchBendMessage(channelNumber: any, lsb: any, msb: any): void;
186
228
  setPitchBend(channelNumber: any, pitchBend: any): void;
187
- handleControlChange(channelNumber: any, controller: any, value: any): void | Promise<void>;
229
+ createControlChangeHandlers(): {
230
+ 0: (channelNumber: any, msb: any) => void;
231
+ 1: (channelNumber: any, modulation: any) => void;
232
+ 5: (channelNumber: any, portamentoTime: any) => void;
233
+ 6: (channelNumber: any, value: any) => void;
234
+ 7: (channelNumber: any, volume: any) => void;
235
+ 10: (channelNumber: any, pan: any) => void;
236
+ 11: (channelNumber: any, expression: any) => void;
237
+ 32: (channelNumber: any, lsb: any) => void;
238
+ 38: (channelNumber: any, value: any) => void;
239
+ 64: (channelNumber: any, value: any) => void;
240
+ 65: (channelNumber: any, value: any) => void;
241
+ 66: (channelNumber: any, value: any) => void;
242
+ 67: (channelNumber: any, softPedal: any) => void;
243
+ 71: (channelNumber: any, filterResonance: any) => void;
244
+ 72: (channelNumber: any, releaseTime: any) => void;
245
+ 73: (channelNumber: any, attackTime: any) => void;
246
+ 74: (channelNumber: any, brightness: any) => void;
247
+ 75: (channelNumber: any, dacayTime: any) => void;
248
+ 76: (channelNumber: any, vibratoRate: any) => void;
249
+ 77: (channelNumber: any, vibratoDepth: any) => void;
250
+ 78: (channelNumber: any, vibratoDelay: any) => void;
251
+ 91: (channelNumber: any, reverbSendLevel: any) => void;
252
+ 93: (channelNumber: any, chorusSendLevel: any) => void;
253
+ 96: (channelNumber: any) => void;
254
+ 97: (channelNumber: any) => void;
255
+ 100: (channelNumber: any, value: any) => void;
256
+ 101: (channelNumber: any, value: any) => void;
257
+ 120: (channelNumber: any) => Promise<void>;
258
+ 121: (channelNumber: any) => void;
259
+ 123: (channelNumber: any) => Promise<void>;
260
+ 124: () => void;
261
+ 125: () => void;
262
+ 126: () => void;
263
+ 127: () => void;
264
+ };
265
+ handleControlChange(channelNumber: any, controller: any, value: any): void;
188
266
  setBankMSB(channelNumber: any, msb: any): void;
189
267
  updateModulation(channel: any): void;
190
268
  setModulationDepth(channelNumber: any, modulation: any): void;
@@ -205,6 +283,11 @@ export class Midy {
205
283
  setChorusSendLevel(channelNumber: any, chorusSendLevel: any): void;
206
284
  setSostenutoPedal(channelNumber: any, value: any): void;
207
285
  setSoftPedal(channelNumber: any, softPedal: any): void;
286
+ setFilterResonance(channelNumber: any, filterResonance: any): void;
287
+ setReleaseTime(channelNumber: any, releaseTime: any): void;
288
+ setAttackTime(channelNumber: any, attackTime: any): void;
289
+ setBrightness(channelNumber: any, brightness: any): void;
290
+ setDecayTime(channelNumber: any, dacayTime: any): void;
208
291
  setVibratoRate(channelNumber: any, vibratoRate: any): void;
209
292
  setVibratoDepth(channelNumber: any, vibratoDepth: any): void;
210
293
  setVibratoDelay(channelNumber: any, vibratoDelay: any): void;
@@ -1 +1 @@
1
- {"version":3,"file":"midy.d.ts","sourceRoot":"","sources":["../src/midy.js"],"names":[],"mappings":"AAwBA;IAkCE;;;;;;;;;;;;;;;;;;;;MAoBE;IAEF;;;;;;;;;;;MAWE;IAEF;;;;;;;MAOE;IAgCF;;;;;OAWC;IAtHD,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;IA8ClB;;;;;MA4BE;IAGA,kBAAgC;IAChC;;;;;MAAqD;IACrD,gBAA4C;IAC5C,gBAAiD;IACjD;;;MAA8D;IAC9D;;;;;;;;MAAyD;IAO3D,4BAMC;IAED,mCASC;IAED,gDAMC;IAED,s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ED,oBAQC;IAED,yDAiDC;IAED,yCAGC;IAED,mCAQC;IAED,6CAGC;IAED,2CAMC;IAED,+CAGC;IAED,+CAMC;IAED,mDAeC;IAED,4CAOC;IAED,+BAKC;IAED,qDAiBC;IAED,gCAMC;IAED,kCAEC;IA6BD,4CAEC;IAED,4CAaC;IAED,+BAiBC;IAED,wFAKC;IAED,mCAQC;IAED,qCAEC;IAED,oCAUC;IAED,sCAEC;IAED,oCAaC;IAED,sCAEC;IAED,wCAWC;IAED,0CAEC;IAED,wCAEC;IAED,6BASC;IAED,0DAUC;CACF;AAv1DD;IAUE,gFAKC;IAdD,kBAAa;IACb,gBAAW;IACX,gBAAW;IACX,iBAAY;IACZ,mBAAc;IACd,qBAAgB;IAChB,gBAAW;IACX,kBAAa;IAGX,gBAA4B;IAC5B,cAAwB;IACxB,eAA0B;IAC1B,mBAAkC;CAErC"}
1
+ {"version":3,"file":"midy.d.ts","sourceRoot":"","sources":["../src/midy.js"],"names":[],"mappings":"AAwBA;IAkCE;;;;;;;;;;;;;;;;;;;;;;;;;MAyBE;IAEF;;;;;;;;;;;MAWE;IAEF;;;;;;;MAOE;IAgCF;;;;;OAYC;IA5HD,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;IAmDlB;;;;;MA4BE;IAGA,kBAAgC;IAChC;;;;;MAAqD;IACrD,gBAA4C;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA+D;IAC/D,gBAAiD;IACjD;;;MAA8D;IAC9D;;;;;;;;MAAyD;IAO3D,4BAMC;IA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