pxt-calliope/docs/reference/music/change-tempo.md
2016-06-06 17:29:23 -07:00

36 lines
720 B
Markdown

# Change Tempo By
Makes the [tempo](/reference/music/tempo) (speed of a piece of music)
faster or slower by the amount you say.
## Simulator
This function only works on the micro:bit and in some browsers.
```sig
music.changeTempoBy(20)
```
### Parameters
* a [number](/reference/types/number) that says how much to change the bpm (beats per minute, or number of beats in a minute of the music that the micro:bit is playing).
### Examples
This program makes the music faster by 12 bpm.
```blocks
music.changeTempoBy(12)
```
This program makes the music _slower_ by 12 bpm.
```blocks
music.changeTempoBy(-12)
```
### See also
[play tone](/reference/music/play-tone), [ring tone](/reference/music/ring-tone)