spessasynth_lib 3.12.0 → 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/rmidi_writer.js +5 -1
- 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
|
*/
|
|
@@ -60,6 +60,7 @@ export function writeRMIDI(soundfontBinary, mid, soundfont, bankOffset = 0, enco
|
|
|
60
60
|
consoleColors.value,
|
|
61
61
|
consoleColors.info,
|
|
62
62
|
consoleColors.value);
|
|
63
|
+
SpessaSynthInfo("metadata", metadata);
|
|
63
64
|
// add offset to bank. See wiki About-RMIDI
|
|
64
65
|
// also fix presets that don't exists since midiplayer6 doesn't seem to default to 0 when nonextistent...
|
|
65
66
|
let system = "gm";
|
|
@@ -284,7 +285,10 @@ export function writeRMIDI(soundfontBinary, mid, soundfont, bankOffset = 0, enco
|
|
|
284
285
|
*/
|
|
285
286
|
const infoContent = [getStringBytes("INFO")];
|
|
286
287
|
const encoder = new TextEncoder();
|
|
287
|
-
|
|
288
|
+
// software
|
|
289
|
+
infoContent.push(
|
|
290
|
+
writeRIFFOddSize(RMIDINFOChunks.software, encoder.encode("SpessaSynth"))
|
|
291
|
+
);
|
|
288
292
|
// name
|
|
289
293
|
if(metadata.name !== undefined)
|
|
290
294
|
{
|
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,
|