spessasynth_lib 3.25.4 → 3.25.5
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
CHANGED
|
@@ -55,7 +55,7 @@ Supported formats list:
|
|
|
55
55
|
- **Easy to Use:** *Basic setup is just [two lines of code!](https://github.com/spessasus/SpessaSynth/wiki/Usage-As-Library#minimal-setup)*
|
|
56
56
|
- **No dependencies:** *Batteries included!*
|
|
57
57
|
|
|
58
|
-
### Powerful Synthesizer
|
|
58
|
+
### Powerful MIDI Synthesizer
|
|
59
59
|
- Suitable for both **real-time** and **offline** synthesis
|
|
60
60
|
- **Excellent SoundFont support:**
|
|
61
61
|
- **Full Generator Support**
|
package/package.json
CHANGED
|
@@ -20,8 +20,9 @@ export const DLSSources = {
|
|
|
20
20
|
volume: 0x87,
|
|
21
21
|
pan: 0x8a,
|
|
22
22
|
expression: 0x8b,
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
// note: these are flipped unintentionally in DLS2 table 9. Argh!
|
|
24
|
+
chorus: 0xdd,
|
|
25
|
+
reverb: 0xdb,
|
|
25
26
|
|
|
26
27
|
pitchWheelRange: 0x100,
|
|
27
28
|
fineTune: 0x101,
|
|
@@ -155,6 +155,9 @@ export class Synthetizer
|
|
|
155
155
|
return new AudioWorkletNode(ctx, name, opts);
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* @type {AudioWorkletNode}
|
|
160
|
+
*/
|
|
158
161
|
this.worklet = workletConstructor(this.context, WORKLET_PROCESSOR_NAME, {
|
|
159
162
|
outputChannelCount: processorChannelCount,
|
|
160
163
|
numberOfOutputs: processorOutputsCount,
|
|
@@ -526,6 +529,24 @@ export class Synthetizer
|
|
|
526
529
|
}
|
|
527
530
|
}
|
|
528
531
|
|
|
532
|
+
/**
|
|
533
|
+
* Disconnects the individual audio outputs to the given audio nodes. In the app, it's used by the renderer.
|
|
534
|
+
* @param audioNodes {AudioNode[]}
|
|
535
|
+
*/
|
|
536
|
+
disconnectIndividualOutputs(audioNodes)
|
|
537
|
+
{
|
|
538
|
+
if (audioNodes.length !== this._outputsAmount)
|
|
539
|
+
{
|
|
540
|
+
throw new Error(`input nodes amount differs from the system's outputs amount!
|
|
541
|
+
Expected ${this._outputsAmount} got ${audioNodes.length}`);
|
|
542
|
+
}
|
|
543
|
+
for (let outputNumber = 0; outputNumber < this._outputsAmount; outputNumber++)
|
|
544
|
+
{
|
|
545
|
+
// + 2 because chorus and reverb come first!
|
|
546
|
+
this.worklet.disconnect(audioNodes[outputNumber], outputNumber + 2);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
529
550
|
/*
|
|
530
551
|
* Disables the GS NRPN parameters like vibrato or drum key tuning.
|
|
531
552
|
*/
|