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

767 B

Begin Melody

Begin playing a musical melody through pin P0 of the @boardname@.

Simulator

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

music.beginMelody(music.builtInMelody(Melodies.Entertainer), MelodyOptions.Once)

Parameters

  • melody is the array representation of a melody you wish to play

Example

This example plays the Entertainer built-in melody.

music.beginMelody(music.builtInMelody(Melodies.Entertainer), MelodyOptions.Once)

See also

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