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