SetSoundEffectParameter: Difference between revisions
Jump to navigation
Jump to search
SaintsTalles (talk | contribs) |
Eznemgergo (talk | contribs) m (Clarified using method) |
||
(One intermediate revision by one other user not shown) | |||
Line 21: | Line 21: | ||
==Example== | ==Example== | ||
NOTE: This function will only work if it's executed within a timer. | |||
<syntaxhighlight lang="lua"> | |||
--An example via a timer | |||
local mySound = playSound("discoSound.mp3", 0, 0, 10) | |||
setSoundEffectEnabled(mySound, "echo", true) | |||
setTimer(function() | |||
setSoundEffectParameter(mySound, "echo", "wetDryMix", 80) | |||
end, 1, 1) | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
local sound = playSound3D ("music.mp3", 0, 0, 10) | local sound = playSound3D ("music.mp3", 0, 0, 10) | ||
Line 28: | Line 39: | ||
setSoundEffectParameter (sound, "echo", "feedback", 30) | setSoundEffectParameter (sound, "echo", "feedback", 30) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Client_audio_functions}} | {{Client_audio_functions}} |
Latest revision as of 14:25, 8 March 2025
This function sets the parameter of a sound effect.
Syntax
bool setSoundEffectParameter ( element sound, string effectName, string effectParam, var paramValue )
OOP Syntax Help! I don't understand this!
- Method: sound:setEffectParameter(...)
Required Arguments
- sound: The sound element.
- effectName: The name of the effect whose parameter you want to change:
- gargle
- compressor
- echo
- i3dl2reverb
- distortion
- chorus
- parameq
- reverb
- flanger
Returns
Returns true if effect have been set successfully, false otherwise.
Effects Parameters
ExpandChorus |
---|
ExpandCompressor |
---|
ExpandDistortion |
---|
ExpandEcho |
---|
ExpandFlanger |
---|
ExpandGargle |
---|
ExpandI3DL2 Reverb |
---|
ExpandParametric Equalizer |
---|
ExpandReverb |
---|
Example
NOTE: This function will only work if it's executed within a timer.
--An example via a timer local mySound = playSound("discoSound.mp3", 0, 0, 10) setSoundEffectEnabled(mySound, "echo", true) setTimer(function() setSoundEffectParameter(mySound, "echo", "wetDryMix", 80) end, 1, 1)
local sound = playSound3D ("music.mp3", 0, 0, 10) setSoundEffectEnabled (sound, "echo", true) setSoundEffectParameter (sound, "echo", "wetDryMix", 80) setSoundEffectParameter (sound, "echo", "feedback", 30)
See Also
- getRadioChannel
- getRadioChannelName
- getSFXStatus
- getSoundBPM
- getSoundBufferLength
- getSoundEffectParameters
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundLevelData
- getSoundMaxDistance
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundLooped
- isSoundPanningEnabled
- isSoundPaused
- playSFX3D
- playSFX
- playSound3D
- playSound
- setRadioChannel
- setSoundEffectEnabled
- setSoundEffectParameter
- setSoundLooped
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound
- Shared
- playSoundFrontEnd