Files
godot-docs/classes/class_audioeffecthardlimiter.rst
2026-02-28 03:51:57 +00:00

120 lines
5.0 KiB
ReStructuredText

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AudioEffectHardLimiter.xml.
.. _class_AudioEffectHardLimiter:
AudioEffectHardLimiter
======================
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Adds a limiter audio effect to an audio bus.
Prevents audio signals from exceeding a specified volume level.
.. rst-class:: classref-introduction-group
Description
-----------
A "limiter" disallows audio signals from exceeding a given volume threshold level in dB. Hard limiters predict volume peaks, and will smoothly apply gain reduction when a peak crosses the ceiling threshold level to prevent clipping. It preserves the waveform and prevents it from crossing the ceiling threshold level. Adding one in the Master bus is recommended as a safety measure to prevent sudden volume peaks from occurring, and to prevent distortion caused by clipping, when the volume exceeds 0 dB.
If clipping is desired, consider :ref:`AudioEffectDistortion.MODE_CLIP<class_AudioEffectDistortion_constant_MODE_CLIP>`.
.. rst-class:: classref-introduction-group
Tutorials
---------
- :doc:`Audio buses <../tutorials/audio/audio_buses>`
- :doc:`Audio effects <../tutorials/audio/audio_effects>`
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+---------------------------+-----------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`ceiling_db<class_AudioEffectHardLimiter_property_ceiling_db>` | ``-0.3`` |
+---------------------------+-----------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`pre_gain_db<class_AudioEffectHardLimiter_property_pre_gain_db>` | ``0.0`` |
+---------------------------+-----------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`release<class_AudioEffectHardLimiter_property_release>` | ``0.1`` |
+---------------------------+-----------------------------------------------------------------------+----------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_AudioEffectHardLimiter_property_ceiling_db:
.. rst-class:: classref-property
:ref:`float<class_float>` **ceiling_db** = ``-0.3`` :ref:`🔗<class_AudioEffectHardLimiter_property_ceiling_db>`
.. rst-class:: classref-property-setget
- |void| **set_ceiling_db**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ceiling_db**\ (\ )
The waveform's maximum allowed value, in dB. This value can range from -24 to 0.
The default value of -0.3 prevents potential inter-sample peaks (ISP) from crossing over 0 dB, which can cause slight distortion on some older hardware.
.. rst-class:: classref-item-separator
----
.. _class_AudioEffectHardLimiter_property_pre_gain_db:
.. rst-class:: classref-property
:ref:`float<class_float>` **pre_gain_db** = ``0.0`` :ref:`🔗<class_AudioEffectHardLimiter_property_pre_gain_db>`
.. rst-class:: classref-property-setget
- |void| **set_pre_gain_db**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_pre_gain_db**\ (\ )
Gain before limiting, in dB. Value can range from -24 to 24.
.. rst-class:: classref-item-separator
----
.. _class_AudioEffectHardLimiter_property_release:
.. rst-class:: classref-property
:ref:`float<class_float>` **release** = ``0.1`` :ref:`🔗<class_AudioEffectHardLimiter_property_release>`
.. rst-class:: classref-property-setget
- |void| **set_release**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_release**\ (\ )
Time it takes in seconds for the gain reduction to fully release. Value can range from 0.01 to 3.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |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.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
.. |void| replace:: :abbr:`void (No return value.)`