Files
godot-docs-l10n/classes/zh_CN/class_audioeffectdistortion.rst
Max Hilbrunner 2ba6d25aa9 Revert "Rename zh_CN/zh_TW to zh_Hans/zh_Hant"
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.
2025-12-24 07:14:31 +01:00

208 lines
7.3 KiB
ReStructuredText

:github_url: hide
.. _class_AudioEffectDistortion:
AudioEffectDistortion
=====================
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
为音频总线添加失真音频效果。
修改声音,使其失真。
.. rst-class:: classref-introduction-group
描述
----
可以使用不同的类型:削波、正切、低保真(位破碎)、过载、波形。
通过扭曲波形,频率内容会发生变化,这通常会使声音“清脆”或“粗糙”。对于游戏,它可以非常有效地模拟来自某些饱和设备或扬声器的声音。
.. rst-class:: classref-introduction-group
教程
----
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
.. rst-class:: classref-reftable-group
属性
----
.. 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
枚举
----
.. _enum_AudioEffectDistortion_Mode:
.. rst-class:: classref-enumeration
enum **Mode**: :ref:`🔗<enum_AudioEffectDistortion_Mode>`
.. _class_AudioEffectDistortion_constant_MODE_CLIP:
.. rst-class:: classref-enumeration-constant
:ref:`Mode<enum_AudioEffectDistortion_Mode>` **MODE_CLIP** = ``0``
数字失真效果,可以切断波形顶部和底部的峰值。
.. _class_AudioEffectDistortion_constant_MODE_ATAN:
.. rst-class:: classref-enumeration-constant
:ref:`Mode<enum_AudioEffectDistortion_Mode>` **MODE_ATAN** = ``1``
.. container:: contribute
There is currently no description for this enum. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
.. _class_AudioEffectDistortion_constant_MODE_LOFI:
.. rst-class:: classref-enumeration-constant
:ref:`Mode<enum_AudioEffectDistortion_Mode>` **MODE_LOFI** = ``2``
低分辨率的数字失真效果(位深度减少)。可以使用它来模拟早期数字音频设备的声音。
.. _class_AudioEffectDistortion_constant_MODE_OVERDRIVE:
.. rst-class:: classref-enumeration-constant
:ref:`Mode<enum_AudioEffectDistortion_Mode>` **MODE_OVERDRIVE** = ``3``
模拟通常用于固态乐器放大器的场效应晶体管产生的暖失真。\ :ref:`drive<class_AudioEffectDistortion_property_drive>` 属性在该模式下无效。
.. _class_AudioEffectDistortion_constant_MODE_WAVESHAPE:
.. rst-class:: classref-enumeration-constant
:ref:`Mode<enum_AudioEffectDistortion_Mode>` **MODE_WAVESHAPE** = ``4``
波形变形失真主要是电子音乐人为了获得格外粗糙的声音而使用的。
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
属性说明
--------
.. _class_AudioEffectDistortion_property_drive:
.. rst-class:: classref-property
:ref:`float<class_float>` **drive** = ``0.0`` :ref:`🔗<class_AudioEffectDistortion_property_drive>`
.. rst-class:: classref-property-setget
- |void| **set_drive**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_drive**\ (\ )
失真度。值的范围可在 0 到 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`` :ref:`🔗<class_AudioEffectDistortion_property_keep_hf_hz>`
.. rst-class:: classref-property-setget
- |void| **set_keep_hf_hz**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_keep_hf_hz**\ (\ )
高通滤波器,单位为 Hz。高于此值的频率不会受到失真的影响。该值的范围为 1 至 20000。
.. rst-class:: classref-item-separator
----
.. _class_AudioEffectDistortion_property_mode:
.. rst-class:: classref-property
:ref:`Mode<enum_AudioEffectDistortion_Mode>` **mode** = ``0`` :ref:`🔗<class_AudioEffectDistortion_property_mode>`
.. rst-class:: classref-property-setget
- |void| **set_mode**\ (\ value\: :ref:`Mode<enum_AudioEffectDistortion_Mode>`\ )
- :ref:`Mode<enum_AudioEffectDistortion_Mode>` **get_mode**\ (\ )
失真类型。
.. rst-class:: classref-item-separator
----
.. _class_AudioEffectDistortion_property_post_gain:
.. rst-class:: classref-property
:ref:`float<class_float>` **post_gain** = ``0.0`` :ref:`🔗<class_AudioEffectDistortion_property_post_gain>`
.. rst-class:: classref-property-setget
- |void| **set_post_gain**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_post_gain**\ (\ )
在效果后增加或减少的音量,单位为分贝。取值范围从 -80 到 24。
.. rst-class:: classref-item-separator
----
.. _class_AudioEffectDistortion_property_pre_gain:
.. rst-class:: classref-property
:ref:`float<class_float>` **pre_gain** = ``0.0`` :ref:`🔗<class_AudioEffectDistortion_property_pre_gain>`
.. rst-class:: classref-property-setget
- |void| **set_pre_gain**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_pre_gain**\ (\ )
在效果前增加或减少的音量,单位为分贝。取值范围从 -60 到 60。
.. |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 (无返回值。)`