pxt-calliope/docs/reference/music/play-builtin-melody.md
Sam El-Husseini e947f4859b Adding support for music melody arrays (#358)
* Adding support for music melody arrays in Typescript
2017-02-28 15:23:32 -08:00

30 lines
689 B
Markdown

# Play Built-in Melody
Play a built in musical melody through pin ``P0`` of the @boardname@.
## Simulator
This function only works on the @boardname@ and in some browsers.
```sig
music.playBuiltinMelody(Melodies.Entertainer)
```
### Parameters
* ``melody`` is the kind of built-in melody you want to play
## Example
This example plays the ``Entertainer`` melody.
```blocks
music.playBuiltinMelody(Melodies.Entertainer)
```
### See also
[play tone](/reference/music/play-tone), [rest](/reference/music/rest), [ring tone](/reference/music/ring-tone) , [tempo](/reference/music/tempo), [set tempo](/reference/music/set-tempo),
[change tempo by](/reference/music/change-tempo-by)