-
Notifications
You must be signed in to change notification settings - Fork 11
Modulator Class
Represents a single Modulator.
All numbers
The primary source's polarity.
The primary source's direction.
If the primary source uses a MIDI controller.
The index of the primary source.
The primary source's curve types.
The secondary source's polarity.
The secondary source's direction.
If the secondary source uses a MIDI controller.
The index of the secondary source.
The secondary source's curve types.
The destination of the modulator. -1 if linked as it's not supported.
The transform type to apply.
The amount of transform to apply.
Below is the table of modulator sources if the usesCC flag is set to 0.
Index | Name |
---|---|
0 | No controller = 1 |
2 | Note on velocity |
3 | Note on key number |
10 | Poly pressure |
13 | Channel pressure |
14 | Pitch Wheel |
16 | Pitch Wheel range |
127 | Link (UNSUPPORTED) |
Below are the defined curve types of modulators:
- 0 Linear - normal linear scale
- 1 Concave - exponential ramp
- 2 Convex - logarhitmic ramp
- 3 Switch - 0.5 and below is 0 (or -1 for bipolar), above is 1
Below is the default modulator list for SpessaSynth.
Note: cB - centibels, 1/10 of a decibel
Source | Secondary source | Destination | Transform amount | Notes |
---|---|---|---|---|
Note On velocity Negative Unipolar Concave | No controller | Initial attenuation | 960 cB | SF2 Default |
Modulation Wheel Positive Unipolar Linear | No controller | Vibrato LFO to pitch | 50 cents | SF2 Default |
Volume Negative Unipolar Concave | No controller | Initial attenuation | 960 cB | SF2 Default |
Channel Pressure Positive Unipolar Linear | No controller | Vibrato LFO to pitch | 50 cents | SF2 Default |
Pitch Wheel Positive Bipolar Linear | Pitch wheel range Positive Unipolar Linear | Fine tune | 12700 cents | SF2 Default |
Pan Positive Bipolar Linear | No controller | Pan | 500 percent | SF2 Default |
Expression Negative Unipolar Concave | No controller | Initial attenuation | 960 cB | SF2 Default |
Reverb depth Negative Unipolar Linear | No controller | Reverb effects send | 1000 percent | SF2 Default, amount increased |
Chorus depth Negative Unipolar Linear | No controller | Chorus effects send | 1000 percent | SF2 Default, amount increased |
Poly Pressure Positive Unipolar Linear | No controller | Vibrato LFO to pitch | 50 cents | |
CC 92 depth Positive Unipolar Linear | No controller | Mod LFO to volume | 24 cB | |
CC 72 Positive Bipolar Linear | No controller | Volume envelope release | 1200 timecents | |
CC 74 Positive Bipolar Linear | No controller | Initial filter Cutoff | 6000 abs cents | |
CC 71 Positive Bipolar Linear | No controller | Initial filter Reasonance | 250 cB |
SpessaSynth has custom behavior for these modulators, emulating BASSMIDI:
- The modulators affected are all modulators that use Reverb depth Negative Unipolar Linear or Chorus depth Negative Unipolar Linear as a primary source and *No Controller as the secondary source and either reverbEffectsSend or chorusEffectsSend as the destination
- The transform amount is multiplied by 5 if initial transform amount is below 1000
- If the transform is multiplied, it is capped at 1000
Amount of 200 (SF2 default) is too low for these modulators, according to Ian from Un4seen. I agree with him, and also set the default to 1000 (actually it's 200 multiplied by 5 which is 1000). But this poses a few problems without using the solution above:
- soundfonts that assume default reverb of 200 will have almost inaudible effects. For example, a soundfont might want to slightly decrease the reverb, by setting it to 150 for example. It is way less than the default 1000 and the approach above will make it 150 * 5 = 750 which is still less than default, but more audible.
- This approach still allows to disable these modulators.
- Some soundfonts assume a default reverb of 1000 and set some to 800 or similar. Using the default 200 will cause big imbalance between the custom and default modulators.
Tip
If you encounter any errors in this documentation, please open an issue!
Warning
Make sure you always update worklet_processor.min.js
along with the npm package!