Provides factories for building simple prefabricated synthesizers. Importantly, these are not the only way to generate audio with syngen. Implementations can build their own synthesizers or use any external library that supports connecting to its audio graph.
- Source:
Methods
(static) additive(optionsopt) → {syngen.synth~Synth}
Creates an additive synthesizer which wraps configurable harmonics into a unified synth.
Each harmonic is calculated from an individual frequency coefficient, gain multiplier, and detune modifier.
With ConstantSourceNodes their values are controllable in unison such that they maintain their relationships.
Parameters:
| Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
{} |
Properties
|
- Source:
Returns:
- Type
- syngen.synth~Synth
(static) am(optionsopt) → {syngen.synth~Synth}
Creates a synthesizer with amplitude modulation.
Parameters:
| Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
{} |
Properties
|
- Source:
- To Do:
-
- Leverage
syngen.synth.createLfointernally
- Leverage
Returns:
- Type
- syngen.synth~Synth
(static) amBuffer(optionsopt) → {syngen.synth~Synth}
Creates a synthesizer which applies amplitude modulation to an AudioBufferSourceNode.
Parameters:
| Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
{} |
Properties
|
- Source:
- To Do:
-
- Leverage
syngen.synth.createLfointernally
- Leverage
Returns:
- Type
- syngen.synth~Synth
(static) buffer(optionsopt) → {syngen.synth~Synth}
Creates a synthesizer which uses an AudioBufferSourceNode.
Parameters:
| Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
{} |
Properties
|
- Source:
Returns:
- Type
- syngen.synth~Synth
(static) fm(optionsopt) → {syngen.synth~Synth}
Creates a synthesizer with frequency modulation.
Parameters:
| Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
{} |
Properties
|
- Source:
- To Do:
-
- Leverage
syngen.synth.createLfointernally
- Leverage
Returns:
- Type
- syngen.synth~Synth
(static) lfo(optionsopt) → {syngen.synth~Synth}
Creates a simple low-frequency oscillator intended for modulation.
This is identical to createSimple() except with different terminology.
Parameters:
| Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
{} |
Properties
|
- Source:
Returns:
- Type
- syngen.synth~Synth
(static) mod(optionsopt) → {syngen.synth~Synth}
Creates a synthesizer with both amplitude and frequency modulation.
Parameters:
| Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
{} |
Properties
|
- Source:
- To Do:
-
- Leverage
syngen.synth.createLfointernally
- Leverage
Returns:
- Type
- syngen.synth~Synth
(static) pwm(optionsopt) → {syngen.synth~Synth}
Creates a simple synthesizer with configurable pulse-width modulation.
Parameters:
| Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
{} |
Properties
|
- Source:
Returns:
- Type
- syngen.synth~Synth
(static) simple(optionsopt) → {syngen.synth~Synth}
Creates a simple synthesizer with a single oscillator.
Parameters:
| Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
{} |
Properties
|
- Source:
Returns:
- Type
- syngen.synth~Synth
Type Definitions
Plugin
A plugin compatible with synth chaining.
Typically returned from a syngen.effect or syngen.formant factory method.
Implementations can create their own plugins for synths as long as they have an input and output.
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
input |
AudioNode | The plugin output. |
|
output |
AudioNode | The plugin output. |
|
param |
Object |
<optional> |
Hash of all |
stop |
function |
<optional> |
Stops the plugins. |
- Source:
- To Do:
-
- Improve documentation as an interface
Synth
A prefabricated synth returned from a syngen.synth factory method.
They wrap their AudioNodes with an interface that exposes their AudioParams and provides methods to build more sophisticated circuits.
Internally they maintain a pointer to the last node before output so they can unlink them and dynamically add plugins to the output chain.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
assign |
function | Assigns |
chain |
function | Adds |
chainAssign |
function | Assigns and chains |
chainStop |
function | Ensures |
connect |
function | Connects synth output to |
disconnect |
function | Disconnects synth output from |
filtered |
function | Adds a |
output |
GainNode | The final output after all chained plugins. |
param |
Object | Hash of all |
shaped |
function | Adds a |
stop |
function | Stops the synth and all chained plugins. |
- Source:
- To Do:
-
- Improve documentation as an interface