diff --git a/docs/reference.md b/docs/reference.md index f0f57d82..8b9b3748 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -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) diff --git a/docs/reference/music/ring-tone.md b/docs/reference/music/ring-tone.md new file mode 100644 index 00000000..9d94d5d7 --- /dev/null +++ b/docs/reference/music/ring-tone.md @@ -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) +}) +``` \ No newline at end of file diff --git a/docs/reference/music/set-volume.md b/docs/reference/music/set-volume.md new file mode 100644 index 00000000..a6e8231e --- /dev/null +++ b/docs/reference/music/set-volume.md @@ -0,0 +1,10 @@ +# @extends + +## Example #example + +Play a tyrannosaurus roar at half volume. + +```blocks +music.setVolume(50) +music.playSoundEffect(sounds.animalsTRexRoar) +``` \ No newline at end of file diff --git a/docs/reference/music/stop-all-sounds.md b/docs/reference/music/stop-all-sounds.md new file mode 100644 index 00000000..639d85e2 --- /dev/null +++ b/docs/reference/music/stop-all-sounds.md @@ -0,0 +1,10 @@ +# @extends + +## Example #example + +Play a sound effect but stop it right away. + +```blocks +music.playSoundEffect(sounds.expressionsCrying) +music.stopAllSounds() +``` \ No newline at end of file