2016-03-26 00:47:20 +01:00
|
|
|
# Rest
|
|
|
|
|
2016-06-07 00:41:17 +02:00
|
|
|
Rest (play no sound) through pin `PO` for the amount of time you say.
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
```sig
|
|
|
|
music.rest(400)
|
|
|
|
```
|
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
### ~ hint
|
|
|
|
|
|
|
|
**Simulator**: This function only works on the @boardname@ and in some browsers.
|
|
|
|
|
|
|
|
## ~
|
|
|
|
|
|
|
|
## Parameters
|
2016-03-26 00:47:20 +01:00
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
* ``ms`` is a [number](/types/number) saying how many
|
2016-11-02 01:44:37 +01:00
|
|
|
milliseconds the @boardname@ should rest. One second is 1000
|
2016-07-18 19:39:41 +02:00
|
|
|
milliseconds.
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
```blocks
|
|
|
|
let frequency = music.noteFrequency(Note.C)
|
|
|
|
music.playTone(frequency, 1000)
|
|
|
|
music.rest(1000)
|
|
|
|
```
|
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
## See also
|
2016-03-26 00:47:20 +01:00
|
|
|
|
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
|
|
|
|