Difference between revisions of "Sound.fadeIn"

From MiniScript Wiki
Jump to navigation Jump to search
m (Adds links to related pages)
(Adds a link to the audio generated by the example script)
Line 2: Line 2:
  
 
== 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
 
duration = 2

Revision as of 07:15, 28 April 2020

Sound.fadeIn 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 a second: Link to Generated Audio

snd = new Sound
duration = 2
freqList = [ noteFreq(60), noteFreq(72) ]
envelope = 1

snd.init duration, freqList, envelope, Sound.sineWave

snd.fadeIn = 1

snd.play

See also: Sound.fadeOut; Sound.envelope