spessasynth_core 4.2.5 → 4.2.6
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/dist/index.d.ts +37 -10
- package/dist/index.js +540 -495
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -135,8 +135,12 @@ declare const generatorTypes: Readonly<{
|
|
|
135
135
|
readonly overridingRootKey: 58;
|
|
136
136
|
readonly unused5: 59;
|
|
137
137
|
readonly endOper: 60;
|
|
138
|
-
readonly
|
|
139
|
-
readonly
|
|
138
|
+
readonly amplitude: 61;
|
|
139
|
+
readonly vibLfoRate: 62;
|
|
140
|
+
readonly vibLfoAmplitudeDepth: 63;
|
|
141
|
+
readonly vibLfoToFilterFc: 64;
|
|
142
|
+
readonly modLfoRate: 65;
|
|
143
|
+
readonly modLfoAmplitudeDepth: 66;
|
|
140
144
|
}>;
|
|
141
145
|
type GeneratorType = (typeof generatorTypes)[keyof typeof generatorTypes];
|
|
142
146
|
declare const GENERATORS_AMOUNT: number;
|
|
@@ -422,10 +426,9 @@ declare class VolumeEnvelope {
|
|
|
422
426
|
* @param sampleCount the amount of samples to write
|
|
423
427
|
* @param buffer the audio buffer to modify
|
|
424
428
|
* @param gainTarget the gain target to smooth.
|
|
425
|
-
* @param centibelOffset the centibel offset to apply.
|
|
426
429
|
* @returns if the voice is still active
|
|
427
430
|
*/
|
|
428
|
-
process(sampleCount: number, buffer: Float32Array, gainTarget: number
|
|
431
|
+
process(sampleCount: number, buffer: Float32Array, gainTarget: number): boolean;
|
|
429
432
|
/**
|
|
430
433
|
* Starts the release phase in the envelope.
|
|
431
434
|
* @param voice the voice this envelope belongs to.
|
|
@@ -1774,6 +1777,10 @@ declare class Voice {
|
|
|
1774
1777
|
* Used for exclusive notes and killing notes.
|
|
1775
1778
|
*/
|
|
1776
1779
|
overrideReleaseVolEnv: number;
|
|
1780
|
+
vibLfoPhase: number;
|
|
1781
|
+
vibLfoStartTime: number;
|
|
1782
|
+
modLfoPhase: number;
|
|
1783
|
+
modLfoStartTime: number;
|
|
1777
1784
|
constructor(sampleRate: number);
|
|
1778
1785
|
/**
|
|
1779
1786
|
* Computes a given modulator
|
|
@@ -1961,7 +1968,7 @@ declare class Generator {
|
|
|
1961
1968
|
* Constructs a new generator
|
|
1962
1969
|
* @param type generator type
|
|
1963
1970
|
* @param value generator value
|
|
1964
|
-
* @param validate if the limits should be validated
|
|
1971
|
+
* @param validate if the limits should be validated and clamped.
|
|
1965
1972
|
*/
|
|
1966
1973
|
constructor(type: GeneratorType, value: number, validate?: boolean);
|
|
1967
1974
|
write(genData: IndexedByteArray): void;
|
|
@@ -1999,18 +2006,34 @@ declare class BasicZone {
|
|
|
1999
2006
|
set fineTuning(tuningCents: number);
|
|
2000
2007
|
/**
|
|
2001
2008
|
* Adds to a given generator, or its default value.
|
|
2009
|
+
* @param type the generator type.
|
|
2010
|
+
* @param value the value to add.
|
|
2011
|
+
* @param validate if the value should be clamped to allowed limits.
|
|
2002
2012
|
*/
|
|
2003
2013
|
addToGenerator(type: GeneratorType, value: number, validate?: boolean): void;
|
|
2004
2014
|
/**
|
|
2005
2015
|
* Sets a generator to a given value if preset, otherwise adds a new one.
|
|
2016
|
+
* @param type the generator type.
|
|
2017
|
+
* @param value the value to set. Set to null to remove this generator (set as "unset").
|
|
2018
|
+
* @param validate if the value should be clamped to allowed limits.
|
|
2006
2019
|
*/
|
|
2007
2020
|
setGenerator(type: GeneratorType, value: number | null, validate?: boolean): void;
|
|
2008
2021
|
/**
|
|
2009
2022
|
* Adds generators to the zone.
|
|
2010
|
-
* @param generators
|
|
2023
|
+
* @param generators the generators to add.
|
|
2011
2024
|
*/
|
|
2012
2025
|
addGenerators(...generators: Generator[]): void;
|
|
2026
|
+
/**
|
|
2027
|
+
* Adds modulators to the zone.
|
|
2028
|
+
* @param modulators the modulators to add.
|
|
2029
|
+
*/
|
|
2013
2030
|
addModulators(...modulators: Modulator[]): void;
|
|
2031
|
+
/**
|
|
2032
|
+
* Gets a generator value.
|
|
2033
|
+
* @param generatorType the generator type.
|
|
2034
|
+
* @param notFoundValue if the generator is not found, this value is returned. A default value can be passed here, or null for example,
|
|
2035
|
+
* to check if the generator is set.
|
|
2036
|
+
*/
|
|
2014
2037
|
getGenerator<K>(generatorType: GeneratorType, notFoundValue: number | K): number | K;
|
|
2015
2038
|
copyFrom(zone: BasicZone): void;
|
|
2016
2039
|
/**
|
|
@@ -2785,7 +2808,11 @@ declare class DynamicModulatorSystem {
|
|
|
2785
2808
|
mod: Modulator;
|
|
2786
2809
|
id: string;
|
|
2787
2810
|
}[];
|
|
2811
|
+
active: boolean;
|
|
2812
|
+
private readonly channelNumber;
|
|
2813
|
+
constructor(channelNumber: number);
|
|
2788
2814
|
resetModulators(): void;
|
|
2815
|
+
setupReceiver(addr3: number, data: number, source: number, sourceName: string, bipolar?: boolean): void;
|
|
2789
2816
|
/**
|
|
2790
2817
|
* @param source Like in midiControllers: values below NON_CC_INDEX_OFFSET are CCs,
|
|
2791
2818
|
* above are regular modulator sources.
|
|
@@ -2794,7 +2821,7 @@ declare class DynamicModulatorSystem {
|
|
|
2794
2821
|
* @param isBipolar If true, the modulation is bipolar (ranges from -1 to 1 instead of from 0 to 1).
|
|
2795
2822
|
* @param isNegative If true, the modulation is negative (goes from 1 to 0 instead of from 0 to 1).
|
|
2796
2823
|
*/
|
|
2797
|
-
setModulator
|
|
2824
|
+
private setModulator;
|
|
2798
2825
|
private getModulatorID;
|
|
2799
2826
|
private deleteModulator;
|
|
2800
2827
|
}
|
|
@@ -3295,7 +3322,7 @@ declare class MIDIChannel {
|
|
|
3295
3322
|
/**
|
|
3296
3323
|
* A system for dynamic modulator assignment for advanced system exclusives.
|
|
3297
3324
|
*/
|
|
3298
|
-
sysExModulators: DynamicModulatorSystem;
|
|
3325
|
+
readonly sysExModulators: DynamicModulatorSystem;
|
|
3299
3326
|
/**
|
|
3300
3327
|
* The key shift of the channel (in semitones).
|
|
3301
3328
|
*/
|
|
@@ -3313,12 +3340,12 @@ declare class MIDIChannel {
|
|
|
3313
3340
|
*/
|
|
3314
3341
|
insertionEnabled: boolean;
|
|
3315
3342
|
/**
|
|
3316
|
-
* CC1 for GS
|
|
3343
|
+
* CC1 for GS controller matrix.
|
|
3317
3344
|
* An arbitrary MIDI controller, which can be bound to any synthesis parameter.
|
|
3318
3345
|
*/
|
|
3319
3346
|
cc1: number;
|
|
3320
3347
|
/**
|
|
3321
|
-
* CC2 for GS
|
|
3348
|
+
* CC2 for GS controller matrix.
|
|
3322
3349
|
* An arbitrary MIDI controller, which can be bound to any synthesis parameter.
|
|
3323
3350
|
*/
|
|
3324
3351
|
cc2: number;
|