29 lines
674 B
Markdown
Raw Normal View History

2016-03-25 16:47:20 -07:00
# Rest
2016-06-06 15:41:17 -07:00
Rest (play no sound) through pin `PO` for the amount of time you say.
2016-03-25 16:47:20 -07:00
## Simulator
2016-06-06 15:41:17 -07:00
This function only works on the micro:bit and in some browsers.
2016-03-25 16:47:20 -07:00
```sig
music.rest(400)
```
### Parameters
2016-06-06 15:41:17 -07:00
* a [number](/reference/types/number) saying how many milliseconds the micro:bit should rest. One second is 1000 milliseconds.
2016-03-25 16:47:20 -07:00
## Example
```blocks
let frequency = music.noteFrequency(Note.C)
music.playTone(frequency, 1000)
music.rest(1000)
```
### See also
2016-04-13 08:27:45 -07:00
[play tone](/reference/music/play-tone), [ring tone](/reference/music/ring-tone) , [tempo](/reference/music/tempo), [set tempo](/reference/music/set-tempo), [change tempo by](/reference/music/change-tempo-by)
2016-03-25 16:47:20 -07:00