- "Tempo" redirects here. For the value, see Tempo (value).
Tempo | |
tempo | |
Category | Music |
Type | Reporter |
Introduced in | 1.2 |
The Tempo block is a Music Extension block and a Reporter block. Tempo reports the project's tempo. This block can be displayed as a Stage Monitor.
Example Uses
As this block holds how long drums and notes will be played, it is often found useful in music projects where they must sense how long an instrument will be playing.
Some common uses for the Tempo block:
- Speed controls on projects that play music made with the Music Extension
when green flag clicked forever if <mouse down?> then point towards (mouse-pointer v) set tempo to (((direction) mod (181)) + (20)) set [universal tempo v] to (tempo) end end
- Loops that must stop once the tempo is at a certain amount
repeat until <(tempo) = [20]> change tempo by (-1) end
- Sensing and showing how fast something is being played
when gf clicked forever say (tempo) point in direction (tempo) end
- Synchronizing with notes with adjustable tempo
when green flag clicked ask [Tempo?] and wait set tempo to (answer) play note (57) for (1) beats play note (59) for (1) beats play note (60) for (1) beats when green flag clicked wait until <not<(answer) = [] >> say [A] for ((60) / (tempo)) seconds say [B] for ((60) / (tempo)) seconds say [C] for ((60) / (tempo)) seconds