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空挺団の「シンセサイザー」カテゴリーを参照してください。初回は「ドッグフードを食べる」です。
Diff: vfo.cpp
- Revision:
- 26:e99f71165e19
- Parent:
- 24:c77331e72374
- Child:
- 28:547f19ed6f67
--- a/vfo.cpp Fri Feb 10 13:28:41 2017 +0000 +++ b/vfo.cpp Fri Feb 10 21:31:17 2017 +0000 @@ -1,9 +1,11 @@ #include "signal_processing.h" -VFO::VFO( void ) +VFO::VFO( int32_t block_size ) { // initial parameter setting. + this->block_size = block_size; + this->form = triangle; this->Fs = 48000; this->frequency = 440; @@ -20,13 +22,12 @@ void VFO::run( - float out_buffer[], // vfo output buffer - unsigned int block_size // block size [sample] + float out_buffer[] // vfo output buffer ) { // place the signal processing coce here - for ( int i= 0; i< block_size; i++ ) + for ( int i= 0; i< this->block_size; i++ ) { // 1 : if phase < half_way; 0 : others. if ( this->form == square )