class_audioeffectdistortion.rst 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the AudioEffectDistortion.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_AudioEffectDistortion:
  6. AudioEffectDistortion
  7. =====================
  8. **Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Adds a Distortion audio effect to an Audio bus.
  13. Modify the sound to make it dirty.
  14. Properties
  15. ----------
  16. +----------------------------------------------+--------------------------------------------------------------------+
  17. | :ref:`float<class_float>` | :ref:`drive<class_AudioEffectDistortion_property_drive>` |
  18. +----------------------------------------------+--------------------------------------------------------------------+
  19. | :ref:`float<class_float>` | :ref:`keep_hf_hz<class_AudioEffectDistortion_property_keep_hf_hz>` |
  20. +----------------------------------------------+--------------------------------------------------------------------+
  21. | :ref:`Mode<enum_AudioEffectDistortion_Mode>` | :ref:`mode<class_AudioEffectDistortion_property_mode>` |
  22. +----------------------------------------------+--------------------------------------------------------------------+
  23. | :ref:`float<class_float>` | :ref:`post_gain<class_AudioEffectDistortion_property_post_gain>` |
  24. +----------------------------------------------+--------------------------------------------------------------------+
  25. | :ref:`float<class_float>` | :ref:`pre_gain<class_AudioEffectDistortion_property_pre_gain>` |
  26. +----------------------------------------------+--------------------------------------------------------------------+
  27. Enumerations
  28. ------------
  29. .. _enum_AudioEffectDistortion_Mode:
  30. .. _class_AudioEffectDistortion_constant_MODE_CLIP:
  31. .. _class_AudioEffectDistortion_constant_MODE_ATAN:
  32. .. _class_AudioEffectDistortion_constant_MODE_LOFI:
  33. .. _class_AudioEffectDistortion_constant_MODE_OVERDRIVE:
  34. .. _class_AudioEffectDistortion_constant_MODE_WAVESHAPE:
  35. enum **Mode**:
  36. - **MODE_CLIP** = **0** --- Digital distortion effect which cuts off peaks at the top and bottom of the waveform.
  37. - **MODE_ATAN** = **1**
  38. - **MODE_LOFI** = **2** --- Low-resolution digital distortion effect. You can use it to emulate the sound of early digital audio devices.
  39. - **MODE_OVERDRIVE** = **3** --- Emulates the warm distortion produced by a field effect transistor, which is commonly used in solid-state musical instrument amplifiers.
  40. - **MODE_WAVESHAPE** = **4** --- Waveshaper distortions are used mainly by electronic musicians to achieve an extra-abrasive sound.
  41. Description
  42. -----------
  43. Modify the sound and make it dirty. Different types are available : clip, tan, lofi (bit crushing), overdrive, or waveshape.
  44. By distorting the waveform the frequency content change, which will often make the sound "crunchy" or "abrasive". For games, it can simulate sound coming from some saturated device or speaker very efficiently.
  45. Property Descriptions
  46. ---------------------
  47. .. _class_AudioEffectDistortion_property_drive:
  48. - :ref:`float<class_float>` **drive**
  49. +----------+------------------+
  50. | *Setter* | set_drive(value) |
  51. +----------+------------------+
  52. | *Getter* | get_drive() |
  53. +----------+------------------+
  54. Distortion power. Value can range from 0 to 1. Default value: ``0``.
  55. ----
  56. .. _class_AudioEffectDistortion_property_keep_hf_hz:
  57. - :ref:`float<class_float>` **keep_hf_hz**
  58. +----------+-----------------------+
  59. | *Setter* | set_keep_hf_hz(value) |
  60. +----------+-----------------------+
  61. | *Getter* | get_keep_hf_hz() |
  62. +----------+-----------------------+
  63. High-pass filter. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000. Default value: ``16000``.
  64. ----
  65. .. _class_AudioEffectDistortion_property_mode:
  66. - :ref:`Mode<enum_AudioEffectDistortion_Mode>` **mode**
  67. +----------+-----------------+
  68. | *Setter* | set_mode(value) |
  69. +----------+-----------------+
  70. | *Getter* | get_mode() |
  71. +----------+-----------------+
  72. Distortion type. Default value: :ref:`MODE_CLIP<class_AudioEffectDistortion_constant_MODE_CLIP>`.
  73. ----
  74. .. _class_AudioEffectDistortion_property_post_gain:
  75. - :ref:`float<class_float>` **post_gain**
  76. +----------+----------------------+
  77. | *Setter* | set_post_gain(value) |
  78. +----------+----------------------+
  79. | *Getter* | get_post_gain() |
  80. +----------+----------------------+
  81. Increases or decreases the volume after the effect. Value can range from -80 to 24. Default value: ``0``.
  82. ----
  83. .. _class_AudioEffectDistortion_property_pre_gain:
  84. - :ref:`float<class_float>` **pre_gain**
  85. +----------+---------------------+
  86. | *Setter* | set_pre_gain(value) |
  87. +----------+---------------------+
  88. | *Getter* | get_pre_gain() |
  89. +----------+---------------------+
  90. Increases or decreases the volume before the effect. Value can range from -60 to 60. Default value: ``0``.