spessasynth_lib 3.24.13 → 3.24.15
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/midi_parser/basic_midi.js +457 -68
- package/midi_parser/midi_loader.js +18 -503
- package/midi_parser/midi_message.js +18 -5
- package/midi_parser/midi_sequence.js +2 -2
- package/package.json +1 -1
- package/sequencer/worklet_sequencer/process_event.js +1 -6
- package/synthetizer/synthetizer.js +9 -6
- package/synthetizer/worklet_processor.min.js +12 -12
- package/synthetizer/worklet_system/README.md +2 -2
- package/synthetizer/worklet_system/main_processor.js +106 -95
- package/synthetizer/worklet_system/message_protocol/handle_message.js +22 -17
- package/synthetizer/worklet_system/message_protocol/worklet_message.js +2 -1
- package/synthetizer/worklet_system/snapshot/apply_synthesizer_snapshot.js +14 -0
- package/synthetizer/worklet_system/snapshot/channel_snapshot.js +166 -0
- package/synthetizer/worklet_system/snapshot/send_synthesizer_snapshot.js +14 -0
- package/synthetizer/worklet_system/snapshot/synthesizer_snapshot.js +121 -0
- package/synthetizer/worklet_system/worklet_methods/controller_control/controller_change.js +196 -0
- package/synthetizer/worklet_system/worklet_methods/controller_control/master_parameters.js +34 -0
- package/synthetizer/worklet_system/worklet_methods/{reset_controllers.js → controller_control/reset_controllers.js} +33 -39
- package/synthetizer/worklet_system/worklet_methods/create_worklet_channel.js +26 -0
- package/synthetizer/worklet_system/worklet_methods/{data_entry.js → data_entry/data_entry_coarse.js} +38 -105
- package/synthetizer/worklet_system/worklet_methods/data_entry/data_entry_fine.js +64 -0
- package/synthetizer/worklet_system/worklet_methods/mute_channel.js +17 -0
- package/synthetizer/worklet_system/worklet_methods/note_on.js +36 -34
- package/synthetizer/worklet_system/worklet_methods/program_change.js +49 -0
- package/synthetizer/worklet_system/worklet_methods/{voice_control.js → render_voice.js} +37 -120
- package/synthetizer/worklet_system/worklet_methods/soundfont_management/clear_sound_font.js +35 -0
- package/synthetizer/worklet_system/worklet_methods/soundfont_management/get_preset.js +20 -0
- package/synthetizer/worklet_system/worklet_methods/soundfont_management/reload_sound_font.js +43 -0
- package/synthetizer/worklet_system/worklet_methods/soundfont_management/send_preset_list.js +31 -0
- package/synthetizer/worklet_system/worklet_methods/soundfont_management/set_embedded_sound_font.js +21 -0
- package/synthetizer/worklet_system/worklet_methods/stopping_notes/kill_note.js +19 -0
- package/synthetizer/worklet_system/worklet_methods/stopping_notes/note_off.js +51 -0
- package/synthetizer/worklet_system/worklet_methods/stopping_notes/stop_all_channels.js +16 -0
- package/synthetizer/worklet_system/worklet_methods/stopping_notes/stop_all_notes.js +30 -0
- package/synthetizer/worklet_system/worklet_methods/stopping_notes/voice_killing.js +63 -0
- package/synthetizer/worklet_system/worklet_methods/system_exclusive.js +31 -30
- package/synthetizer/worklet_system/worklet_methods/tuning_control/channel_pressure.js +24 -0
- package/synthetizer/worklet_system/worklet_methods/tuning_control/pitch_wheel.js +33 -0
- package/synthetizer/worklet_system/worklet_methods/tuning_control/poly_pressure.js +31 -0
- package/synthetizer/worklet_system/worklet_methods/tuning_control/set_master_tuning.js +15 -0
- package/synthetizer/worklet_system/worklet_methods/tuning_control/set_modulation_depth.js +27 -0
- package/synthetizer/worklet_system/worklet_methods/tuning_control/set_octave_tuning.js +15 -0
- package/synthetizer/worklet_system/worklet_methods/tuning_control/set_tuning.js +24 -0
- package/synthetizer/worklet_system/worklet_methods/tuning_control/set_tuning_semitones.js +19 -0
- package/synthetizer/worklet_system/worklet_methods/tuning_control/transpose_all_channels.js +15 -0
- package/synthetizer/worklet_system/worklet_methods/tuning_control/transpose_channel.js +31 -0
- package/synthetizer/worklet_system/worklet_utilities/controller_tables.js +10 -1
- package/synthetizer/worklet_system/worklet_utilities/lfo.js +2 -1
- package/synthetizer/worklet_system/worklet_utilities/modulation_envelope.js +4 -4
- package/synthetizer/worklet_system/worklet_utilities/modulator_curves.js +4 -5
- package/synthetizer/worklet_system/worklet_utilities/stereo_panner.js +18 -18
- package/synthetizer/worklet_system/worklet_utilities/wavetable_oscillator.js +210 -206
- package/synthetizer/worklet_system/worklet_utilities/worklet_processor_channel.js +354 -108
- package/synthetizer/worklet_system/worklet_utilities/worklet_voice.js +22 -9
- package/synthetizer/worklet_system/snapshot/snapshot.js +0 -311
- package/synthetizer/worklet_system/worklet_methods/controller_control.js +0 -260
- package/synthetizer/worklet_system/worklet_methods/note_off.js +0 -119
- package/synthetizer/worklet_system/worklet_methods/program_control.js +0 -282
- package/synthetizer/worklet_system/worklet_methods/tuning_control.js +0 -233
- package/synthetizer/worklet_system/worklet_methods/vibrato_control.js +0 -29
package/package.json
CHANGED
|
@@ -3,7 +3,6 @@ import { WorkletSequencerReturnMessageType } from "./sequencer_message.js";
|
|
|
3
3
|
import { consoleColors } from "../../utils/other.js";
|
|
4
4
|
import { SpessaSynthWarn } from "../../utils/loggin.js";
|
|
5
5
|
import { readBytesAsUintBigEndian } from "../../utils/byte_functions/big_endian.js";
|
|
6
|
-
import { DEFAULT_PERCUSSION } from "../../synthetizer/synthetizer.js";
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* Processes a single event
|
|
@@ -143,7 +142,7 @@ export function _processEvent(event, trackIndex)
|
|
|
143
142
|
))
|
|
144
143
|
{
|
|
145
144
|
lyricsIndex = Math.min(
|
|
146
|
-
this.midiData.lyricsTicks.indexOf(event.ticks)
|
|
145
|
+
this.midiData.lyricsTicks.indexOf(event.ticks),
|
|
147
146
|
this.midiData.lyricsTicks.length
|
|
148
147
|
);
|
|
149
148
|
sentStatus = messageTypes.lyric;
|
|
@@ -190,9 +189,5 @@ export function _addNewMidiPort()
|
|
|
190
189
|
for (let i = 0; i < 16; i++)
|
|
191
190
|
{
|
|
192
191
|
this.synth.createWorkletChannel(true);
|
|
193
|
-
if (i === DEFAULT_PERCUSSION)
|
|
194
|
-
{
|
|
195
|
-
this.synth.setDrums(this.synth.workletProcessorChannels.length - 1, true);
|
|
196
|
-
}
|
|
197
192
|
}
|
|
198
193
|
}
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
import { SpessaSynthInfo, SpessaSynthWarn } from "../utils/loggin.js";
|
|
14
14
|
import { DEFAULT_SYNTH_CONFIG } from "./audio_effects/effects_config.js";
|
|
15
15
|
import { SoundfontManager } from "./synth_soundfont_manager.js";
|
|
16
|
-
import { channelConfiguration } from "./worklet_system/worklet_utilities/worklet_processor_channel.js";
|
|
17
16
|
import { KeyModifierManager } from "./key_modifier_manager.js";
|
|
17
|
+
import { channelConfiguration } from "./worklet_system/worklet_utilities/controller_tables.js";
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -407,7 +407,7 @@ export class Synthetizer
|
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
/**
|
|
410
|
-
* Adds a new channel to the synthesizer
|
|
410
|
+
* Adds a new channel to the synthesizer.
|
|
411
411
|
* @param postMessage {boolean} leave at true, set to false only at initialization.
|
|
412
412
|
*/
|
|
413
413
|
addNewChannel(postMessage = true)
|
|
@@ -545,7 +545,7 @@ export class Synthetizer
|
|
|
545
545
|
* @param channel {number} usually 0-15: the channel to change the controller.
|
|
546
546
|
* @param controllerNumber {number} 0-127 the MIDI CC number.
|
|
547
547
|
* @param controllerValue {number} 0-127 the controller value.
|
|
548
|
-
* @param force {boolean} forces the controller
|
|
548
|
+
* @param force {boolean} forces the controller-change message, even if it's locked or gm system is set and the cc is bank select.
|
|
549
549
|
*/
|
|
550
550
|
controllerChange(channel, controllerNumber, controllerValue, force = false)
|
|
551
551
|
{
|
|
@@ -632,7 +632,8 @@ export class Synthetizer
|
|
|
632
632
|
|
|
633
633
|
/**
|
|
634
634
|
* Transposes the synthetizer's pitch by given semitones amount (percussion channels don’t get affected).
|
|
635
|
-
* @param semitones {number} the semitones to transpose by.
|
|
635
|
+
* @param semitones {number} the semitones to transpose by.
|
|
636
|
+
* It can be a floating point number for more precision.
|
|
636
637
|
*/
|
|
637
638
|
transpose(semitones)
|
|
638
639
|
{
|
|
@@ -640,9 +641,9 @@ export class Synthetizer
|
|
|
640
641
|
}
|
|
641
642
|
|
|
642
643
|
/**
|
|
643
|
-
* Transposes the channel by given
|
|
644
|
+
* Transposes the channel by given number of semitones.
|
|
644
645
|
* @param channel {number} the channel number.
|
|
645
|
-
* @param semitones {number} the transposition of the channel, can be a float.
|
|
646
|
+
* @param semitones {number} the transposition of the channel, it can be a float.
|
|
646
647
|
* @param force {boolean} defaults to false, if true transposes the channel even if it's a drum channel.
|
|
647
648
|
*/
|
|
648
649
|
transposeChannel(channel, semitones, force = false)
|
|
@@ -931,6 +932,7 @@ export class Synthetizer
|
|
|
931
932
|
*/
|
|
932
933
|
setEffectsGain(reverbGain, chorusGain)
|
|
933
934
|
{
|
|
935
|
+
// noinspection JSCheckFunctionSignatures
|
|
934
936
|
this.post({
|
|
935
937
|
messageType: workletMessageType.setEffectsGain,
|
|
936
938
|
messageData: [reverbGain, chorusGain]
|
|
@@ -944,6 +946,7 @@ export class Synthetizer
|
|
|
944
946
|
{
|
|
945
947
|
this.reverbProcessor.disconnect();
|
|
946
948
|
this.chorusProcessor.delete();
|
|
949
|
+
// noinspection JSCheckFunctionSignatures
|
|
947
950
|
this.post({
|
|
948
951
|
messageType: workletMessageType.destroyWorklet,
|
|
949
952
|
messageData: undefined
|