spessasynth_lib 3.12.2 → 3.12.3
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/used_keys_loaded.d.ts +1 -0
- package/@types/synthetizer/worklet_system/worklet_utilities/worklet_processor_channel.d.ts +5 -0
- package/midi_parser/used_keys_loaded.js +1 -0
- package/package.json +1 -1
- package/sequencer/worklet_sequencer/song_control.js +8 -3
- package/synthetizer/worklet_processor.min.js +6 -6
- package/synthetizer/worklet_system/main_processor.js +11 -2
- package/synthetizer/worklet_system/worklet_methods/note_on.js +14 -8
- package/synthetizer/worklet_system/worklet_methods/program_control.js +121 -26
- package/synthetizer/worklet_system/worklet_methods/reset_controllers.js +1 -0
- package/synthetizer/worklet_system/worklet_utilities/wavetable_oscillator.js +4 -0
- package/synthetizer/worklet_system/worklet_utilities/worklet_processor_channel.js +2 -0
- package/synthetizer/worklet_system/worklet_utilities/worklet_voice.js +6 -3
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
* @property {Preset} preset - the channel's preset
|
|
17
17
|
* @property {boolean} lockPreset - indicates whether the program on the channel is locked
|
|
18
|
+
* @property {boolean} presetUsesOverride - indcates if the channel uses a preset from the override soundfont.
|
|
18
19
|
*
|
|
19
20
|
* @property {boolean} lockVibrato - indicates whether the custom vibrato is locked
|
|
20
21
|
* @property {Object} channelVibrato - vibrato settings for the channel
|
|
@@ -103,6 +104,10 @@ export type WorkletProcessorChannel = {
|
|
|
103
104
|
* - indicates whether the program on the channel is locked
|
|
104
105
|
*/
|
|
105
106
|
lockPreset: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* - indcates if the channel uses a preset from the override soundfont.
|
|
109
|
+
*/
|
|
110
|
+
presetUsesOverride: boolean;
|
|
106
111
|
/**
|
|
107
112
|
* - indicates whether the custom vibrato is locked
|
|
108
113
|
*/
|
package/package.json
CHANGED
|
@@ -57,14 +57,19 @@ export function loadNewSequence(parsedMidi)
|
|
|
57
57
|
if(this.midiData.embeddedSoundFont !== undefined)
|
|
58
58
|
{
|
|
59
59
|
SpessaSynthInfo("%cEmbedded soundfont detected! Using it.", consoleColors.recognized);
|
|
60
|
-
this.synth.reloadSoundFont(this.midiData.embeddedSoundFont);
|
|
61
60
|
// set offet
|
|
62
61
|
this.synth.soundfontBankOffset = this.midiData.bankOffset;
|
|
62
|
+
this.synth.reloadSoundFont(this.midiData.embeddedSoundFont, true);
|
|
63
63
|
// preload all samples
|
|
64
|
-
this.synth.
|
|
64
|
+
this.synth.overrideSoundfont.samples.forEach(s => s.getAudioData());
|
|
65
65
|
}
|
|
66
66
|
else
|
|
67
67
|
{
|
|
68
|
+
if(this.synth.overrideSoundfont)
|
|
69
|
+
{
|
|
70
|
+
// clean up the emdeeded soundfont
|
|
71
|
+
this.synth.clearSoundFont();
|
|
72
|
+
}
|
|
68
73
|
SpessaSynthGroupCollapsed("%cPreloading samples...", consoleColors.info);
|
|
69
74
|
// smart preloading: load only samples used in the midi!
|
|
70
75
|
const used = getUsedProgramsAndKeys(this.midiData, this.synth.soundfont);
|
|
@@ -72,7 +77,7 @@ export function loadNewSequence(parsedMidi)
|
|
|
72
77
|
{
|
|
73
78
|
const bank = parseInt(programBank.split(":")[0]);
|
|
74
79
|
const program = parseInt(programBank.split(":")[1]);
|
|
75
|
-
const preset = this.synth.
|
|
80
|
+
const preset = this.synth.getPreset(bank, program);
|
|
76
81
|
SpessaSynthInfo(`%cPreloading used samples on %c${preset.presetName}%c...`,
|
|
77
82
|
consoleColors.info,
|
|
78
83
|
consoleColors.recognized,
|