Example overrides for 'music' api docs (#353)
* Example overrides for 'music' api docs * Drop 'music' into card page
This commit is contained in:
parent
6d07d5bd23
commit
ab3c4c5267
|
@ -1,6 +1,7 @@
|
|||
# Reference
|
||||
|
||||
```namespaces
|
||||
music.playSoundEffect(sounds.animalsCatPurr);
|
||||
sensors.color(null);
|
||||
motors.stopAll();
|
||||
brick.showMood(moods.sleeping);
|
||||
|
@ -18,5 +19,6 @@ control.runInParallel(function(){});
|
|||
[brick](/reference/brick),
|
||||
[sensors](/reference/sensors),
|
||||
[motors](/reference/motors),
|
||||
[music](/reference/music),
|
||||
[control](/reference/control),
|
||||
[console](/reference/console)
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
# @extends
|
||||
|
||||
## Example #example
|
||||
|
||||
Play a tyrannosaurus roar at half volume.
|
||||
|
||||
```blocks
|
||||
music.setVolume(50)
|
||||
music.playSoundEffect(sounds.animalsTRexRoar)
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
# @extends
|
||||
|
||||
## Example #example
|
||||
|
||||
Play a sound effect but stop it right away.
|
||||
|
||||
```blocks
|
||||
music.playSoundEffect(sounds.expressionsCrying)
|
||||
music.stopAllSounds()
|
||||
```
|
Loading…
Reference in New Issue