fixing typos

This commit is contained in:
Peli de Halleux 2016-11-03 08:50:02 -07:00
parent 2138725a44
commit c03fac2162
4 changed files with 5 additions and 30 deletions

View File

@ -109,12 +109,12 @@
"music.changeTempoBy|param|bpm": "The change in beats per minute to the tempo, eg: 20",
"music.noteFrequency": "Gets the frequency of a note.",
"music.noteFrequency|param|name": "the note name",
"music.playTone": "Plays a tone through pin ``P0`` for the given duration.",
"music.playTone": "Plays a tone through ``speaker`` for the given duration.",
"music.playTone|param|frequency": "pitch of the tone to play in Hertz (Hz)",
"music.playTone|param|ms": "tone duration in milliseconds (ms)",
"music.rest": "Rests (plays nothing) for a specified time through pin ``P0``.",
"music.rest|param|ms": "rest duration in milliseconds (ms)",
"music.ringTone": "Plays a tone through pin ``P0``.",
"music.ringTone": "Plays a tone through ``speaker``.",
"music.ringTone|param|frequency": "pitch of the tone to play in Hertz (Hz)",
"music.setTempo": "Sets the tempo to the specified amount",
"music.setTempo|param|bpm": "The new tempo in beats per minute, eg: 120",

View File

@ -9,8 +9,8 @@ namespace music {
//% help=music/play-tone weight=90
//% blockId=device_play_note block="play|tone %note=device_note|for %duration=device_beat" icon="\uf025" blockGap=8
//% parts="speaker" async
void playTone(int freqency, int ms) {
uBit.soundmotor.Sound_On(freqency);
void playTone(int frequency, int ms) {
uBit.soundmotor.Sound_On(frequency);
if(ms > 0) uBit.sleep(ms);
uBit.soundmotor.Sound_Off();
}

View File

@ -129,31 +129,6 @@ enum BeatFraction {
namespace music {
let beatsPerMinute: number = 120;
// /**
// * Plays a tone through pin ``P0`` for the given duration.
// * @param frequency pitch of the tone to play in Hertz (Hz)
// * @param ms tone duration in milliseconds (ms)
// */
// //% help=music/play-tone weight=90
// //% blockId=device_play_note block="play|tone %note=device_note|for %duration=device_beat" icon="\uf025" blockGap=8
// //% parts="speaker"
// export function playTone(frequency: number, ms: number): void {
// pins.analogSetPitchPin(AnalogPin.P0);
// pins.analogPitch(frequency, ms);
// }
//
// /**
// * Plays a tone through pin ``P0``.
// * @param frequency pitch of the tone to play in Hertz (Hz)
// */
// //% help=music/ring-tone weight=80
// //% blockId=device_ring block="ring tone (Hz)|%note=device_note" icon="\uf025" blockGap=8
// //% parts="speaker"
// export function ringTone(frequency: number): void {
// pins.analogSetPitchPin(AnalogPin.P0);
// pins.analogPitch(frequency, 0);
// }
/**
* Rests (plays nothing) for a specified time through pin ``P0``.
* @param ms rest duration in milliseconds (ms)

View File

@ -548,7 +548,7 @@ declare namespace music {
//% help=music/play-tone weight=90
//% blockId=device_play_note block="play|tone %note=device_note|for %duration=device_beat" icon="\uf025" blockGap=8
//% parts="speaker" async shim=music::playTone
function playTone(freqency: number, ms: number): void;
function playTone(frequency: number, ms: number): void;
/**
* Plays a tone through ``speaker``.