Synthesizer based on the Unzen / Nucleo F746ZG

Dependencies:   amakusa mbed-dsp mbed shimabara ukifune unzen_nucleo_f746

Fork of skeleton_unzen_nucleo_f746 by seiichi horie

雲仙フレームワークのテストとして作っているプロジェクトです。中身はどんどん変っていきます。 説明はDSP空挺団の「シンセサイザー」カテゴリーを参照してください。初回は「ドッグフードを食べる」です。

Revision:
11:7d8740437e6a
Parent:
9:7f521a0b397c
Child:
12:2b121255e2d1
--- a/main.cpp	Fri Jan 27 02:18:26 2017 +0000
+++ b/main.cpp	Sat Jan 28 12:51:50 2017 +0000
@@ -41,6 +41,8 @@
 /*========================= Main program. ====================================*/
 int main() 
 {    
+    uint32_t pushing, releasing, holding;
+
         // start audio. Do not touch
     initialize_system();
  
@@ -49,6 +51,24 @@
     {       // place your foreground program here.
         process->set_volume( ukifune::get_volume(0) );   
        
+            // sample usage of button switch detection
+        ukifune::get_button_state( pushing, releasing, holding);
+
+            // pushing detection demo
+        if ( pushing & (1 << ukifune::swm1 ) )      // is SWM1 switch pusshing down?
+            ukifune::toggle_led( ukifune::led1_1 ); // then, toggle LED1_1 
+
+            // releasing detection demo     
+        if ( releasing & (1 << ukifune::swm2 ) )    // is SWM2 switch releasing? 
+            ukifune::toggle_led( ukifune::led2_1 ); // then toggle LED2_1
+       
+            // holding detection demo     
+        if ( holding & (1 << ukifune::swm3 ) )    // is SWM2 switch holding? 
+            ukifune::turn_led_on( ukifune::led3_1 );    // then turn LED3_1 on
+        else
+            ukifune::turn_led_off( ukifune::led3_1 );   // else off
+
+       
             // you have to call tick() every 20mS-50mS if you need get_volume()
         wait(0.05);
         ukifune::tick();