From Test-Scratch-Wiki
![]() |
This article or section documents a feature not included in the current version of Scratch (3.0). It is only useful from a historical perspective. |
Loud? | |
![]() | |
Category | Sensing |
Type | Boolean |
Removed in | 2.0 |
The Loud? block was a Sensing block and a Boolean block. The block checked the loudness value that the microphone received — if the loudness was above 30, the block returned true; otherwise, it returned false.
To use this block, a microphone had to be connected and active on your computer. This block did not work on the Java Player but did work on the Flash Player, though you had to give it permission manually each time you run the project.
This was one of only two boolean blocks that can be displayed as a Stage monitor. The other is Sensor ()?.
Workaround
- Main article: List of Block Workarounds
Because of this block's straightforward function, it can be replicated with the following code:
<(loudness) > [30]>
Example Uses
As the block checked if there is any loud noise, it was useful in projects that analyzed sound input.
Some common uses for the Loud? block:
- Projects that measure a Scratcher's voice
forever say (join (loudness) (join [ ] <loud?>))
- Controlling things in projects with your voice
forever if <loud?> move (10) steps if on edge, bounce
- Voice activated speeches
forever if <loud?> say [BE QUIET!] else say [] end
- Voice analyzers
wait until <key [space v] pressed?> if <loud?> then say [You are a very loud and outgoing person. You like to speak up when there is the need.] for (5) secs else say [You are a timid person, but one to be weary of. There is more than meets the eye.] for (5) secs end