Sound:reverb([roomsize], [damping], [width], [dry], [wet]) method


Apply a reverberation effect on the sound. Calling this method with an explicit nil will suppress the reverb effect.

Parameters

[roomsize]

A number representing the virtual room size: 0.0 is like a closet, 1.0 is like a large auditorium. The default value is 0.5

[damping]

A number representing the absorption of high frequencies in the virtual room: 0.0 means no absorption, 1.0 means maximal absorption. The default value is 0.25

[width]

A number representing the "width" of the reverb effect : high values create a more "spacious" effect The default value is 1.0 second.

[dry]

A number representing the volume adjustement of the original ("dry") sound. The default value is 0.0

[wet]

A number representing the volume adjustement of the reverb ("wet") effect. The default value is 0.33333333333

Return value

This function returns no value.

Example

local audio = require "audio" local ui = require "ui" local win = ui.Window("Music player", "single", 320, 200) local file = sys.File("music.mp3") local ch = ui.Checkbox(win, "Reverb effect") ch:center() win:status("Playing "..file.name) local sound = audio.Sound(file) sound:play() function ch:onClick() if ch.checked then sound:reverb() -- apply reverb effect with default values else sound:reverb(nil) -- suppress reverb effect end end win:show() while win.visible do ui.update() end