Example overrides for 'music' api docs (#353)

* Example overrides for 'music' api docs

* Drop 'music' into card page
This commit is contained in:
Galen Nickel
2018-02-27 17:15:26 -08:00
committed by Peli de Halleux
parent 6d07d5bd23
commit ab3c4c5267
4 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,11 @@
# @extends
## Example #example
This program checks the speed from the large `A` motor and uses the speed to adjust a tone it rings.
```blocks
loops.forever(function () {
music.ringTone(motors.largeA.speed() * 100)
})
```

View File

@ -0,0 +1,10 @@
# @extends
## Example #example
Play a tyrannosaurus roar at half volume.
```blocks
music.setVolume(50)
music.playSoundEffect(sounds.animalsTRexRoar)
```

View File

@ -0,0 +1,10 @@
# @extends
## Example #example
Play a sound effect but stop it right away.
```blocks
music.playSoundEffect(sounds.expressionsCrying)
music.stopAllSounds()
```