spessasynth_lib 3.24.8 → 3.24.9
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/README.md +2 -2
- package/package.json +1 -1
- package/sequencer/worklet_sequencer/process_tick.js +5 -2
- package/sequencer/worklet_sequencer/worklet_sequencer.js +5 -4
- package/synthetizer/worklet_processor.min.js +9 -9
- package/synthetizer/worklet_system/main_processor.js +11 -27
- package/synthetizer/worklet_system/message_protocol/README.md +13 -0
- package/synthetizer/worklet_system/message_protocol/handle_message.js +1 -0
- package/synthetizer/worklet_system/worklet_methods/note_on.js +1 -4
- package/synthetizer/worklet_system/worklet_methods/voice_control.js +0 -2
- package/synthetizer/worklet_system/worklet_utilities/lowpass_filter.js +72 -46
- package/synthetizer/worklet_system/worklet_utilities/stereo_panner.js +57 -31
- package/synthetizer/worklet_system/worklet_utilities/worklet_voice.js +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# spessasynth_lib
|
|
2
2
|
|
|
3
|
-
**A powerful
|
|
3
|
+
**A powerful SF2/DLS/MIDI JavaScript library for the browsers.**
|
|
4
4
|
|
|
5
5
|
```shell
|
|
6
6
|
npm install --save spessasynth_lib
|
|
@@ -134,5 +134,5 @@ document.getElementById("button").onclick = async () =>
|
|
|
134
134
|
- *That's right, saving as WAV is also [just one function!](https://github.com/spessasus/SpessaSynth/wiki/Writing-Wave-Files#audiobuffertowav)*
|
|
135
135
|
|
|
136
136
|
# License
|
|
137
|
-
|
|
137
|
+
Copyright © 2025 Spessasus
|
|
138
138
|
MIT License, except for the stbvorbis_sync.js in the `externals` folder which is licensed under the Apache-2.0 license.
|
package/package.json
CHANGED
|
@@ -2,11 +2,14 @@ import { WorkletSequencerReturnMessageType } from "./sequencer_message.js";
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Processes a single tick
|
|
5
|
-
* @private
|
|
6
5
|
* @this {WorkletSequencer}
|
|
7
6
|
*/
|
|
8
|
-
export function
|
|
7
|
+
export function processTick()
|
|
9
8
|
{
|
|
9
|
+
if (!this.isActive)
|
|
10
|
+
{
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
10
13
|
let current = this.currentTime;
|
|
11
14
|
while (this.playedTime < current)
|
|
12
15
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WorkletSequencerReturnMessageType } from "./sequencer_message.js";
|
|
2
2
|
import { _addNewMidiPort, _processEvent } from "./process_event.js";
|
|
3
|
-
import { _findFirstEventIndex,
|
|
3
|
+
import { _findFirstEventIndex, processTick } from "./process_tick.js";
|
|
4
4
|
import { assignMIDIPort, loadNewSequence, loadNewSongList, nextSong, previousSong } from "./song_control.js";
|
|
5
5
|
import { _playTo, _recalculateStartTime, play, setTimeTicks } from "./play.js";
|
|
6
6
|
import { messageTypes, midiControllers } from "../../midi_parser/midi_message.js";
|
|
@@ -25,6 +25,7 @@ class WorkletSequencer
|
|
|
25
25
|
{
|
|
26
26
|
this.synth = spessasynthProcessor;
|
|
27
27
|
this.ignoreEvents = false;
|
|
28
|
+
this.isActive = false;
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
31
|
* If the event should instead be sent back to the main thread instead of synth
|
|
@@ -236,12 +237,12 @@ class WorkletSequencer
|
|
|
236
237
|
|
|
237
238
|
setProcessHandler()
|
|
238
239
|
{
|
|
239
|
-
this.
|
|
240
|
+
this.isActive = true;
|
|
240
241
|
}
|
|
241
242
|
|
|
242
243
|
clearProcessHandler()
|
|
243
244
|
{
|
|
244
|
-
this.
|
|
245
|
+
this.isActive = false;
|
|
245
246
|
}
|
|
246
247
|
}
|
|
247
248
|
|
|
@@ -258,7 +259,7 @@ WorkletSequencer.prototype.processMessage = processMessage;
|
|
|
258
259
|
|
|
259
260
|
WorkletSequencer.prototype._processEvent = _processEvent;
|
|
260
261
|
WorkletSequencer.prototype._addNewMidiPort = _addNewMidiPort;
|
|
261
|
-
WorkletSequencer.prototype.
|
|
262
|
+
WorkletSequencer.prototype.processTick = processTick;
|
|
262
263
|
WorkletSequencer.prototype._findFirstEventIndex = _findFirstEventIndex;
|
|
263
264
|
|
|
264
265
|
WorkletSequencer.prototype.loadNewSequence = loadNewSequence;
|