mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
classref: Sync with current 3.5 branch (fc32e06)
This commit is contained in:
@@ -16,6 +16,8 @@ Adds a compressor audio effect to an audio bus.
|
||||
|
||||
Reduces sounds that exceed a certain threshold level, smooths out the dynamics and increases the overall volume.
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -31,138 +33,155 @@ Compressor has many uses in the mix:
|
||||
|
||||
- Accentuates transients by using a wider attack, making effects sound more punchy.
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`attack_us<class_AudioEffectCompressor_property_attack_us>` | ``20.0`` |
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`gain<class_AudioEffectCompressor_property_gain>` | ``0.0`` |
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`mix<class_AudioEffectCompressor_property_mix>` | ``1.0`` |
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`ratio<class_AudioEffectCompressor_property_ratio>` | ``4.0`` |
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`release_ms<class_AudioEffectCompressor_property_release_ms>` | ``250.0`` |
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
| :ref:`String<class_String>` | :ref:`sidechain<class_AudioEffectCompressor_property_sidechain>` | ``""`` |
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`threshold<class_AudioEffectCompressor_property_threshold>` | ``0.0`` |
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`attack_us<class_AudioEffectCompressor_property_attack_us>` | ``20.0`` |
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`gain<class_AudioEffectCompressor_property_gain>` | ``0.0`` |
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`mix<class_AudioEffectCompressor_property_mix>` | ``1.0`` |
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`ratio<class_AudioEffectCompressor_property_ratio>` | ``4.0`` |
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`release_ms<class_AudioEffectCompressor_property_release_ms>` | ``250.0`` |
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
| :ref:`String<class_String>` | :ref:`sidechain<class_AudioEffectCompressor_property_sidechain>` | ``""`` |
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`threshold<class_AudioEffectCompressor_property_threshold>` | ``0.0`` |
|
||||
+-----------------------------+--------------------------------------------------------------------+-----------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
|
||||
.. _class_AudioEffectCompressor_property_attack_us:
|
||||
|
||||
- :ref:`float<class_float>` **attack_us**
|
||||
.. rst-class:: classref-property
|
||||
|
||||
+-----------+----------------------+
|
||||
| *Default* | ``20.0`` |
|
||||
+-----------+----------------------+
|
||||
| *Setter* | set_attack_us(value) |
|
||||
+-----------+----------------------+
|
||||
| *Getter* | get_attack_us() |
|
||||
+-----------+----------------------+
|
||||
:ref:`float<class_float>` **attack_us** = ``20.0``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_attack_us** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_attack_us** **(** **)**
|
||||
|
||||
Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioEffectCompressor_property_gain:
|
||||
|
||||
- :ref:`float<class_float>` **gain**
|
||||
.. rst-class:: classref-property
|
||||
|
||||
+-----------+-----------------+
|
||||
| *Default* | ``0.0`` |
|
||||
+-----------+-----------------+
|
||||
| *Setter* | set_gain(value) |
|
||||
+-----------+-----------------+
|
||||
| *Getter* | get_gain() |
|
||||
+-----------+-----------------+
|
||||
:ref:`float<class_float>` **gain** = ``0.0``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_gain** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_gain** **(** **)**
|
||||
|
||||
Gain applied to the output signal.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioEffectCompressor_property_mix:
|
||||
|
||||
- :ref:`float<class_float>` **mix**
|
||||
.. rst-class:: classref-property
|
||||
|
||||
+-----------+----------------+
|
||||
| *Default* | ``1.0`` |
|
||||
+-----------+----------------+
|
||||
| *Setter* | set_mix(value) |
|
||||
+-----------+----------------+
|
||||
| *Getter* | get_mix() |
|
||||
+-----------+----------------+
|
||||
:ref:`float<class_float>` **mix** = ``1.0``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_mix** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_mix** **(** **)**
|
||||
|
||||
Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet).
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioEffectCompressor_property_ratio:
|
||||
|
||||
- :ref:`float<class_float>` **ratio**
|
||||
.. rst-class:: classref-property
|
||||
|
||||
+-----------+------------------+
|
||||
| *Default* | ``4.0`` |
|
||||
+-----------+------------------+
|
||||
| *Setter* | set_ratio(value) |
|
||||
+-----------+------------------+
|
||||
| *Getter* | get_ratio() |
|
||||
+-----------+------------------+
|
||||
:ref:`float<class_float>` **ratio** = ``4.0``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_ratio** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_ratio** **(** **)**
|
||||
|
||||
Amount of compression applied to the audio once it passes the threshold level. The higher the ratio, the more the loud parts of the audio will be compressed. Value can range from 1 to 48.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioEffectCompressor_property_release_ms:
|
||||
|
||||
- :ref:`float<class_float>` **release_ms**
|
||||
.. rst-class:: classref-property
|
||||
|
||||
+-----------+-----------------------+
|
||||
| *Default* | ``250.0`` |
|
||||
+-----------+-----------------------+
|
||||
| *Setter* | set_release_ms(value) |
|
||||
+-----------+-----------------------+
|
||||
| *Getter* | get_release_ms() |
|
||||
+-----------+-----------------------+
|
||||
:ref:`float<class_float>` **release_ms** = ``250.0``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_release_ms** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_release_ms** **(** **)**
|
||||
|
||||
Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioEffectCompressor_property_sidechain:
|
||||
|
||||
- :ref:`String<class_String>` **sidechain**
|
||||
.. rst-class:: classref-property
|
||||
|
||||
+-----------+----------------------+
|
||||
| *Default* | ``""`` |
|
||||
+-----------+----------------------+
|
||||
| *Setter* | set_sidechain(value) |
|
||||
+-----------+----------------------+
|
||||
| *Getter* | get_sidechain() |
|
||||
+-----------+----------------------+
|
||||
:ref:`String<class_String>` **sidechain** = ``""``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_sidechain** **(** :ref:`String<class_String>` value **)**
|
||||
- :ref:`String<class_String>` **get_sidechain** **(** **)**
|
||||
|
||||
Reduce the sound level using another audio bus for threshold detection.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioEffectCompressor_property_threshold:
|
||||
|
||||
- :ref:`float<class_float>` **threshold**
|
||||
.. rst-class:: classref-property
|
||||
|
||||
+-----------+----------------------+
|
||||
| *Default* | ``0.0`` |
|
||||
+-----------+----------------------+
|
||||
| *Setter* | set_threshold(value) |
|
||||
+-----------+----------------------+
|
||||
| *Getter* | get_threshold() |
|
||||
+-----------+----------------------+
|
||||
:ref:`float<class_float>` **threshold** = ``0.0``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_threshold** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_threshold** **(** **)**
|
||||
|
||||
The level above which compression is applied to the audio. Value can range from -60 to 0.
|
||||
|
||||
.. |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.)`
|
||||
|
||||
Reference in New Issue
Block a user