spessasynth_lib 3.24.13 → 3.24.16
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 +13 -7
- 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 +20 -0
- package/synthetizer/worklet_system/worklet_methods/stopping_notes/note_off.js +55 -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
|
/**
|
|
@@ -275,7 +275,10 @@ export class Synthetizer
|
|
|
275
275
|
set highPerformanceMode(value)
|
|
276
276
|
{
|
|
277
277
|
this._highPerformanceMode = value;
|
|
278
|
-
|
|
278
|
+
this.post({
|
|
279
|
+
messageType: workletMessageType.highPerformanceMode,
|
|
280
|
+
messageData: value
|
|
281
|
+
});
|
|
279
282
|
}
|
|
280
283
|
|
|
281
284
|
/**
|
|
@@ -407,7 +410,7 @@ export class Synthetizer
|
|
|
407
410
|
}
|
|
408
411
|
|
|
409
412
|
/**
|
|
410
|
-
* Adds a new channel to the synthesizer
|
|
413
|
+
* Adds a new channel to the synthesizer.
|
|
411
414
|
* @param postMessage {boolean} leave at true, set to false only at initialization.
|
|
412
415
|
*/
|
|
413
416
|
addNewChannel(postMessage = true)
|
|
@@ -545,7 +548,7 @@ export class Synthetizer
|
|
|
545
548
|
* @param channel {number} usually 0-15: the channel to change the controller.
|
|
546
549
|
* @param controllerNumber {number} 0-127 the MIDI CC number.
|
|
547
550
|
* @param controllerValue {number} 0-127 the controller value.
|
|
548
|
-
* @param force {boolean} forces the controller
|
|
551
|
+
* @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
552
|
*/
|
|
550
553
|
controllerChange(channel, controllerNumber, controllerValue, force = false)
|
|
551
554
|
{
|
|
@@ -632,7 +635,8 @@ export class Synthetizer
|
|
|
632
635
|
|
|
633
636
|
/**
|
|
634
637
|
* Transposes the synthetizer's pitch by given semitones amount (percussion channels don’t get affected).
|
|
635
|
-
* @param semitones {number} the semitones to transpose by.
|
|
638
|
+
* @param semitones {number} the semitones to transpose by.
|
|
639
|
+
* It can be a floating point number for more precision.
|
|
636
640
|
*/
|
|
637
641
|
transpose(semitones)
|
|
638
642
|
{
|
|
@@ -640,9 +644,9 @@ export class Synthetizer
|
|
|
640
644
|
}
|
|
641
645
|
|
|
642
646
|
/**
|
|
643
|
-
* Transposes the channel by given
|
|
647
|
+
* Transposes the channel by given number of semitones.
|
|
644
648
|
* @param channel {number} the channel number.
|
|
645
|
-
* @param semitones {number} the transposition of the channel, can be a float.
|
|
649
|
+
* @param semitones {number} the transposition of the channel, it can be a float.
|
|
646
650
|
* @param force {boolean} defaults to false, if true transposes the channel even if it's a drum channel.
|
|
647
651
|
*/
|
|
648
652
|
transposeChannel(channel, semitones, force = false)
|
|
@@ -931,6 +935,7 @@ export class Synthetizer
|
|
|
931
935
|
*/
|
|
932
936
|
setEffectsGain(reverbGain, chorusGain)
|
|
933
937
|
{
|
|
938
|
+
// noinspection JSCheckFunctionSignatures
|
|
934
939
|
this.post({
|
|
935
940
|
messageType: workletMessageType.setEffectsGain,
|
|
936
941
|
messageData: [reverbGain, chorusGain]
|
|
@@ -944,6 +949,7 @@ export class Synthetizer
|
|
|
944
949
|
{
|
|
945
950
|
this.reverbProcessor.disconnect();
|
|
946
951
|
this.chorusProcessor.delete();
|
|
952
|
+
// noinspection JSCheckFunctionSignatures
|
|
947
953
|
this.post({
|
|
948
954
|
messageType: workletMessageType.destroyWorklet,
|
|
949
955
|
messageData: undefined
|