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:
28:547f19ed6f67
Parent:
26:e99f71165e19
--- a/vfo.cpp	Sat Feb 11 07:15:21 2017 +0000
+++ b/vfo.cpp	Sat Feb 11 07:44:56 2017 +0000
@@ -64,7 +64,7 @@
     this->update_parameters();
 }
 
-void VFO::set_frequency( int freq )
+void VFO::set_frequency( float freq )
 {
     if ( freq > this->Fs / 4 )
         freq = Fs / 4;
@@ -97,7 +97,7 @@
     this-> half_way = this->Fs * this-> duty_cycle;
     
         // make it integer multiple of frequency
-    this->half_way /= this->frequency;
+    this->half_way = (int)(this->half_way/this->frequency);
     this->half_way *= this->frequency;
 
         // forbid to be zero.