average
)Sound is pressure waves, and the patterns of those waves determine what the sound sounds like. In Snap!, sounds can be generated as lists of volume intensities. You'll start by creating one second of "noise", which is just random intensities that sound like static.
noise
to store the intensity values, and make it start as an empty list.Click for a break-down of how this code works.
pick random
is -0.99999 instead of -1 to force that block to output decimals rather than only integers.add
block is repeated sampling rate number of times.warp
block acts like a time-warp to speed things up.
The sample rate is how many intensity samples fit in one second of sound samples detected by the microphone.
play
block, turn down the volume, and play the noise. Debug your code if needed.