pxt-calliope/docs/reference/music/rest.md

29 lines
628 B
Markdown
Raw Normal View History

2016-03-26 00:47:20 +01:00
# Rest
Rests (plays nothing) for a specified time through pin PO.
## Simulator
Simulation of this function is available in many, but not all browsers.
```sig
music.rest(400)
```
### Parameters
2016-04-13 17:27:45 +02:00
* `ms`: [Number](/reference/types/number) - the duration of the rest (milliseconds)
2016-03-26 00:47:20 +01:00
## Example
```blocks
let frequency = music.noteFrequency(Note.C)
music.playTone(frequency, 1000)
music.rest(1000)
```
### See also
2016-04-13 17:27:45 +02: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-26 00:47:20 +01:00