pxt-calliope/docs/reference/music/change-tempo-by.md
Sam El-Husseini e3975e65e5 pxt-microbit Accessibility PR (#529)
* Accessibility changes
2017-09-07 13:42:08 -07:00

726 B

Change Tempo By

Makes the tempo (speed of a piece of music) faster or slower by the amount you say.

Simulator

This function only works on the @boardname@ and in some browsers.

music.changeTempoBy(20)

Parameters

  • bpm is a number that says how much to change the bpm (beats per minute, or number of beats in a minute of the music that the @boardname@ is playing).

Examples

This program makes the music faster by 12 bpm.

music.changeTempoBy(12)

This program makes the music slower by 12 bpm.

music.changeTempoBy(-12)

See also

play tone, ring tone