From Test-Scratch-Wiki

The Loudness value increases or decreases depending on how loud or quiet the sound is that is being detected by the microphone connected to Scratch. If no microphone is connected, the value is constantly 10, 0 or -1. It does not record sound on a recognized scale, but it ranges from 0-100; once it gets to 100, no matter how loud it gets, the value remains at 100.

Related Blocks

The following blocks can be used in conjunction with this value:

— The stage monitor and reporter block that reports the value of the volume detected by the microphone

— The stage monitor and boolean block that reports whether or not the volume detected by the microphone is loud

In Scratch 1.3.0, the MIDI note, not just the volume, could be accessed by using the note block.

Example Uses

Some common uses for the Loudness value:

  • Voice analyzers
  • Depending on how loud a noise is, the greater response
  • Setting a microphone's size to a noise's loudness
  • Loudness graphing


While the loudness blocks sense microphone input, the Watch Me Move! blocks sense webcam input. Together, they can be used to sense real-life action, as shown below:

when gf clicked
 if < <(video [motion v] on [Stage v]) < [30]> and <(loudness) < [30]>> then
  say [No fun!]
 if < <(video [motion v] on [Stage v]) > [30]> and <(loudness) < [30]>> then
  say [Turn up the volume!]
 if <<(video [motion v] on [Stage v]) < [30]> and <(loudness) > [30]>> then
  say [Start moving!]
 if <<(video [motion v] on [Stage v]) > [30]> and <(loudness) > [30]>> then
  say [Party!]

See Also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.