class_audioeffectdistortion.rst 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AudioEffectDistortion.xml.
  6. .. _class_AudioEffectDistortion:
  7. AudioEffectDistortion
  8. =====================
  9. **Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Adds a distortion audio effect to an Audio bus.
  11. Modifies the sound to make it distorted.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. Different types are available: clip, tan, lo-fi (bit crushing), overdrive, or waveshape.
  16. By distorting the waveform the frequency content changes, which will often make the sound "crunchy" or "abrasive". For games, it can simulate sound coming from some saturated device or speaker very efficiently.
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - :doc:`Audio buses <../tutorials/audio/audio_buses>`
  21. .. rst-class:: classref-reftable-group
  22. Properties
  23. ----------
  24. .. table::
  25. :widths: auto
  26. +----------------------------------------------+--------------------------------------------------------------------+-------------+
  27. | :ref:`float<class_float>` | :ref:`drive<class_AudioEffectDistortion_property_drive>` | ``0.0`` |
  28. +----------------------------------------------+--------------------------------------------------------------------+-------------+
  29. | :ref:`float<class_float>` | :ref:`keep_hf_hz<class_AudioEffectDistortion_property_keep_hf_hz>` | ``16000.0`` |
  30. +----------------------------------------------+--------------------------------------------------------------------+-------------+
  31. | :ref:`Mode<enum_AudioEffectDistortion_Mode>` | :ref:`mode<class_AudioEffectDistortion_property_mode>` | ``0`` |
  32. +----------------------------------------------+--------------------------------------------------------------------+-------------+
  33. | :ref:`float<class_float>` | :ref:`post_gain<class_AudioEffectDistortion_property_post_gain>` | ``0.0`` |
  34. +----------------------------------------------+--------------------------------------------------------------------+-------------+
  35. | :ref:`float<class_float>` | :ref:`pre_gain<class_AudioEffectDistortion_property_pre_gain>` | ``0.0`` |
  36. +----------------------------------------------+--------------------------------------------------------------------+-------------+
  37. .. rst-class:: classref-section-separator
  38. ----
  39. .. rst-class:: classref-descriptions-group
  40. Enumerations
  41. ------------
  42. .. _enum_AudioEffectDistortion_Mode:
  43. .. rst-class:: classref-enumeration
  44. enum **Mode**: :ref:`🔗<enum_AudioEffectDistortion_Mode>`
  45. .. _class_AudioEffectDistortion_constant_MODE_CLIP:
  46. .. rst-class:: classref-enumeration-constant
  47. :ref:`Mode<enum_AudioEffectDistortion_Mode>` **MODE_CLIP** = ``0``
  48. Digital distortion effect which cuts off peaks at the top and bottom of the waveform.
  49. .. _class_AudioEffectDistortion_constant_MODE_ATAN:
  50. .. rst-class:: classref-enumeration-constant
  51. :ref:`Mode<enum_AudioEffectDistortion_Mode>` **MODE_ATAN** = ``1``
  52. .. container:: contribute
  53. There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  54. .. _class_AudioEffectDistortion_constant_MODE_LOFI:
  55. .. rst-class:: classref-enumeration-constant
  56. :ref:`Mode<enum_AudioEffectDistortion_Mode>` **MODE_LOFI** = ``2``
  57. Low-resolution digital distortion effect (bit depth reduction). You can use it to emulate the sound of early digital audio devices.
  58. .. _class_AudioEffectDistortion_constant_MODE_OVERDRIVE:
  59. .. rst-class:: classref-enumeration-constant
  60. :ref:`Mode<enum_AudioEffectDistortion_Mode>` **MODE_OVERDRIVE** = ``3``
  61. Emulates the warm distortion produced by a field effect transistor, which is commonly used in solid-state musical instrument amplifiers. The :ref:`drive<class_AudioEffectDistortion_property_drive>` property has no effect in this mode.
  62. .. _class_AudioEffectDistortion_constant_MODE_WAVESHAPE:
  63. .. rst-class:: classref-enumeration-constant
  64. :ref:`Mode<enum_AudioEffectDistortion_Mode>` **MODE_WAVESHAPE** = ``4``
  65. Waveshaper distortions are used mainly by electronic musicians to achieve an extra-abrasive sound.
  66. .. rst-class:: classref-section-separator
  67. ----
  68. .. rst-class:: classref-descriptions-group
  69. Property Descriptions
  70. ---------------------
  71. .. _class_AudioEffectDistortion_property_drive:
  72. .. rst-class:: classref-property
  73. :ref:`float<class_float>` **drive** = ``0.0`` :ref:`🔗<class_AudioEffectDistortion_property_drive>`
  74. .. rst-class:: classref-property-setget
  75. - |void| **set_drive**\ (\ value\: :ref:`float<class_float>`\ )
  76. - :ref:`float<class_float>` **get_drive**\ (\ )
  77. Distortion power. Value can range from 0 to 1.
  78. .. rst-class:: classref-item-separator
  79. ----
  80. .. _class_AudioEffectDistortion_property_keep_hf_hz:
  81. .. rst-class:: classref-property
  82. :ref:`float<class_float>` **keep_hf_hz** = ``16000.0`` :ref:`🔗<class_AudioEffectDistortion_property_keep_hf_hz>`
  83. .. rst-class:: classref-property-setget
  84. - |void| **set_keep_hf_hz**\ (\ value\: :ref:`float<class_float>`\ )
  85. - :ref:`float<class_float>` **get_keep_hf_hz**\ (\ )
  86. High-pass filter, in Hz. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000.
  87. .. rst-class:: classref-item-separator
  88. ----
  89. .. _class_AudioEffectDistortion_property_mode:
  90. .. rst-class:: classref-property
  91. :ref:`Mode<enum_AudioEffectDistortion_Mode>` **mode** = ``0`` :ref:`🔗<class_AudioEffectDistortion_property_mode>`
  92. .. rst-class:: classref-property-setget
  93. - |void| **set_mode**\ (\ value\: :ref:`Mode<enum_AudioEffectDistortion_Mode>`\ )
  94. - :ref:`Mode<enum_AudioEffectDistortion_Mode>` **get_mode**\ (\ )
  95. Distortion type.
  96. .. rst-class:: classref-item-separator
  97. ----
  98. .. _class_AudioEffectDistortion_property_post_gain:
  99. .. rst-class:: classref-property
  100. :ref:`float<class_float>` **post_gain** = ``0.0`` :ref:`🔗<class_AudioEffectDistortion_property_post_gain>`
  101. .. rst-class:: classref-property-setget
  102. - |void| **set_post_gain**\ (\ value\: :ref:`float<class_float>`\ )
  103. - :ref:`float<class_float>` **get_post_gain**\ (\ )
  104. Increases or decreases the volume after the effect, in decibels. Value can range from -80 to 24.
  105. .. rst-class:: classref-item-separator
  106. ----
  107. .. _class_AudioEffectDistortion_property_pre_gain:
  108. .. rst-class:: classref-property
  109. :ref:`float<class_float>` **pre_gain** = ``0.0`` :ref:`🔗<class_AudioEffectDistortion_property_pre_gain>`
  110. .. rst-class:: classref-property-setget
  111. - |void| **set_pre_gain**\ (\ value\: :ref:`float<class_float>`\ )
  112. - :ref:`float<class_float>` **get_pre_gain**\ (\ )
  113. Increases or decreases the volume before the effect, in decibels. Value can range from -60 to 60.
  114. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  115. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  116. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  117. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  118. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  119. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  120. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  121. .. |void| replace:: :abbr:`void (No return value.)`