203 lines
6.8 KiB
ReStructuredText
203 lines
6.8 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/AudioEffectDistortion.xml.
|
|
|
|
.. _class_AudioEffectDistortion:
|
|
|
|
AudioEffectDistortion
|
|
=====================
|
|
|
|
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
Adds a distortion audio effect to an Audio bus.
|
|
|
|
Modify the sound to make it distorted.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Description
|
|
-----------
|
|
|
|
Different types are available: clip, tan, lo-fi (bit crushing), overdrive, or waveshape.
|
|
|
|
By distorting the waveform the frequency content change, which will often make the sound "crunchy" or "abrasive". For games, it can simulate sound coming from some saturated device or speaker very efficiently.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Tutorials
|
|
---------
|
|
|
|
- :doc:`Audio buses <../tutorials/audio/audio_buses>`
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Properties
|
|
----------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+----------------------------------------------+--------------------------------------------------------------------+-------------+
|
|
| :ref:`float<class_float>` | :ref:`drive<class_AudioEffectDistortion_property_drive>` | ``0.0`` |
|
|
+----------------------------------------------+--------------------------------------------------------------------+-------------+
|
|
| :ref:`float<class_float>` | :ref:`keep_hf_hz<class_AudioEffectDistortion_property_keep_hf_hz>` | ``16000.0`` |
|
|
+----------------------------------------------+--------------------------------------------------------------------+-------------+
|
|
| :ref:`Mode<enum_AudioEffectDistortion_Mode>` | :ref:`mode<class_AudioEffectDistortion_property_mode>` | ``0`` |
|
|
+----------------------------------------------+--------------------------------------------------------------------+-------------+
|
|
| :ref:`float<class_float>` | :ref:`post_gain<class_AudioEffectDistortion_property_post_gain>` | ``0.0`` |
|
|
+----------------------------------------------+--------------------------------------------------------------------+-------------+
|
|
| :ref:`float<class_float>` | :ref:`pre_gain<class_AudioEffectDistortion_property_pre_gain>` | ``0.0`` |
|
|
+----------------------------------------------+--------------------------------------------------------------------+-------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Enumerations
|
|
------------
|
|
|
|
.. _enum_AudioEffectDistortion_Mode:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **Mode**:
|
|
|
|
.. _class_AudioEffectDistortion_constant_MODE_CLIP:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Mode<enum_AudioEffectDistortion_Mode>` **MODE_CLIP** = ``0``
|
|
|
|
Digital distortion effect which cuts off peaks at the top and bottom of the waveform.
|
|
|
|
.. _class_AudioEffectDistortion_constant_MODE_ATAN:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Mode<enum_AudioEffectDistortion_Mode>` **MODE_ATAN** = ``1``
|
|
|
|
|
|
|
|
.. _class_AudioEffectDistortion_constant_MODE_LOFI:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Mode<enum_AudioEffectDistortion_Mode>` **MODE_LOFI** = ``2``
|
|
|
|
Low-resolution digital distortion effect. You can use it to emulate the sound of early digital audio devices.
|
|
|
|
.. _class_AudioEffectDistortion_constant_MODE_OVERDRIVE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Mode<enum_AudioEffectDistortion_Mode>` **MODE_OVERDRIVE** = ``3``
|
|
|
|
Emulates the warm distortion produced by a field effect transistor, which is commonly used in solid-state musical instrument amplifiers.
|
|
|
|
.. _class_AudioEffectDistortion_constant_MODE_WAVESHAPE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Mode<enum_AudioEffectDistortion_Mode>` **MODE_WAVESHAPE** = ``4``
|
|
|
|
Waveshaper distortions are used mainly by electronic musicians to achieve an extra-abrasive sound.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_AudioEffectDistortion_property_drive:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **drive** = ``0.0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_drive** **(** :ref:`float<class_float>` value **)**
|
|
- :ref:`float<class_float>` **get_drive** **(** **)**
|
|
|
|
Distortion power. Value can range from 0 to 1.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AudioEffectDistortion_property_keep_hf_hz:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **keep_hf_hz** = ``16000.0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_keep_hf_hz** **(** :ref:`float<class_float>` value **)**
|
|
- :ref:`float<class_float>` **get_keep_hf_hz** **(** **)**
|
|
|
|
High-pass filter, in Hz. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AudioEffectDistortion_property_mode:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Mode<enum_AudioEffectDistortion_Mode>` **mode** = ``0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_mode** **(** :ref:`Mode<enum_AudioEffectDistortion_Mode>` value **)**
|
|
- :ref:`Mode<enum_AudioEffectDistortion_Mode>` **get_mode** **(** **)**
|
|
|
|
Distortion type.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AudioEffectDistortion_property_post_gain:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **post_gain** = ``0.0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_post_gain** **(** :ref:`float<class_float>` value **)**
|
|
- :ref:`float<class_float>` **get_post_gain** **(** **)**
|
|
|
|
Increases or decreases the volume after the effect. Value can range from -80 to 24.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AudioEffectDistortion_property_pre_gain:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **pre_gain** = ``0.0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_pre_gain** **(** :ref:`float<class_float>` value **)**
|
|
- :ref:`float<class_float>` **get_pre_gain** **(** **)**
|
|
|
|
Increases or decreases the volume before the effect. Value can range from -60 to 60.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|