Difference between revisions of "EffectType"

(Created page with "{{newin|11.0|110|type=enum}} The different types of effects supported by love.audio.setEffect. == Constants == ;chorus: Plays multiple copies of the sound with slight...")
 
(Added more parameter info. (Code for wiki tables is so ugly...))
 
(3 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
== Constants ==
 
== Constants ==
 
;chorus: Plays multiple copies of the sound with slight pitch and time variation. Used to make sounds sound "fuller" or "thicker".
 
;chorus: Plays multiple copies of the sound with slight pitch and time variation. Used to make sounds sound "fuller" or "thicker".
{{param|string|waveform|}}
+
;compressor: Decreases the dynamic range of the sound, making the loud and quiet parts closer in volume, producing a more uniform amplitude throughout time.
{{param|number|phase|}}
+
;distortion: Alters the sound by amplifying it until it clips, shearing off parts of the signal, leading to a compressed and distorted sound.
{{param|number|rate|}}
+
;echo: Decaying feedback based effect, on the order of seconds. Also known as delay; causes the sound to repeat at regular intervals at a decreasing volume.
{{param|number|depth|}}
+
;equalizer: Adjust the frequency components of the sound using a 4-band (low-shelf, two band-pass and a high-shelf) equalizer.
{{param|number|feedback|}}
+
;flanger: Plays two copies of the sound; while varying the phase, or equivalently delaying one of them, by amounts on the order of milliseconds, resulting in phasing sounds.
{{param|number|delay|}}
+
;reverb: Decaying feedback based effect, on the order of milliseconds. Used to simulate the reflection off of the surroundings.
 +
;ringmodulator: An implementation of amplitude modulation; multiplies the source signal with a simple waveform, to produce either volume changes, or inharmonic overtones.
 +
 
 +
== Parameters ==
 +
Full documentation for the underlying API (OpenAL) can be found in [https://nrgcore.com/docs/manual/en-us/effects_extension_guide.pdf this PDF file].
  
;compressor: Decreases the dynamic range of the sound, making the loud and quiet parts closer in volume, producing a more uniform amplitude throughout time.
+
=== chorus ===
{{param|boolean|enable|}}
+
{| class="wikitable" |-
 +
!scope=col|Parameter!!scope=col|Units!!scope=col|Range!!scope=col|Default
 +
|-
 +
|'''<code>[[EffectWaveform]] waveform</code>'''|| || ||"triangle"
 +
|-
 +
|'''<code>[[number]] phase</code>'''||Degrees||[-180, 180]||90
 +
|-
 +
|'''<code>[[number]] rate</code>'''||Hz||[0, 10]||1.1
 +
|-
 +
|'''<code>[[number]] depth</code>'''|| ||[0, 1]||0.1
 +
|-
 +
|'''<code>[[number]] feedback</code>'''|| ||[-1, 1]||0.25
 +
|-
 +
|'''<code>[[number]] delay</code>'''||Seconds||[0, 0.016]||0.016
 +
|}
 +
 
 +
=== compressor ===
 +
{| class="wikitable" |-
 +
!scope=col|Parameter!!scope=col|Units!!scope=col|Range!!scope=col|Default
 +
|-
 +
|'''<code>[[boolean]] enable</code>'''|| || ||true
 +
|}
  
;distortion: Alters the sound by amplifying it until it clips, shearing off parts of the signal, leading to a compressed and distorted sound.
+
=== distortion ===
{{param|number|gain|}}
+
{| class="wikitable" |-
{{param|number|edge|}}
+
!scope=col|Parameter!!scope=col|Units!!scope=col|Range!!scope=col|Default
{{param|number|lowcut|}}
+
|-
{{param|number|center|}}
+
|'''<code>[[number]] gain</code>'''|| ||[0.01, 1]||0.2
{{param|number|bandwidth|}}
+
|-
 +
|'''<code>[[number]] edge</code>'''|| ||[0, 1]||0.2
 +
|-
 +
|'''<code>[[number]] lowcut</code>'''||Hz||[80, 24000]||8000
 +
|-
 +
|'''<code>[[number]] center</code>'''||Hz||[80, 24000]||3600
 +
|-
 +
|'''<code>[[number]] bandwidth</code>'''||Hz||[80, 24000]||3600
 +
|}
  
;echo: Decaying feedback based effect, on the order of seconds. Also known as delay; causes the sound to repeat at regular intervals at a decreasing volume.
+
=== echo ===
{{param|number|delay|}}
+
{| class="wikitable" |-
{{param|number|tapdelay|}}
+
!scope=col|Parameter!!scope=col|Units!!scope=col|Range!!scope=col|Default
{{param|number|damping|}}
+
|-
{{param|number|feedback|}}
+
|'''<code>[[number]] delay</code>'''||Seconds||[0, 0.207]||0.1
{{param|number|spread|}}
+
|-
 +
|'''<code>[[number]] tapdelay</code>'''||Seconds||[0, 0.404]||0.1
 +
|-
 +
|'''<code>[[number]] damping</code>'''|| ||[0, 0.99]||0.5
 +
|-
 +
|'''<code>[[number]] feedback</code>'''|| ||[0, 1]||0.5
 +
|-
 +
|'''<code>[[number]] spread</code>'''|| ||[-1, 1]||-1
 +
|}
  
;equalizer: Adjust the frequency components of the sound using a 4-band (low-shelf, two band-pass and a high-shelf) equalizer.
+
=== equalizer ===
{{param|number|lowgain|}}
+
{| class="wikitable" |-
{{param|number|lowcut|}}
+
!scope=col|Parameter!!scope=col|Units!!scope=col|Range!!scope=col|Default
{{param|number|lowmidgain|}}
+
|-
{{param|number|lowmidfrequency|}}
+
|'''<code>[[number]] lowgain</code>'''|| ||[0.126, 7.943]||1
{{param|number|lowmidbandwidth|}}
+
|-
{{param|number|highmidgain|}}
+
|'''<code>[[number]] lowcut</code>'''||Hz||[50, 800]||200
{{param|number|highmidfrequency|}}
+
|-
{{param|number|highmidbandwidth|}}
+
|'''<code>[[number]] lowmidgain</code>'''|| ||[0.126, 7.943]||1
{{param|number|highgain|}}
+
|-
{{param|number|highcut|}}
+
|'''<code>[[number]] lowmidfrequency</code>'''||Hz||[200, 3000]||500
 +
|-
 +
|'''<code>[[number]] lowmidbandwidth</code>'''|| ||[0.01, 1]||1
 +
|-
 +
|'''<code>[[number]] highmidgain</code>'''|| ||[0.126, 7.943]||1
 +
|-
 +
|'''<code>[[number]] highmidfrequency</code>'''||Hz||[1000, 8000]||3000
 +
|-
 +
|'''<code>[[number]] highmidbandwidth</code>'''|| ||[0.01, 1]||1
 +
|-
 +
|'''<code>[[number]] highgain</code>'''|| ||[0.126, 7.943]||1
 +
|-
 +
|'''<code>[[number]] highcut</code>'''||Hz||[4000, 16000]||6000
 +
|}
  
;flanger: Plays two copies of the sound; while varying the phase, or equivalently delaying one of them, by amounts on the order of milliseconds, resulting in phasing sounds.
+
=== flanger ===
{{param|string|waveform|}}
+
{| class="wikitable" |-
{{param|number|phase|}}
+
!scope=col|Parameter!!scope=col|Units!!scope=col|Range!!scope=col|Default
{{param|number|rate|}}
+
|-
{{param|number|depth|}}
+
|'''<code>[[EffectWaveform]] waveform</code>'''|| || ||"triangle"
{{param|number|feedback|}}
+
|-
{{param|number|delay|}}
+
|'''<code>[[number]] phase</code>'''||Degrees||[-180, 180]||0
 +
|-
 +
|'''<code>[[number]] rate</code>'''||Hz||[0, 10]||0.27
 +
|-
 +
|'''<code>[[number]] depth</code>'''|| ||[0, 1]||1
 +
|-
 +
|'''<code>[[number]] feedback</code>'''|| ||[-1, 1]||-.5
 +
|-
 +
|'''<code>[[number]] delay</code>'''||Seconds||[0, 0.004]||0.002
 +
|}
  
;reverb: Decaying feedback based effect, on the order of milliseconds. Used to simulate the reflection off of the surroundings.
+
=== reverb ===
{{param|number|gain|}}
+
{| class="wikitable" |-
{{param|number|highgain|}}
+
!scope=col|Parameter!!scope=col|Units!!scope=col|Range!!scope=col|Default
{{param|number|density|}}
+
|-
{{param|number|diffusion|}}
+
|'''<code>[[number]] gain</code>'''|| ||[0, 1]||0.32
{{param|number|decaytime|}}
+
|-
{{param|number|decayhighratio|}}
+
|'''<code>[[number]] highgain</code>'''|| ||[0, 1]||0.89
{{param|number|earlygain|}}
+
|-
{{param|number|earlydelay|}}
+
|'''<code>[[number]] density</code>'''|| ||[0, 1]||1
{{param|number|lategain|}}
+
|-
{{param|number|latedelay|}}
+
|'''<code>[[number]] diffusion</code>'''|| ||[0, 1]||1
{{param|number|roomrolloff|}}
+
|-
{{param|number|airabsorption|}}
+
|'''<code>[[number]] decaytime</code>'''||Seconds||[0.1, 20]||1.49
{{param|number|highlimit|}}
+
|-
 +
|'''<code>[[number]] decayhighratio</code>'''|| ||[0.1, 2]||0.83
 +
|-
 +
|'''<code>[[number]] earlygain</code>'''|| ||[0, 3.16]||0.05
 +
|-
 +
|'''<code>[[number]] earlydelay</code>'''||Seconds||[0, 0.3]||0.05
 +
|-
 +
|'''<code>[[number]] lategain</code>'''|| ||[0, 10]||1.26
 +
|-
 +
|'''<code>[[number]] latedelay</code>'''||Seconds||[0, 0.1]||0.011
 +
|-
 +
|'''<code>[[number]] roomrolloff</code>'''|| ||[0, 10]||0
 +
|-
 +
|'''<code>[[number]] airabsorption</code>'''|| ||[0.892, 1]||0.994
 +
|-
 +
|'''<code>[[boolean]] highlimit</code>'''|| || ||true
 +
|}
  
;ringmodulator: An implementation of amplitude modulation; multiplies the source signal with a simple waveform, to produce either volume changes, or inharmonic overtones.
+
=== ringmodulator ===
{{param|EffectWaveform|waveform|}}
+
{| class="wikitable" |-
{{param|number|frequency|}}
+
!scope=col|Parameter!!scope=col|Units!!scope=col|Range!!scope=col|Default
{{param|number|highcut|}}
+
|-
 +
|'''<code>[[EffectWaveform]] waveform</code>'''|| || ||"sine"
 +
|-
 +
|'''<code>[[number]] frequency</code>'''||Hz||[0, 8000]||440
 +
|-
 +
|'''<code>[[number]] highcut</code>'''||Hz||[0, 24000]||800
 +
|}
  
 
== See Also ==
 
== See Also ==
 
* [[parent::love.audio]]
 
* [[parent::love.audio]]
 
* [[love.audio.setEffect]]
 
* [[love.audio.setEffect]]
 +
 +
== Other Languages ==
 +
{{i18n|EffectType}}
  
 
[[Category:Enums]]
 
[[Category:Enums]]
 
{{#set:Description=Different types of audio effects.}}
 
{{#set:Description=Different types of audio effects.}}

Latest revision as of 12:38, 17 August 2022

Available since LÖVE 11.0
This enum is not supported in earlier versions.

The different types of effects supported by love.audio.setEffect.

Constants

chorus
Plays multiple copies of the sound with slight pitch and time variation. Used to make sounds sound "fuller" or "thicker".
compressor
Decreases the dynamic range of the sound, making the loud and quiet parts closer in volume, producing a more uniform amplitude throughout time.
distortion
Alters the sound by amplifying it until it clips, shearing off parts of the signal, leading to a compressed and distorted sound.
echo
Decaying feedback based effect, on the order of seconds. Also known as delay; causes the sound to repeat at regular intervals at a decreasing volume.
equalizer
Adjust the frequency components of the sound using a 4-band (low-shelf, two band-pass and a high-shelf) equalizer.
flanger
Plays two copies of the sound; while varying the phase, or equivalently delaying one of them, by amounts on the order of milliseconds, resulting in phasing sounds.
reverb
Decaying feedback based effect, on the order of milliseconds. Used to simulate the reflection off of the surroundings.
ringmodulator
An implementation of amplitude modulation; multiplies the source signal with a simple waveform, to produce either volume changes, or inharmonic overtones.

Parameters

Full documentation for the underlying API (OpenAL) can be found in this PDF file.

chorus

Parameter Units Range Default
EffectWaveform waveform "triangle"
number phase Degrees [-180, 180] 90
number rate Hz [0, 10] 1.1
number depth [0, 1] 0.1
number feedback [-1, 1] 0.25
number delay Seconds [0, 0.016] 0.016

compressor

Parameter Units Range Default
boolean enable true

distortion

Parameter Units Range Default
number gain [0.01, 1] 0.2
number edge [0, 1] 0.2
number lowcut Hz [80, 24000] 8000
number center Hz [80, 24000] 3600
number bandwidth Hz [80, 24000] 3600

echo

Parameter Units Range Default
number delay Seconds [0, 0.207] 0.1
number tapdelay Seconds [0, 0.404] 0.1
number damping [0, 0.99] 0.5
number feedback [0, 1] 0.5
number spread [-1, 1] -1

equalizer

Parameter Units Range Default
number lowgain [0.126, 7.943] 1
number lowcut Hz [50, 800] 200
number lowmidgain [0.126, 7.943] 1
number lowmidfrequency Hz [200, 3000] 500
number lowmidbandwidth [0.01, 1] 1
number highmidgain [0.126, 7.943] 1
number highmidfrequency Hz [1000, 8000] 3000
number highmidbandwidth [0.01, 1] 1
number highgain [0.126, 7.943] 1
number highcut Hz [4000, 16000] 6000

flanger

Parameter Units Range Default
EffectWaveform waveform "triangle"
number phase Degrees [-180, 180] 0
number rate Hz [0, 10] 0.27
number depth [0, 1] 1
number feedback [-1, 1] -.5
number delay Seconds [0, 0.004] 0.002

reverb

Parameter Units Range Default
number gain [0, 1] 0.32
number highgain [0, 1] 0.89
number density [0, 1] 1
number diffusion [0, 1] 1
number decaytime Seconds [0.1, 20] 1.49
number decayhighratio [0.1, 2] 0.83
number earlygain [0, 3.16] 0.05
number earlydelay Seconds [0, 0.3] 0.05
number lategain [0, 10] 1.26
number latedelay Seconds [0, 0.1] 0.011
number roomrolloff [0, 10] 0
number airabsorption [0.892, 1] 0.994
boolean highlimit true

ringmodulator

Parameter Units Range Default
EffectWaveform waveform "sine"
number frequency Hz [0, 8000] 440
number highcut Hz [0, 24000] 800

See Also

Other Languages