Set Tempo to () | |
set tempo to () | |
Category | Music |
Type | Stack |
Introduced in | 1.2 |
The Set Tempo to () block is a Stack block and a Music block. The block sets the Scratch Project's tempo, or speed, to the specified amount, using the unit "bpm", or "beats per minute".
Prior to Scratch 3.0, this block was called Set Tempo to () bpm or set tempo to () bpm
.
Example Uses
As this block changes the tempo, it is mainly used to speed up and slow down the Play Drum () for () Beats block and the Play Note () for () Beats block.
Some common uses for the Set Tempo to () block:
- Changing the speed of songs made with the Sound blocks
- A music mixer
- In a project, using a record player and setting the speed of the needle
If one wants a beat to be equal to 1 second or relative to one second (as in previous play drum and play note blocks) they can set the bpm to 60.
Workaround
- Main article: List of Block Workarounds
This block can be replicated with the following code:
change tempo by ((. . .::grey) - (tempo))