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:
22:dc2cbe8db9d9
Parent:
20:53021b2c424d
Child:
26:e99f71165e19
--- a/monophonic.cpp	Sat Feb 04 15:05:44 2017 +0000
+++ b/monophonic.cpp	Sun Feb 05 06:16:49 2017 +0000
@@ -33,11 +33,13 @@
         )
 {
         // place the signal processing coce here
+    this->vfo->run( work_buf_a, block_size );
+    
+        // blocking DC.
+    this->dc_blocker->run( work_buf_a, work_buf_b );
 
-        // VFO
-    this->vfo->run( work_buf_a );
-    
-    this->dc_blocker->run( work_buf_a, out_buffer );
+        // applying filter.
+    this->sv_filter->run( work_buf_b, out_buffer );
     
 }   // End of run()
     
@@ -46,12 +48,14 @@
 void Monophonic::set_Fs( int Fs )
 {
     this->vfo->set_Fs( Fs );
+    this->sv_filter->set_Fs( Fs );
 }
 
     // Oscillation Frequency
 void Monophonic::set_vfo_frequency( int freq )
 {
     this->vfo->set_frequency( freq );
+    this->sv_filter->set_fc( freq );
 }
 
     // Duty Cycle of VFO
@@ -65,3 +69,21 @@
 {
     this->vfo->set_wave_form( form );
 }
+
+    // SVF filter mode.
+void Monophonic::set_filter_mode( svf_mode mode )
+{
+    this->sv_filter->set_mode( mode );
+}
+
+    // SVF Q factor
+void Monophonic::set_filter_Q( float Q )
+{
+    this->sv_filter->set_Q( Q );
+}
+
+        // Set the f_factor value. 
+void Monophonic::set_filter_f_factor( float f_factor )
+{
+    this->sv_filter->set_f_factor( f_factor );
+}