updated docs paths
This commit is contained in:
@ -119,7 +119,7 @@ namespace music {
|
||||
* @param frequency TODO
|
||||
* @param ms TODO
|
||||
*/
|
||||
//% help=functions/play-tone weight=90
|
||||
//% help=music/play-tone weight=90
|
||||
//% blockId=device_play_note block="play|tone (Hz) %note=device_note|for (ms) %duration=device_beat" icon="\uf025" blockGap=8
|
||||
export function playTone(frequency: number, ms: number): void {
|
||||
pins.analogSetPitchPin(AnalogPins.P0);
|
||||
@ -130,7 +130,7 @@ namespace music {
|
||||
* Plays a tone through pin ``P0``.
|
||||
* @param frequency TODO
|
||||
*/
|
||||
//% help=functions/ring-tone weight=80
|
||||
//% help=music/ring-tone weight=80
|
||||
//% blockId=device_ring block="ring tone (Hz)|%note=device_note" icon="\uf025" blockGap=8
|
||||
export function ringTone(frequency: number): void {
|
||||
pins.analogSetPitchPin(AnalogPins.P0);
|
||||
@ -141,7 +141,7 @@ namespace music {
|
||||
* Rests (plays nothing) for a specified time through pin ``P0``.
|
||||
* @param ms TODO
|
||||
*/
|
||||
//% help=functions/rest weight=79
|
||||
//% help=music/rest weight=79
|
||||
//% blockId=device_rest block="rest(ms)|%duration=device_beat"
|
||||
export function rest(ms: number): void {
|
||||
playTone(0, ms);
|
||||
@ -152,7 +152,7 @@ namespace music {
|
||||
* Gets the frequency of a note.
|
||||
* @param name TODO
|
||||
*/
|
||||
//% shim=TD_ID weight=50 help=functions/note-frequency
|
||||
//% shim=TD_ID weight=50 help=music/note-frequency
|
||||
//% blockId=device_note block="%note"
|
||||
export function noteFrequency(name: Notes): number {
|
||||
return name;
|
||||
@ -165,7 +165,7 @@ namespace music {
|
||||
/**
|
||||
* Returns the duration of a beat in milli-seconds
|
||||
*/
|
||||
//% help=/functions/beat weight=49
|
||||
//% help=music/beat weight=49
|
||||
//% blockId=device_beat block="%fraction|beat"
|
||||
export function beat(fraction : BeatFraction = BeatFraction.Whole): number {
|
||||
init();
|
||||
@ -180,7 +180,7 @@ namespace music {
|
||||
/**
|
||||
* Returns the tempo in beats per minute. Tempo is the speed (bpm = beats per minute) at which notes play. The larger the tempo value, the faster the notes will play.
|
||||
*/
|
||||
//% help=/functions/tempo weight=40
|
||||
//% help=music/tempo weight=40
|
||||
//% blockId=device_tempo block="tempo (bpm)" blockGap=8
|
||||
export function tempo(): number {
|
||||
init();
|
||||
@ -191,7 +191,7 @@ namespace music {
|
||||
* Change the tempo by the specified amount
|
||||
* @param bpm The change in beats per minute to the tempo, eg: 20
|
||||
*/
|
||||
//% help=/functions/tempo weight=39
|
||||
//% help=music/tempo weight=39
|
||||
//% blockId=device_change_tempo block="change tempo by (bpm)|%value" blockGap=8
|
||||
export function changeTempoBy(bpm: number): void {
|
||||
setTempo(beat(BeatFraction.Whole) + bpm);
|
||||
@ -201,7 +201,7 @@ namespace music {
|
||||
* Sets the tempo to the specified amount
|
||||
* @param bpm The new tempo in beats per minute, eg: 120
|
||||
*/
|
||||
//% help=/functions/tempo weight=38
|
||||
//% help=music/tempo weight=38
|
||||
//% blockId=device_set_tempo block="set tempo to (bpm)|%value"
|
||||
export function setTempo(bpm: number): void {
|
||||
init();
|
||||
|
Reference in New Issue
Block a user