このライブラリでは、単音とメロディの出力が可能です。 In this library, you can output a single tone and melody. mbedのpwmOutとDigitalOutを使ってスピーカや圧電ブザーを直接駆動します。 directly drive speaker or buzzer and DigitalOut pwmOut using the mbed. メロディデータは、mbedのローカルにtxtファイルとして保存するか、プログラム中に配列データとして保存してください。 Melody data is either stored in a txt file on the local mbed, save it as a data array in the program.

Dependents:   kitchenTimer_Clock SoundLibraryExample_Melody_ProgramData M3PI_SuiviLigne

Files at this revision

API Documentation at this revision

Comitter:
suupen
Date:
Sun Jan 15 00:03:06 2012 +0000
Parent:
10:059d4df77110
Child:
12:66e192fc663e
Commit message:
120115 bug fix

Changed in this revision

Sound.cpp Show annotated file Show diff for this revision Revisions of this file
Sound.h Show annotated file Show diff for this revision Revisions of this file
--- a/Sound.cpp	Sun Jan 08 12:10:42 2012 +0000
+++ b/Sound.cpp	Sun Jan 15 00:03:06 2012 +0000
@@ -208,7 +208,7 @@
     
     // enso data settei
     if((sound_sound() == false)     // oto no syuturyoku jikan hantei
-    & (onpu != NULL)                // enso chu ka wo kakunin
+    && (onpu != NULL)                // enso chu ka wo kakunin          // 120115 bug fix
      ){
         // tugi no onpu data syutoku
         sound_t data = *onpu;
--- a/Sound.h	Sun Jan 08 12:10:42 2012 +0000
+++ b/Sound.h	Sun Jan 15 00:03:06 2012 +0000
@@ -22,12 +22,13 @@
 
 /***********************************************************************/
 /*                                                                     */
-/*    Sound.h                                                       */
+/*    Sound.h                                                          */
 /*                                                                     */
 /*    V0.1 : 2011/11/13                                                */
 /*    V0.2 : 2011/11/19  Added copyright notice                        */ 
 /*    V1.1 : 2011/12/11 muon ji no syori bug fix                       */
-/*    V1.2 : 2012/01/08 sound start bug fix                            */ 
+/*    V1.2 : 2012/01/08 sound start bug fix                            */
+/*    V1.3 : 2012/01/15 sound_ensoSyori(void) bug fix                  */  
 /***********************************************************************/
 #ifndef _SOUND_H
 #define _SOUND_H