spessasynth_lib 3.24.25 → 3.24.26
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/midi_message.js +4 -4
- package/package.json +1 -1
- package/sequencer/worklet_sequencer/play.js +26 -1
- package/synthetizer/worklet_processor.min.js +11 -11
- package/synthetizer/worklet_system/message_protocol/handle_message.js +3 -2
- package/synthetizer/worklet_system/snapshot/channel_snapshot.js +0 -7
- package/synthetizer/worklet_system/worklet_methods/controller_control/controller_change.js +14 -7
- package/synthetizer/worklet_system/worklet_methods/controller_control/reset_controllers.js +67 -21
- package/synthetizer/worklet_system/worklet_methods/data_entry/data_entry_coarse.js +105 -71
- package/synthetizer/worklet_system/worklet_methods/data_entry/data_entry_fine.js +4 -2
- package/synthetizer/worklet_system/worklet_methods/render_voice.js +0 -1
- package/synthetizer/worklet_system/worklet_methods/tuning_control/set_tuning.js +5 -2
- package/synthetizer/worklet_system/worklet_utilities/controller_tables.js +9 -4
- package/synthetizer/worklet_system/worklet_utilities/worklet_processor_channel.js +11 -33
- package/synthetizer/worklet_system/worklet_methods/tuning_control/set_tuning_semitones.js +0 -19
|
@@ -4,14 +4,17 @@ import {
|
|
|
4
4
|
customControllers,
|
|
5
5
|
dataEntryStates
|
|
6
6
|
} from "./controller_tables.js";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
resetControllers,
|
|
9
|
+
resetControllersRP15Compliant,
|
|
10
|
+
resetParameters
|
|
11
|
+
} from "../worklet_methods/controller_control/reset_controllers.js";
|
|
8
12
|
import { renderVoice } from "../worklet_methods/render_voice.js";
|
|
9
13
|
import { panVoice } from "./stereo_panner.js";
|
|
10
14
|
import { killNote } from "../worklet_methods/stopping_notes/kill_note.js";
|
|
11
15
|
import { setTuning } from "../worklet_methods/tuning_control/set_tuning.js";
|
|
12
16
|
import { setModulationDepth } from "../worklet_methods/tuning_control/set_modulation_depth.js";
|
|
13
17
|
import { dataEntryFine } from "../worklet_methods/data_entry/data_entry_fine.js";
|
|
14
|
-
import { setTuningSemitones } from "../worklet_methods/tuning_control/set_tuning_semitones.js";
|
|
15
18
|
import { controllerChange } from "../worklet_methods/controller_control/controller_change.js";
|
|
16
19
|
import { stopAllNotes } from "../worklet_methods/stopping_notes/stop_all_notes.js";
|
|
17
20
|
import { muteChannel } from "../worklet_methods/mute_channel.js";
|
|
@@ -74,13 +77,6 @@ class WorkletProcessorChannel
|
|
|
74
77
|
*/
|
|
75
78
|
channelTuningCents = 0;
|
|
76
79
|
|
|
77
|
-
/**
|
|
78
|
-
* An array representing the tuning of individual keys in cents.
|
|
79
|
-
* Each index corresponds to a MIDI note number (0-127).
|
|
80
|
-
* @type {Int16Array}
|
|
81
|
-
*/
|
|
82
|
-
keyCentTuning = new Int16Array(128);
|
|
83
|
-
|
|
84
80
|
/**
|
|
85
81
|
* Indicates whether the sustain (hold) pedal is active.
|
|
86
82
|
* @type {boolean}
|
|
@@ -111,24 +107,6 @@ class WorkletProcessorChannel
|
|
|
111
107
|
*/
|
|
112
108
|
dataEntryState = dataEntryStates.Idle;
|
|
113
109
|
|
|
114
|
-
/**
|
|
115
|
-
* The current coarse value of the Non-Registered Parameter (NRPN).
|
|
116
|
-
* @type {number}
|
|
117
|
-
*/
|
|
118
|
-
NRPCoarse = 0;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* The current fine value of the Non-Registered Parameter (NRPN).
|
|
122
|
-
* @type {number}
|
|
123
|
-
*/
|
|
124
|
-
NRPFine = 0;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* The current value of the Registered Parameter (RP).
|
|
128
|
-
* @type {number}
|
|
129
|
-
*/
|
|
130
|
-
RPValue = 0;
|
|
131
|
-
|
|
132
110
|
/**
|
|
133
111
|
* The bank number of the channel (used for patch changes).
|
|
134
112
|
* @type {number}
|
|
@@ -223,11 +201,11 @@ class WorkletProcessorChannel
|
|
|
223
201
|
|
|
224
202
|
updateChannelTuning()
|
|
225
203
|
{
|
|
226
|
-
this.channelTuningCents =
|
|
227
|
-
|
|
228
|
-
+ this.customControllers[customControllers.channelTransposeFine]
|
|
229
|
-
+ this.customControllers[customControllers.masterTuning]
|
|
230
|
-
+ this.customControllers[customControllers.channelTuningSemitones] * 100; // RPN channel coarse tuning
|
|
204
|
+
this.channelTuningCents =
|
|
205
|
+
this.customControllers[customControllers.channelTuning] // RPN channel fine tuning
|
|
206
|
+
+ this.customControllers[customControllers.channelTransposeFine] // user tuning (transpose)
|
|
207
|
+
+ this.customControllers[customControllers.masterTuning] // master tuning, set by sysEx
|
|
208
|
+
+ (this.customControllers[customControllers.channelTuningSemitones] * 100); // RPN channel coarse tuning
|
|
231
209
|
}
|
|
232
210
|
|
|
233
211
|
/**
|
|
@@ -371,7 +349,6 @@ WorkletProcessorChannel.prototype.programChange = programChange;
|
|
|
371
349
|
|
|
372
350
|
// Tuning
|
|
373
351
|
WorkletProcessorChannel.prototype.setTuning = setTuning;
|
|
374
|
-
WorkletProcessorChannel.prototype.setTuningSemitones = setTuningSemitones;
|
|
375
352
|
WorkletProcessorChannel.prototype.setOctaveTuning = setOctaveTuning;
|
|
376
353
|
WorkletProcessorChannel.prototype.setModulationDepth = setModulationDepth;
|
|
377
354
|
WorkletProcessorChannel.prototype.transposeChannel = transposeChannel;
|
|
@@ -379,6 +356,7 @@ WorkletProcessorChannel.prototype.transposeChannel = transposeChannel;
|
|
|
379
356
|
// CC
|
|
380
357
|
WorkletProcessorChannel.prototype.controllerChange = controllerChange;
|
|
381
358
|
WorkletProcessorChannel.prototype.resetControllers = resetControllers;
|
|
359
|
+
WorkletProcessorChannel.prototype.resetControllersRP15Compliant = resetControllersRP15Compliant;
|
|
382
360
|
WorkletProcessorChannel.prototype.resetParameters = resetParameters;
|
|
383
361
|
WorkletProcessorChannel.prototype.dataEntryFine = dataEntryFine;
|
|
384
362
|
WorkletProcessorChannel.prototype.dataEntryCoarse = dataEntryCoarse;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { customControllers } from "../../worklet_utilities/controller_tables.js";
|
|
2
|
-
import { SpessaSynthInfo } from "../../../../utils/loggin.js";
|
|
3
|
-
import { consoleColors } from "../../../../utils/other.js";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Sets the channel's tuning in semitones
|
|
7
|
-
* @param semitones {number}
|
|
8
|
-
* @this {WorkletProcessorChannel}
|
|
9
|
-
*/
|
|
10
|
-
export function setTuningSemitones(semitones)
|
|
11
|
-
{
|
|
12
|
-
semitones = Math.round(semitones);
|
|
13
|
-
this.setCustomController(customControllers.channelTuningSemitones, semitones);
|
|
14
|
-
SpessaSynthInfo(
|
|
15
|
-
`%cChannel ${this.channelNumber} coarse tuning. Semitones: %c${semitones}`,
|
|
16
|
-
consoleColors.info,
|
|
17
|
-
consoleColors.value
|
|
18
|
-
);
|
|
19
|
-
}
|