spessasynth_lib 3.20.15 → 3.20.17
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/@types/midi_parser/basic_midi.d.ts +3 -3
- package/midi_parser/basic_midi.js +20 -12
- package/midi_parser/midi_loader.js +47 -10
- package/package.json +1 -1
- package/soundfont/dls/read_articulation.js +1 -5
- package/soundfont/read_sf2/generators.js +13 -2
- package/synthetizer/worklet_processor.min.js +7 -7
- package/synthetizer/worklet_system/worklet_methods/program_control.js +1 -0
- package/synthetizer/worklet_system/worklet_utilities/volume_envelope.js +1 -1
|
@@ -184,6 +184,7 @@ export function clearSoundFont(sendPresets = true, clearOverride = true)
|
|
|
184
184
|
if(clearOverride)
|
|
185
185
|
{
|
|
186
186
|
delete this.overrideSoundfont;
|
|
187
|
+
this.overrideSoundfont = undefined;
|
|
187
188
|
}
|
|
188
189
|
this.defaultPreset = this.getPreset(0, 0);
|
|
189
190
|
this.drumPreset = this.getPreset(128, 0);
|
|
@@ -144,7 +144,7 @@ export class WorkletVolumeEnvelope
|
|
|
144
144
|
return Math.floor(timecentsToSeconds(tc) * env.sampleRate);
|
|
145
145
|
}
|
|
146
146
|
// calculate absolute times (they can change so we have to recalculate every time
|
|
147
|
-
env.attenuation = voice.modulatedGenerators[generatorTypes.initialAttenuation] / 10; // divide by ten to get decibelts
|
|
147
|
+
env.attenuation = Math.max(0, Math.min(voice.modulatedGenerators[generatorTypes.initialAttenuation], 1440)) / 10; // divide by ten to get decibelts
|
|
148
148
|
env.sustainDb = Math.min(100, voice.volumeEnvelope.attenuation + voice.modulatedGenerators[generatorTypes.sustainVolEnv] / 10);
|
|
149
149
|
|
|
150
150
|
// calculate durations
|