(added de:Lautstärke (Block))
|Line 55:||Line 55:|
Revision as of 14:44, 15 July 2013
- This article is about the block. For more information about the value this block reports, see Volume (value).
- Main article: List of Block Workarounds
This block can be simply replicated with the following code:
([volume v] of [sprite v])
where "sprite" is replaced by the sprite you are finding the volume of.
As this block holds how loud sounds, drums, and notes will be played, it is useful in music projects where they must sense how loud an instrument has been played.
Some common uses for the Volume block:
- Volume controls
when this sprite clicked repeat until <not <mouse down?>> point towards [mouse-pointer v] if <(direction) < > point in direction (0 v) else if <(direction) > > point in direction (100 v) else set volume to (direction)% end end say (join (volume) [%]) end say (join (volume) [%]) for (2) secs
- Loops that must stop once the volume is at a certain amount
repeat until <(volume) = > change volume by (-10) end
- Sensing how loud something is being played
when gf clicked forever say (volume)