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:
17:728ffc633179
Parent:
16:d4ea3e6a0bce
Child:
18:b9b1116f8768
--- a/vfo.cpp	Tue Jan 31 12:52:59 2017 +0000
+++ b/vfo.cpp	Tue Jan 31 14:19:16 2017 +0000
@@ -70,8 +70,8 @@
 {
     if ( duty > 0.5f )   // high limit
         duty = 0.5f;
-    if ( duty < 0.01f )  // low limit
-        duty = 0.01f;
+    if ( duty < 0.0f )  // low limit
+        duty = 0.0f;
     this->duty_cycle = duty;
     
     this->update_parameters();
@@ -87,7 +87,7 @@
 void VFO::update_parameters(void)
 {
         // calc the half_way;
-    this-> half_way = this->frequency * this-> duty_cycle;
+    this-> half_way = this->Fs * this-> duty_cycle;
 
         // forbid to be zero.
     if ( this-> half_way < this->frequency )