mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
This reverts commit 57781dc0bc.
The rename, although in line with what we did in the engine, caused problems with RTD we need to fix (or push for a fix) first.
195 lines
7.5 KiB
ReStructuredText
195 lines
7.5 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_AudioEffectCompressor:
|
||
|
||
AudioEffectCompressor
|
||
=====================
|
||
|
||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||
|
||
为音频总线添加压缩音频效果。
|
||
|
||
减少超过一定阈值水平的声音,平滑动态,增加整体音量。
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
描述
|
||
----
|
||
|
||
动态范围压缩器在振幅超过一定的阈值(以分贝为单位)时,降低声音的电平。压缩器的主要用途之一是通过尽可能少的削波(当声音超过 0dB 时)来增加动态范围。
|
||
|
||
压缩器在混音中的用途很多。
|
||
|
||
- 在主总线上压缩整个输出(虽然 :ref:`AudioEffectHardLimiter<class_AudioEffectHardLimiter>` 可能更好些)。
|
||
|
||
- 在声音通道中,以确保它们听起来尽可能的平衡。
|
||
|
||
- 侧链。这可以降低与另一条音频总线侧链的声音级别,以进行阈值检测。这种技术在视频游戏混音中很常见,以音乐和SFX的级别,从而声音被听到。
|
||
|
||
- 通过使用更宽的冲攻来突出瞬态,使效果听起来更有冲击力。
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
教程
|
||
----
|
||
|
||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
属性
|
||
----
|
||
|
||
.. 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:`StringName<class_StringName>` | :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
|
||
|
||
属性说明
|
||
--------
|
||
|
||
.. _class_AudioEffectCompressor_property_attack_us:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **attack_us** = ``20.0`` :ref:`🔗<class_AudioEffectCompressor_property_attack_us>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_attack_us**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_attack_us**\ (\ )
|
||
|
||
当信号超过阈值时,压缩器的反应时间,以微秒为单位。数值范围从 20 到 2000。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_AudioEffectCompressor_property_gain:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **gain** = ``0.0`` :ref:`🔗<class_AudioEffectCompressor_property_gain>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_gain**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_gain**\ (\ )
|
||
|
||
应用于输出信号的增益。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_AudioEffectCompressor_property_mix:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **mix** = ``1.0`` :ref:`🔗<class_AudioEffectCompressor_property_mix>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_mix**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_mix**\ (\ )
|
||
|
||
原始信号和效果信号之间的平衡。数值范围从 0(完全干燥)到 1(完全浸润)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_AudioEffectCompressor_property_ratio:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ratio** = ``4.0`` :ref:`🔗<class_AudioEffectCompressor_property_ratio>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ratio**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ratio**\ (\ )
|
||
|
||
音频通过阈值级别后,应用于音频的压缩量。比率越高,音频的大声部分将被压缩。数值范围从 1 到 48。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_AudioEffectCompressor_property_release_ms:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **release_ms** = ``250.0`` :ref:`🔗<class_AudioEffectCompressor_property_release_ms>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_release_ms**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_release_ms**\ (\ )
|
||
|
||
压缩器在信号电平低于阈值后,停止降低信号的延迟时间,以毫秒为单位。取值范围为 20 到 2000。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_AudioEffectCompressor_property_sidechain:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`StringName<class_StringName>` **sidechain** = ``&""`` :ref:`🔗<class_AudioEffectCompressor_property_sidechain>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sidechain**\ (\ value\: :ref:`StringName<class_StringName>`\ )
|
||
- :ref:`StringName<class_StringName>` **get_sidechain**\ (\ )
|
||
|
||
使用另一条音频总线进行阈值检测,降低声音级别。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_AudioEffectCompressor_property_threshold:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **threshold** = ``0.0`` :ref:`🔗<class_AudioEffectCompressor_property_threshold>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_threshold**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_threshold**\ (\ )
|
||
|
||
超过该电平,压缩将应用于音频。值的范围可以从 -60 到 0。
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (本方法无副作用,不会修改该实例的任何成员变量。)`
|
||
.. |vararg| replace:: :abbr:`vararg (本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||
.. |static| replace:: :abbr:`static (调用本方法无需实例,可直接使用类名进行调用。)`
|
||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效运算符。)`
|
||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列位标志构成位掩码的整数。)`
|
||
.. |void| replace:: :abbr:`void (无返回值。)`
|