Synthesizer based on the Unzen / Nucleo F746ZG
Dependencies: amakusa mbed-dsp mbed shimabara ukifune unzen_nucleo_f746
Fork of skeleton_unzen_nucleo_f746 by
雲仙フレームワークのテストとして作っているプロジェクトです。中身はどんどん変っていきます。 説明はDSP空挺団の「シンセサイザー」カテゴリーを参照してください。初回は「ドッグフードを食べる」です。
Revision 29:8ee84bda128c, committed 2017-02-18
- Comitter:
- shorie
- Date:
- Sat Feb 18 04:37:19 2017 +0000
- Parent:
- 28:547f19ed6f67
- Commit message:
- Limiter function is confirmed. SV filter ignored bug was fixed.
Changed in this revision
diff -r 547f19ed6f67 -r 8ee84bda128c amakusa.lib --- a/amakusa.lib Sat Feb 11 07:44:56 2017 +0000 +++ b/amakusa.lib Sat Feb 18 04:37:19 2017 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/shorie/code/amakusa/#621c15c3be14 +https://developer.mbed.org/users/shorie/code/amakusa/#1fa224c83cfa
diff -r 547f19ed6f67 -r 8ee84bda128c monophonic.cpp --- a/monophonic.cpp Sat Feb 11 07:44:56 2017 +0000 +++ b/monophonic.cpp Sat Feb 18 04:37:19 2017 +0000 @@ -11,6 +11,7 @@ this->dc_blocker = new DCBlocker( this->block_size ); this->sv_filter = new SVFilter( this->block_size ); this->eg = new EG( this->block_size ); + this->limitter = new amakusa::LimitterLinAtan( this->block_size ); work_buf_a = new float32_t[block_size]; work_buf_b = new float32_t[block_size]; @@ -24,6 +25,7 @@ delete this->dc_blocker; delete this->sv_filter; delete this->eg; + delete this->limitter; delete[] work_buf_a; delete[] work_buf_b; @@ -43,14 +45,17 @@ this->dc_blocker->run( work_buf_a, work_buf_b ); // applying filter. - this->sv_filter->run( work_buf_b, out_buffer ); + this->sv_filter->run( work_buf_b, work_buf_a ); // generate envelope - this->eg->run( work_buf_a ); + this->eg->run( work_buf_b ); // apply envelope for ( int i= 0; i< this->block_size; i++ ) - out_buffer[ i ] *= work_buf_a[ i ]; + work_buf_b[ i ] *= work_buf_a[ i ]; + + // apply amplitude limitter + this->limitter->run( work_buf_b, out_buffer ); } // End of run()
diff -r 547f19ed6f67 -r 8ee84bda128c signal_processing.h --- a/signal_processing.h Sat Feb 11 07:44:56 2017 +0000 +++ b/signal_processing.h Sat Feb 18 04:37:19 2017 +0000 @@ -116,6 +116,7 @@ DCBlocker *dc_blocker; SVFilter *sv_filter; EG *eg; + amakusa::LimitterLinAtan *limitter; float *work_buf_a, *work_buf_b; int32_t block_size; };