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

702 B

Beat

Returns the duration of a beat in milli-seconds

Simulator

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

music.beat(BeatFraction.Whole)

Parameters

  • BeatFraction means fraction of a beat (BeatFraction.Whole, BeatFraction.Sixteenth etc)

Returns

  • a number that means the amount of milli-seconds a beat fraction represents.

Example

music.playTone(Note.C, music.beat(BeatFraction.Quarter))

See also

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