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 block can be used in conjunction with this value:

Prior to Scratch 2.0, there was also another block, loud?::sensing boolean, that reported true when the loudness exceeded 30. It could be displayed as a stage monitor.

In Scratch 1.3, the MIDI note, not just the volume, could be accessed by using the note::sensing reporter 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