Simulator: ||music:ring tone||
works on the LEGO® MINDSTORMS® Education EV3. It might not work in the simulator on every browser.
ring Tone
Play a musical tone on the speaker. The tone has a pitch (frequency) as high or low as you say. The tone will keep playing until tell it to stop.
music.ringTone(0);
The tone will keep playing until you stop it with ||music:stop all sounds||
.
Parameters
frequency
is a number that says how high-pitched or low-pitched the tone is. This number is in Hz (Hertz), which is a measurement of frequency (pitch).
Example
This program checks the speed from the large A
motor and uses the speed to adjust a tone it rings.
loops.forever(function () {
music.ringTone(motors.largeA.speed() * 100)
})
See also
rest, play tone, tempo, set tempo, change tempo by
music