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

680 B

Rest

Rest (play no sound) through pin PO for the amount of time you say.

Simulator

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

music.rest(400)

Parameters

  • ms is a number saying how many milliseconds the @boardname@ should rest. One second is 1000 milliseconds.

Example

let frequency = music.noteFrequency(Note.C)
music.playTone(frequency, 1000)
music.rest(1000)

See also

play tone, ring tone , tempo, set tempo, change tempo by