pxt-calliope/docs/reference/music/change-tempo-by.md

38 lines
739 B
Markdown
Raw Normal View History

2016-03-26 00:47:20 +01:00
# Change Tempo By
Makes the [tempo](/reference/music/tempo) (speed of a piece of music)
faster or slower by the amount you say.
2016-03-26 00:47:20 +01:00
## Simulator
2016-11-02 01:44:37 +01:00
This function only works on the @boardname@ and in some browsers.
2016-03-26 00:47:20 +01:00
```sig
music.changeTempoBy(20)
```
### Parameters
2016-07-18 19:39:41 +02:00
* ``bpm`` is a [number](/reference/types/number) that says how much to
change the bpm (beats per minute, or number of beats in a minute of
2016-11-02 01:44:37 +01:00
the music that the @boardname@ 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)
```
2016-03-26 00:47:20 +01:00
### See also
2016-04-13 17:27:45 +02:00
[play tone](/reference/music/play-tone), [ring tone](/reference/music/ring-tone)
2016-03-26 00:47:20 +01:00