Sound.fadeOut
Revision as of 07:20, 28 April 2020 by SpatialPlays (talk | contribs) (Adds link to audio generated by the example script)
Sound.fadeOut
controls how much a sound should fade out at the end in seconds.
Examples
This script produces a comedic falling sound followed by a boom at the end: Link to Generated Audio
slide = new Sound
boom = new Sound
slideDuration = 5
boomDuration = 1
slideFreq = [ noteFreq(84), noteFreq(48) ]
boomFreq = 0.5
slide.init slideDuration, slideFreq, 1, Sound.sineWave
boom.init boomDuration, boomFreq, 1, Sound.noiseWave
slide.fadeOut = 4
boom.fadeOut = 1
slide.play
wait slideDuration
boom.play
See also: Sound.fadeIn
; Sound.envelope