From abf7d48bfdfd6e355f2e0c53f4471525ed7a7449 Mon Sep 17 00:00:00 2001 From: "Matthias L. Jugel" Date: Thu, 27 Oct 2016 17:58:36 +0200 Subject: [PATCH] added music function --- libs/core/shims.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libs/core/shims.d.ts b/libs/core/shims.d.ts index 6f5f91fd..affa3b2d 100644 --- a/libs/core/shims.d.ts +++ b/libs/core/shims.d.ts @@ -535,6 +535,15 @@ declare namespace music { //% blockId=device_play_note block="play|tone %note=device_note|for %duration=device_beat" icon="\uf025" blockGap=8 //% parts="speaker" shim=music::playTone function playTone(freqency: number, ms: number): void; + + /** + * Plays a tone through ``speaker``. + * @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" shim=music::ringTone + function ringTone(frequency: number): void; } declare namespace pins {