Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: F746_GUI F746_SAI_IO FrequencyResponseDrawer SD_PlayerSkeleton UIT_FFT_Real
main.cpp
00001 //---------------------------------------------------------------- 00002 // My リアルタイム サウンド処理マシン 00003 // 1. グラフィックイコライザ付き SD オーディオプレーヤー 00004 // 2. 遮断周波数可変 LPF/HPF 付き SD オーディオプレーヤー 00005 // 3. 残響/ボイスチェンジャ,入力:MEMS マイク 00006 // 4. スペクトログラム,入力:MEMS マイク 00007 // 00008 // 音響出力:モノラル(L+R を左右チャンネルに出力) 00009 // 00010 // このプログラムで使っている "BSP_DISCO_F746NG" は,他のライブラリとの 00011 // 関係でコンパイルエラーが発生しないものの中の最新版(rev.5)に更新されて 00012 // いる.2017/04/14 の時点で rev.6, rev.7, rev.8 ではコンパイルエラーが 00013 // 発生する. 00014 // 00015 // 2017/04/14, Copyright (c) 2017 MIKAMI, Naoki 00016 //---------------------------------------------------------------- 00017 00018 #include "GraphicEqulizerMain.hpp" 00019 #include "VariableIirFilterMain.hpp" 00020 #include "ReverbFrShifterMain.hpp" 00021 #include "SpectrogramMain.hpp" 00022 00023 using namespace Mikami; 00024 00025 int main() 00026 { 00027 Label title(240, 16, "My Realtime Sound Processing Machine", 00028 Label::CENTER, Font16); 00029 const string MENU[] = {"Graphic Equalizer", 00030 "Variable LPF/HPF", 00031 "Reverb, Voice Changer", 00032 "Spectrogram"}; 00033 ButtonGroup menuButtons( 00034 100, 50, 280, 50, 4, MENU, 0, 5, 1, -1, Font16); 00035 00036 int num = 0; 00037 while (!menuButtons.GetTouchedNumber(num)) {} 00038 menuButtons.EraseAll(); 00039 title.Draw(""); 00040 /* 00041 switch (num) 00042 { 00043 case 0: GraphicEqualizerMain(); // グラフィックイコライザ 00044 break; 00045 case 1: VariableIirFilterMain(); // 遮断周波数可変 LPF/HPF 00046 break; 00047 case 2: ReverbFrShifter(); // 残響生成/周波数変換 00048 break; 00049 case 3: Spectrogram(); // スペクトログラム 00050 break; 00051 } 00052 */ 00053 // 以下で実行される関数は,中で無限ループになっているため main() 関数には 00054 // 戻ってこないので,break 文は不要 00055 switch (num) 00056 { 00057 case 0: GraphicEqualizerMain(); // グラフィックイコライザ 00058 case 1: VariableIirFilterMain(); // 遮断周波数可変 LPF/HPF 00059 case 2: ReverbFrShifter(); // 残響生成/周波数変換 00060 case 3: Spectrogram(); // スペクトログラム 00061 } 00062 }
Generated on Tue Jul 12 2022 21:58:54 by
1.7.2