Difference between revisions of "Sound.fadeIn"
Jump to navigation
Jump to search
SpatialPlays (talk | contribs) (Created page with "<c>Sound.fadeIn</c> controls how much to fade a sound in from silence in seconds. == Examples == This script creates a sort of comedic sliding up sound that fades in for...") |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | <c>[[Sound]].fadeIn</c> controls how much to fade a sound in from silence in seconds. | + | <c>[[Sound]].fadeIn</c> controls how much to fade a sound in from silence in seconds. If not specified, a value of 0.01 is used. |
== Examples == | == Examples == | ||
− | This script creates a sort of comedic sliding up sound that fades in for a second. | + | This script creates a sort of comedic sliding up sound that fades in for a second: |
− | + | [https://commons.wikimedia.org/wiki/File:Mini_Micro_-_Slide_Up.ogg Link to Generated Audio] | |
<ms>snd = new Sound | <ms>snd = new Sound | ||
− | duration = 2 | + | snd.duration = 2 |
− | + | snd.freq = [ noteFreq(60), noteFreq(72) ] | |
− | envelope = 1 | + | snd.envelope = 1 |
− | + | snd.waveform = Sound.sineWave | |
− | snd. | ||
snd.fadeIn = 1 | snd.fadeIn = 1 | ||
snd.play</ms> | snd.play</ms> | ||
+ | |||
+ | See also: <c>[[Sound.fadeOut]]</c>; <c>[[Sound.envelope]]</c> | ||
[[Category:Mini Micro]] | [[Category:Mini Micro]] |
Latest revision as of 20:52, 1 August 2020
Sound.fadeIn
controls how much to fade a sound in from silence in seconds. If not specified, a value of 0.01 is used.
Examples
This script creates a sort of comedic sliding up sound that fades in for a second: Link to Generated Audio
snd = new Sound
snd.duration = 2
snd.freq = [ noteFreq(60), noteFreq(72) ]
snd.envelope = 1
snd.waveform = Sound.sineWave
snd.fadeIn = 1
snd.play
See also: Sound.fadeOut
; Sound.envelope