Adding support for music melody arrays (#358)

* Adding support for music melody arrays in Typescript
This commit is contained in:
Sam El-Husseini
2017-02-28 15:23:32 -08:00
committed by GitHub
parent 92508d2daf
commit e947f4859b
6 changed files with 314 additions and 0 deletions

View File

@ -0,0 +1,29 @@
# 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)