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
InitializeGUI.hpp
00001 //-------------------------------------------------------------- 00002 // 「MEMS マイクの入力に対して音響効果を与える」で使う GUI 等の初期化 00003 // 00004 // 2017/04/08, Copyright (c) 2017 MIKAMI, Naoki 00005 //-------------------------------------------------------------- 00006 00007 #ifndef EFFECTOR_INIT_GUI_HPP 00008 #define EFFECTOR_INIT_GUI_HPP 00009 00010 #include "F746_GUI.hpp" 00011 #include "WaveformDisplay.hpp" 00012 using namespace Mikami; 00013 00014 void InitializeGUI( 00015 ButtonGroup *(&onOff), ButtonGroup *(&menu), 00016 SeekBar *(&barReverb), SeekBar *(&barFqCh), 00017 NumericLabel<int> *(&frqLabel), 00018 WaveformDisplay *(&dispIn), 00019 WaveformDisplay *(&dispOut)) 00020 { 00021 Label myLabel(240, 8, "Reverberator and voice changer", 00022 Label::CENTER, Font16); 00023 00024 // ButtonGroup 用の定数 00025 const uint16_t BG_LEFT = 360; 00026 const uint16_t BG_WIDTH = 110; 00027 const uint16_t BG_HEIGHT = 45; 00028 00029 // ButtonGroup: "ON", "OFF" 00030 const string ON_OFF[2] = {"ON", "OFF"}; 00031 onOff = new ButtonGroup(BG_LEFT, 40, BG_WIDTH/2, BG_HEIGHT, 00032 2, ON_OFF, 0, 0, 2, 1); 00033 00034 // ButtonGroup: "THROUGH", "ECHO", "F_SHIFTER" 00035 const string MENU[3] = {"THROUGH", "REVERB", "VOICE CHANGER"}; 00036 menu = new ButtonGroup(BG_LEFT, 110, BG_WIDTH, BG_HEIGHT, 00037 3, MENU, 0, 10, 1, 0); 00038 00039 // SeekBar 用の定数 00040 const uint16_t SB_LEFT = BG_LEFT - 300; 00041 const uint16_t SB_WIDTH = 256; 00042 const uint16_t Y0_E = 195; 00043 const uint16_t Y0_F = Y0_E + BG_HEIGHT + 5; 00044 00045 // リバーブ用 00046 barReverb = new SeekBar(SB_LEFT, Y0_E, SB_WIDTH, 00047 0, 6000, 0, "short", "", "long"); 00048 barReverb->Inactivate(); 00049 00050 // 周波数シフタ用 00051 barFqCh = new SeekBar(SB_LEFT, Y0_F, SB_WIDTH, 00052 0, 200, 100, "0", "", "200"); 00053 barFqCh->Inactivate(); 00054 frqLabel = new NumericLabel<int>( 00055 SB_LEFT+SB_WIDTH/2, Y0_F-28, "+%d Hz", 00056 barFqCh->GetIntValue(), Label::CENTER); 00057 frqLabel->Redraw(GuiBase::ENUM_INACTIVE_TEXT); 00058 00059 // 波形表示用 00060 Label inLabel(SB_LEFT-40, 55, "IN"); 00061 dispIn = new WaveformDisplay( 00062 GuiBase::GetLcd(), SB_LEFT, 60, 256, 9); 00063 Label outLabel(SB_LEFT-40, 125, "OUT"); 00064 dispOut = new WaveformDisplay( 00065 GuiBase::GetLcd(), SB_LEFT, 130, 256, 9); 00066 } 00067 #endif // EFFECTOR_INIT_GUI_HPP
Generated on Tue Jul 12 2022 21:58:54 by
1.7.2