Audio singal input and output example for DISCO-F746. Input: MEMS mic, Output: CN10 OUT, Acoustic effect: echo and frequency shift. DISCO-F746 によるオーディオ信号入出力.入力:MEMS マイク,出力:CN10 OUT,音響効果:エコー,周波数変換.
Dependencies: F746_GUI F746_SAI_IO
Diff: MyAcousticEffector_MIC/EffectorInitializeGUI.hpp
- Revision:
- 10:56f2f01df983
- Parent:
- 9:1221ba81a1bb
--- a/MyAcousticEffector_MIC/EffectorInitializeGUI.hpp Fri Mar 17 01:26:25 2017 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -//-------------------------------------------------------------- -// 「MEMS マイクの入力に対して音響効果を与える」で使う GUI 等の初期化 -// -// 2017/03/17, Copyright (c) 2017 MIKAMI, Naoki -//-------------------------------------------------------------- - -#ifndef EFFECTOR_INIT_GUI_HPP -#define EFFECTOR_INIT_GUI_HPP - -#include "F746_GUI.hpp" -#include "WaveformDisplay.hpp" - -using namespace Mikami; - -void EffectorInitializeGUI( - ButtonGroup *(&onOff), ButtonGroup *(&menu), - SeekBar *(&barEcho), SeekBar *(&barFqCh), - NumericLabel<int> *(&frqLabel), - WaveformDisplay *(&dispIn), - WaveformDisplay *(&dispOut)) -{ - Label myLabel(240, 10, "Echo and frequency shifter", - Label::CENTER, Font16); - - // Button 用の定数 - const uint16_t BG_LEFT = 370; - const uint16_t BG_WIDTH = 100; - const uint16_t BG_HEIGHT = 45; - - // ButtonGroup: "ON", "OFF" - const string ON_OFF[2] = {"ON", "OFF"}; - onOff = new ButtonGroup(BG_LEFT, 40, BG_WIDTH/2, BG_HEIGHT, - 2, ON_OFF, 0, 0, 2, 1); - - // ButtonGroup: "THROUGH", "ECHO", "F_SHIFTER" - const string MENU[3] = {"THROUGH", "ECHO", "F_SHIFTER"}; - menu = new ButtonGroup(BG_LEFT, 110, BG_WIDTH, BG_HEIGHT, - 3, MENU, 0, 10, 1, 0); - - // SeekBar 用の定数 - const uint16_t SB_LEFT = BG_LEFT - 300; - const uint16_t SB_WIDTH = 256; - const uint16_t Y0_E = 192; - const uint16_t Y0_F = Y0_E + BG_HEIGHT + 5; - const uint16_t DY0 = 28; - - // エコー用 - barEcho = new SeekBar(SB_LEFT, Y0_E, SB_WIDTH, - 0, 6000, 0, "short", "", "long"); - barEcho->Inactivate(); - - // 周波数シフタ用 - barFqCh = new SeekBar(SB_LEFT, Y0_F, SB_WIDTH, - 0, 200, 100, "0", "", "200"); - barFqCh->Inactivate(); - frqLabel = new NumericLabel<int>(SB_LEFT+SB_WIDTH/2, Y0_F-DY0, "+%d Hz", - barFqCh->GetIntValue(), Label::CENTER); - frqLabel->Redraw(GuiBase::ENUM_INACTIVE_TEXT); - - // 波形表示用 - dispIn = new WaveformDisplay(GuiBase::GetLcd(), - SB_LEFT, 70, 256, 9, - LCD_COLOR_WHITE, LCD_COLOR_CYAN, - GuiBase::ENUM_BACK); - Label inLabel(SB_LEFT-40, 65, "IN"); - dispOut = new WaveformDisplay(GuiBase::GetLcd(), - SB_LEFT, 130, 256, 9, - LCD_COLOR_WHITE, LCD_COLOR_CYAN, - GuiBase::ENUM_BACK); - Label outLabel(SB_LEFT-40, 125, "OUT"); -} -#endif // #define EFFECTOR_INIT_GUI_HPP