GetSoundEffectParameters: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Client function}} {{New feature/item|3.0159|1.5.8|20921|This function sets parameter of sound effect.}} ==Syntax== <syntaxhighlight lang="lua">table getSoundEff...") |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
(17 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
{{ | {{Added feature/item|1.5.9|1.5.8|20914|This function gets the parameters of a [[sound]] effect.}} | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">table getSoundEffectParameters( element sound, string effectName )</syntaxhighlight> | <syntaxhighlight lang="lua">table getSoundEffectParameters ( element sound, string effectName )</syntaxhighlight> | ||
{{OOP||[[sound]]:getEffectParameters}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''sound''': the sound | *'''sound''': The [[sound]] [[element]] to get the sound effect parameters of. | ||
*'''effectName''': the effect | *'''effectName''': The name of the effect whose parameters you want to retrieve: | ||
{{Sound_Effects}} | |||
===Returns=== | ===Returns=== | ||
Returns ''' | Returns a [[table]] with the parameter names as the keys, and their values. If the specified effect name is not valid, ''false'' is returned. | ||
===Effects Parameters=== | |||
===Parameters= | {{Sound_Effects_Parameters}} | ||
{{ | |||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
getSoundEffectParameters( | local sound = playSound ("music.mp3") | ||
setSoundEffectEnabled (sound, "echo", true) | |||
local echoParams = getSoundEffectParameters (sound, "echo") | |||
print (echoParams.feedback) -- 50 | |||
iprint (echoParams) | |||
--[[ | |||
{ | |||
feedback = 50, | |||
leftDelay = 500, | |||
panDelay = false, | |||
rightDelay = 500, | |||
wetDryMix = 50 | |||
} | |||
]] | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{ | {{Audio_functions|client}} |
Latest revision as of 17:27, 7 November 2024
This function gets the parameters of a sound effect.
Syntax
table getSoundEffectParameters ( element sound, string effectName )
OOP Syntax Help! I don't understand this!
- Method: sound:getEffectParameters(...)
Required Arguments
- sound: The sound element to get the sound effect parameters of.
- effectName: The name of the effect whose parameters you want to retrieve:
- gargle
- compressor
- echo
- i3dl2reverb
- distortion
- chorus
- parameq
- reverb
- flanger
Returns
Returns a table with the parameter names as the keys, and their values. If the specified effect name is not valid, false is returned.
Effects Parameters
ExpandChorus |
---|
ExpandCompressor |
---|
ExpandDistortion |
---|
ExpandEcho |
---|
ExpandFlanger |
---|
ExpandGargle |
---|
ExpandI3DL2 Reverb |
---|
ExpandParametric Equalizer |
---|
ExpandReverb |
---|
Example
local sound = playSound ("music.mp3") setSoundEffectEnabled (sound, "echo", true) local echoParams = getSoundEffectParameters (sound, "echo") print (echoParams.feedback) -- 50 iprint (echoParams) --[[ { feedback = 50, leftDelay = 500, panDelay = false, rightDelay = 500, wetDryMix = 50 } ]]
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