Constructor
new AudioDistortion(amountopt, mixopt)
Create a distortion effect
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
amount | number | <optional> | 0.5 | How hard to drive the signal, 0 is clean and 1 is crushed |
mix | number | <optional> | 1 | Wet/dry balance, 0 is fully dry and 1 is fully wet |
- Source
Example
const radio = new AudioDistortion(.8);
voice.output = radio;Extends
- AudioEffect
Members
amount
Properties| Type | Description |
|---|---|
| number | How hard the signal is driven, 0 is clean and 1 is crushed |
- Source
node
Properties| Type | Description |
|---|---|
| WaveShaperNode | The wave shaper node |
- Source
Methods
setAmount(amount)
Set how hard to drive the signal, rebuilds the shaping curve
Parameters:
| Name | Type | Description |
|---|---|---|
amount | number | 0 is clean and 1 is crushed |
- Source