pxt-calliope/docs/reference/music/beat.md
Galen Nickel dda488c08f
Update some music ref docs (#1693)
* Update some music ref docs

* bad link

* Actually add the note, hello
2018-12-02 16:46:05 -08:00

720 B

Beat

Returns the duration of a beat in milli-seconds

music.beat(BeatFraction.Whole)

~ hint

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

~

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