Effect Constants Name Candidates
Effects and Filters are coming in version 0.11 but their names are not finalized and are subject to discussion, since many of them are picked poorly.
Alternative suggested names go underneath the basic name.
Effects and Filters are passed in as a table with named parameters, e.g.:
{ type = "lowpass", volume = 1, lowgain = 0.3 }
Refer to OpenAL EFX handbook for underlying system details: http://kcat.strangesoft.net/misc-downloads/Effects%20Extension%20Guide.pdf
Contents
Filters
Filters are basic low-pass, high-pass and "combo"-pass (band-pass) frequency filters. They can be applied to each sound Source individually, but only one Filter per Source at a time.
Functions
Apply Filter to Source:
- Source:setFilter
- Source:applyFilter
Get current Source filter:
- Source:getFilter
Constants
Filter types:
- lowpass -removes upper part of the spectrum, making the sound muffled as if it passed through a thick barrier
- highpass -removes lower part of the spectrum, eliminating the bass
- bandpass -removes both upper and lower part of the spectrum, leaving alone the area between lowgain and highgain.
Parameters:
- type - the above three.
- volume -(define whether this affects the attenuation for the affected areas, or for the whole)
- lowgain -lower part of the spectrum multiplier.
- highgain -upper part of the spectrum multiplier.
Effects
Effects are advanced audio filters that can be used to recreate realistic acoustic properties of the level as well as creating cool effects. Sound system is built on top of OpenAL, so it's only possible to set 4 Effects at a time. Each Source can feed its output to any of these 4 Effects, and it can also feed to multiple Effects simultaneously. Each feed line can have a Filter attached to it, it will filter the sound on the path between Source and Effect. Effects work continuously, even when no sound is fed, e.g. reverberation Effect can still output decaying reverb long after all input is cut.
Functions
Apply Effect to scene:
- love.audio.setSceneEffect
- love.audio.applySceneEffect
- love.audio.setEffect -- with a disclaimer on the wiki page that modifying an effect's parameter won't apply it here until you call this again... at least that's how i understood it from the docs; i may be wrong.
Get current scene Effect:
- love.audio.getSceneEffect
- love.audio.getEffect
Use scene Effect with Source:
- Source:setSceneEffect
- Source:useSceneEffect
- Source:setEffect -- with a disclaimer on the wiki page that modifying an effect's parameter won't apply it here until you call this again.
Get Source's currently used scene Effect:
- Source:getSceneEffect
- Source:getEffect
Constants
Effect types:
- reverb -adds decaying continuous sound repetition
- chorus -lays sound over itself with pitch and delay variation
- distortion -produces artificial sound clipping
- echo
- flanger -lays sound over itself with phase shift
- ringmodulator -rapidly increases and decreases volume cyclically
- modulator -imprecise; people will assume this allows AM/FM modulation instead of ringmod.
- compressor -increases loudness in entire frequency range to the maximum
- equalizer
Effect waveforms:
- sine
- triangle
- sawtooth
- square
Effect parameters:
- type
- volume
Reverb:
- gain
- reverbgain
- hfgain
- density
- diffusion
- decay
- hfdecay
- earlygain
- lategain
- earlydelay
- latedelay
- rolloff
- roomrolloff
- airhfgain
- airabsorptionhfgain
- hflimiter
Chorus:
- waveform
- phase
- rate
- depth
- delay
- feedback
Distortion:
- gain
- edge -effect strength
- lowcut
- eqcenter
- eqbandwidth
Echo:
- delay -delay between input and first main echo
- lrdelay -delay between first main echo and second trailing echo
- damping
- spread -stereo separation between first and second echo
- feedback
Flanger:
- waveform
- phase
- rate
- depth
- delay
- feedback
Ring modulator:
- waveform
- frequency
- highcut
Equalizer:
- lowgain
- lowcut
- mid1gain
- mid1frequency
- mid1bandwidth
- mid2gain
- mid2frequency
- mid2bandwidth
- highgain
- highcut
Unsupported
Following effects and their constants are not supported in current version of AL-soft but as they get support in the future they may get enabled in LÖVE.
Effect types:
- frequencyshifter
- freqshifter
- vocalmorpher
- morpher
- pitchshifter
- autowah
Frequency shifter:
- frequency
- leftdirection
- rightdirection
Frequency shifting directions:
- up
- down
- none
Vocal morpher:
- waveform
- rate
- phonemea
- formant1
- phonemeb
- formant2
- tunea
- tuneb
Vocal morpher includes a substantial range of effect-specific phoneme constants, but they are no subject for debate, the only variable is letter casing: capital or lowercase, current being latter.
- Not that it matters, since it's unsupported for now, but i'd vote for uppercase.
Pitch shifter:
- pitch
Autowah:
- attack
- release
- resonance
- peakgain