1ere tentative IHM IA
This commit is contained in:
1 parent
44a43828f1
commit
83422c624a
35 files changed
+772
-93
No files matched your search
@@ -7,6 +7,10 @@
|
||||
#include "fx_echo.h"
|
||||
#include "fx_reverb.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Structure regroupant les parametres de tous les effets. Modifiable directement
|
||||
* (ex: depuis l'IHM) via AudioEffects_GetParams(). L'ordre de traitement fixe est :
|
||||
* egaliseur -> overdrive -> saturation -> echo -> reverberation. */
|
||||
@@ -23,4 +27,8 @@ void AudioEffects_Init(void);
|
||||
float AudioEffects_Process(float input);
|
||||
AudioEffectsParams *AudioEffects_GetParams(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* AUDIO_EFFECTS_H */
|
||||
@@ -4,6 +4,10 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FX_ECHO_SAMPLE_RATE 48000U
|
||||
#define FX_ECHO_MAX_DELAY_MS 1000U
|
||||
#define FX_ECHO_BUFFER_SIZE (FX_ECHO_SAMPLE_RATE * FX_ECHO_MAX_DELAY_MS / 1000U)
|
||||
@@ -25,4 +29,8 @@ typedef struct
|
||||
void FxEcho_Init(FxEchoState *state, FxEchoParams *params);
|
||||
float FxEcho_Process(FxEchoState *state, const FxEchoParams *params, float input);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FX_ECHO_H */
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FX_EQ_NUM_BANDS 10U
|
||||
|
||||
typedef struct
|
||||
@@ -41,4 +45,8 @@ typedef struct
|
||||
void FxEqualizer_Init(FxEqualizerState *state, FxEqualizerParams *params);
|
||||
float FxEqualizer_Process(FxEqualizerState *state, const FxEqualizerParams *params, float input);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FX_EQUALIZER_H */
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool enabled;
|
||||
@@ -19,4 +23,8 @@ typedef struct
|
||||
void FxOverdrive_Init(FxOverdriveState *state, FxOverdriveParams *params);
|
||||
float FxOverdrive_Process(FxOverdriveState *state, const FxOverdriveParams *params, float input);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FX_OVERDRIVE_H */
|
||||
@@ -4,6 +4,10 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FX_REVERB_NUM_COMBS 8U
|
||||
#define FX_REVERB_NUM_ALLPASS 4U
|
||||
|
||||
@@ -39,4 +43,8 @@ typedef struct
|
||||
void FxReverb_Init(FxReverbState *state, FxReverbParams *params);
|
||||
float FxReverb_Process(FxReverbState *state, const FxReverbParams *params, float input);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FX_REVERB_H */
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool enabled;
|
||||
@@ -19,4 +23,8 @@ typedef struct
|
||||
void FxSaturation_Init(FxSaturationState *state, FxSaturationParams *params);
|
||||
float FxSaturation_Process(FxSaturationState *state, const FxSaturationParams *params, float input);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FX_SATURATION_H */
|
||||
@@ -4,7 +4,89 @@
|
||||
<Language Id="GB" />
|
||||
</Languages>
|
||||
<Texts>
|
||||
<TextGroup Id="Group1" />
|
||||
<TextGroup Id="Group1">
|
||||
<Text Id="PEDALBOARD" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">PEDALBOARD</Translation>
|
||||
</Text>
|
||||
<Text Id="EQUALIZER" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">EQUALIZER</Translation>
|
||||
</Text>
|
||||
<Text Id="OVERDRIVE" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">OVERDRIVE</Translation>
|
||||
</Text>
|
||||
<Text Id="SATURATION" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">SATURATION</Translation>
|
||||
</Text>
|
||||
<Text Id="ECHO" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">ECHO</Translation>
|
||||
</Text>
|
||||
<Text Id="REVERB" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">REVERB</Translation>
|
||||
</Text>
|
||||
<Text Id="BACK" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">RETOUR</Translation>
|
||||
</Text>
|
||||
<Text Id="ON" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">ON</Translation>
|
||||
</Text>
|
||||
<Text Id="OFF" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">OFF</Translation>
|
||||
</Text>
|
||||
<Text Id="DRIVE" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">DRIVE</Translation>
|
||||
</Text>
|
||||
<Text Id="TONE" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">TONE</Translation>
|
||||
</Text>
|
||||
<Text Id="LEVEL" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">LEVEL</Translation>
|
||||
</Text>
|
||||
<Text Id="DELAY" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">DELAI</Translation>
|
||||
</Text>
|
||||
<Text Id="FEEDBACK" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">FEEDBACK</Translation>
|
||||
</Text>
|
||||
<Text Id="MIX" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">MIX</Translation>
|
||||
</Text>
|
||||
<Text Id="ROOMSIZE" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">TAILLE</Translation>
|
||||
</Text>
|
||||
<Text Id="DAMPING" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">AMORTI</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_31" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">31</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_62" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">62</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_125" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">125</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_250" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">250</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_500" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">500</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_1K" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">1K</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_2K" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">2K</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_4K" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">4K</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_8K" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">8K</Translation>
|
||||
</Text>
|
||||
<Text Id="EQ_16K" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">16K</Translation>
|
||||
</Text>
|
||||
</TextGroup>
|
||||
</Texts>
|
||||
<Typographies>
|
||||
<Typography Id="Default" Font="arial.ttf" Size="20" Bpp="4" IsVector="no" Direction="LTR" FallbackCharacter="?" />
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef ECHOPRESENTER_HPP
|
||||
#define ECHOPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class EchoView;
|
||||
|
||||
class EchoPresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
EchoPresenter(EchoView& v);
|
||||
virtual void activate();
|
||||
virtual void deactivate();
|
||||
virtual ~EchoPresenter() {}
|
||||
|
||||
private:
|
||||
EchoPresenter();
|
||||
EchoView& view;
|
||||
};
|
||||
|
||||
#endif // ECHOPRESENTER_HPP
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef ECHOVIEW_HPP
|
||||
#define ECHOVIEW_HPP
|
||||
|
||||
#include <gui_generated/echo_screen/EchoViewBase.hpp>
|
||||
#include <gui/echo_screen/EchoPresenter.hpp>
|
||||
|
||||
class EchoView : public EchoViewBase
|
||||
{
|
||||
public:
|
||||
EchoView();
|
||||
virtual ~EchoView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
|
||||
virtual void goBack();
|
||||
virtual void toggleEnabled();
|
||||
virtual void param1Changed(int value);
|
||||
virtual void param2Changed(int value);
|
||||
virtual void param3Changed(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // ECHOVIEW_HPP
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef EQUALIZERPRESENTER_HPP
|
||||
#define EQUALIZERPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class EqualizerView;
|
||||
|
||||
class EqualizerPresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
EqualizerPresenter(EqualizerView& v);
|
||||
virtual void activate();
|
||||
virtual void deactivate();
|
||||
virtual ~EqualizerPresenter() {}
|
||||
|
||||
private:
|
||||
EqualizerPresenter();
|
||||
EqualizerView& view;
|
||||
};
|
||||
|
||||
#endif // EQUALIZERPRESENTER_HPP
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef EQUALIZERVIEW_HPP
|
||||
#define EQUALIZERVIEW_HPP
|
||||
|
||||
#include <gui_generated/equalizer_screen/EqualizerViewBase.hpp>
|
||||
#include <gui/equalizer_screen/EqualizerPresenter.hpp>
|
||||
|
||||
class EqualizerView : public EqualizerViewBase
|
||||
{
|
||||
public:
|
||||
EqualizerView();
|
||||
virtual ~EqualizerView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
|
||||
virtual void goBack();
|
||||
virtual void toggleEnabled();
|
||||
virtual void band1Changed(int value);
|
||||
virtual void band2Changed(int value);
|
||||
virtual void band3Changed(int value);
|
||||
virtual void band4Changed(int value);
|
||||
virtual void band5Changed(int value);
|
||||
virtual void band6Changed(int value);
|
||||
virtual void band7Changed(int value);
|
||||
virtual void band8Changed(int value);
|
||||
virtual void band9Changed(int value);
|
||||
virtual void band10Changed(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // EQUALIZERVIEW_HPP
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef OVERDRIVEPRESENTER_HPP
|
||||
#define OVERDRIVEPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class OverdriveView;
|
||||
|
||||
class OverdrivePresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
OverdrivePresenter(OverdriveView& v);
|
||||
virtual void activate();
|
||||
virtual void deactivate();
|
||||
virtual ~OverdrivePresenter() {}
|
||||
|
||||
private:
|
||||
OverdrivePresenter();
|
||||
OverdriveView& view;
|
||||
};
|
||||
|
||||
#endif // OVERDRIVEPRESENTER_HPP
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef OVERDRIVEVIEW_HPP
|
||||
#define OVERDRIVEVIEW_HPP
|
||||
|
||||
#include <gui_generated/overdrive_screen/OverdriveViewBase.hpp>
|
||||
#include <gui/overdrive_screen/OverdrivePresenter.hpp>
|
||||
|
||||
class OverdriveView : public OverdriveViewBase
|
||||
{
|
||||
public:
|
||||
OverdriveView();
|
||||
virtual ~OverdriveView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
|
||||
virtual void goBack();
|
||||
virtual void toggleEnabled();
|
||||
virtual void param1Changed(int value);
|
||||
virtual void param2Changed(int value);
|
||||
virtual void param3Changed(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // OVERDRIVEVIEW_HPP
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef OVERVIEWPRESENTER_HPP
|
||||
#define OVERVIEWPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class OverviewView;
|
||||
|
||||
class OverviewPresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
OverviewPresenter(OverviewView& v);
|
||||
virtual void activate();
|
||||
virtual void deactivate();
|
||||
virtual ~OverviewPresenter() {}
|
||||
|
||||
private:
|
||||
OverviewPresenter();
|
||||
OverviewView& view;
|
||||
};
|
||||
|
||||
#endif // OVERVIEWPRESENTER_HPP
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef OVERVIEWVIEW_HPP
|
||||
#define OVERVIEWVIEW_HPP
|
||||
|
||||
#include <gui_generated/overview_screen/OverviewViewBase.hpp>
|
||||
#include <gui/overview_screen/OverviewPresenter.hpp>
|
||||
|
||||
class OverviewView : public OverviewViewBase
|
||||
{
|
||||
public:
|
||||
OverviewView();
|
||||
virtual ~OverviewView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // OVERVIEWVIEW_HPP
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef REVERBPRESENTER_HPP
|
||||
#define REVERBPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class ReverbView;
|
||||
|
||||
class ReverbPresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
ReverbPresenter(ReverbView& v);
|
||||
virtual void activate();
|
||||
virtual void deactivate();
|
||||
virtual ~ReverbPresenter() {}
|
||||
|
||||
private:
|
||||
ReverbPresenter();
|
||||
ReverbView& view;
|
||||
};
|
||||
|
||||
#endif // REVERBPRESENTER_HPP
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef REVERBVIEW_HPP
|
||||
#define REVERBVIEW_HPP
|
||||
|
||||
#include <gui_generated/reverb_screen/ReverbViewBase.hpp>
|
||||
#include <gui/reverb_screen/ReverbPresenter.hpp>
|
||||
|
||||
class ReverbView : public ReverbViewBase
|
||||
{
|
||||
public:
|
||||
ReverbView();
|
||||
virtual ~ReverbView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
|
||||
virtual void goBack();
|
||||
virtual void toggleEnabled();
|
||||
virtual void param1Changed(int value);
|
||||
virtual void param2Changed(int value);
|
||||
virtual void param3Changed(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // REVERBVIEW_HPP
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef SATURATIONPRESENTER_HPP
|
||||
#define SATURATIONPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class SaturationView;
|
||||
|
||||
class SaturationPresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
SaturationPresenter(SaturationView& v);
|
||||
virtual void activate();
|
||||
virtual void deactivate();
|
||||
virtual ~SaturationPresenter() {}
|
||||
|
||||
private:
|
||||
SaturationPresenter();
|
||||
SaturationView& view;
|
||||
};
|
||||
|
||||
#endif // SATURATIONPRESENTER_HPP
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef SATURATIONVIEW_HPP
|
||||
#define SATURATIONVIEW_HPP
|
||||
|
||||
#include <gui_generated/saturation_screen/SaturationViewBase.hpp>
|
||||
#include <gui/saturation_screen/SaturationPresenter.hpp>
|
||||
|
||||
class SaturationView : public SaturationViewBase
|
||||
{
|
||||
public:
|
||||
SaturationView();
|
||||
virtual ~SaturationView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
|
||||
virtual void goBack();
|
||||
virtual void toggleEnabled();
|
||||
virtual void param1Changed(int value);
|
||||
virtual void param2Changed(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // SATURATIONVIEW_HPP
|
||||
@@ -1,36 +0,0 @@
|
||||
#ifndef SCREEN1PRESENTER_HPP
|
||||
#define SCREEN1PRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class Screen1View;
|
||||
|
||||
class Screen1Presenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
Screen1Presenter(Screen1View& v);
|
||||
|
||||
/**
|
||||
* The activate function is called automatically when this screen is "switched in"
|
||||
* (ie. made active). Initialization logic can be placed here.
|
||||
*/
|
||||
virtual void activate();
|
||||
|
||||
/**
|
||||
* The deactivate function is called automatically when this screen is "switched out"
|
||||
* (ie. made inactive). Teardown functionality can be placed here.
|
||||
*/
|
||||
virtual void deactivate();
|
||||
|
||||
virtual ~Screen1Presenter() {}
|
||||
|
||||
private:
|
||||
Screen1Presenter();
|
||||
|
||||
Screen1View& view;
|
||||
};
|
||||
|
||||
#endif // SCREEN1PRESENTER_HPP
|
||||
@@ -1,18 +0,0 @@
|
||||
#ifndef SCREEN1VIEW_HPP
|
||||
#define SCREEN1VIEW_HPP
|
||||
|
||||
#include <gui_generated/screen1_screen/Screen1ViewBase.hpp>
|
||||
#include <gui/screen1_screen/Screen1Presenter.hpp>
|
||||
|
||||
class Screen1View : public Screen1ViewBase
|
||||
{
|
||||
public:
|
||||
Screen1View();
|
||||
virtual ~Screen1View() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
virtual void slider1Clicked(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // SCREEN1VIEW_HPP
|
||||
@@ -0,0 +1,15 @@
|
||||
#include <gui/echo_screen/EchoView.hpp>
|
||||
#include <gui/echo_screen/EchoPresenter.hpp>
|
||||
|
||||
EchoPresenter::EchoPresenter(EchoView& v)
|
||||
: view(v)
|
||||
{
|
||||
}
|
||||
|
||||
void EchoPresenter::activate()
|
||||
{
|
||||
}
|
||||
|
||||
void EchoPresenter::deactivate()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
#include <gui/echo_screen/EchoView.hpp>
|
||||
#include <audio_effects.h>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
EchoView::EchoView()
|
||||
{
|
||||
}
|
||||
|
||||
void EchoView::setupScreen()
|
||||
{
|
||||
EchoViewBase::setupScreen();
|
||||
}
|
||||
|
||||
void EchoView::tearDownScreen()
|
||||
{
|
||||
EchoViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void EchoView::goBack()
|
||||
{
|
||||
application().gotoOverviewScreenBlockTransition();
|
||||
}
|
||||
|
||||
void EchoView::toggleEnabled()
|
||||
{
|
||||
bool en = !AudioEffects_GetParams()->echo.enabled;
|
||||
AudioEffects_GetParams()->echo.enabled = en;
|
||||
enableToggle.setLabelText(touchgfx::TypedText(en ? T_ON : T_OFF));
|
||||
enableToggle.setLabelColor(en ? touchgfx::Color::getColorFromRGB(140, 190, 90) : touchgfx::Color::getColorFromRGB(200, 90, 70));
|
||||
enableToggle.setLabelColorPressed(en ? touchgfx::Color::getColorFromRGB(140, 190, 90) : touchgfx::Color::getColorFromRGB(200, 90, 70));
|
||||
enableToggle.invalidate();
|
||||
}
|
||||
|
||||
void EchoView::param1Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->echo.delay_ms = value * 10.0f;
|
||||
}
|
||||
void EchoView::param2Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->echo.feedback = value / 100.0f * 0.95f;
|
||||
}
|
||||
void EchoView::param3Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->echo.mix = value / 100.0f;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#include <gui/equalizer_screen/EqualizerView.hpp>
|
||||
#include <gui/equalizer_screen/EqualizerPresenter.hpp>
|
||||
|
||||
EqualizerPresenter::EqualizerPresenter(EqualizerView& v)
|
||||
: view(v)
|
||||
{
|
||||
}
|
||||
|
||||
void EqualizerPresenter::activate()
|
||||
{
|
||||
}
|
||||
|
||||
void EqualizerPresenter::deactivate()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
#include <gui/equalizer_screen/EqualizerView.hpp>
|
||||
#include <audio_effects.h>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
EqualizerView::EqualizerView()
|
||||
{
|
||||
}
|
||||
|
||||
void EqualizerView::setupScreen()
|
||||
{
|
||||
EqualizerViewBase::setupScreen();
|
||||
}
|
||||
|
||||
void EqualizerView::tearDownScreen()
|
||||
{
|
||||
EqualizerViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void EqualizerView::goBack()
|
||||
{
|
||||
application().gotoOverviewScreenBlockTransition();
|
||||
}
|
||||
|
||||
void EqualizerView::toggleEnabled()
|
||||
{
|
||||
bool en = !AudioEffects_GetParams()->equalizer.enabled;
|
||||
AudioEffects_GetParams()->equalizer.enabled = en;
|
||||
enableToggle.setLabelText(touchgfx::TypedText(en ? T_ON : T_OFF));
|
||||
enableToggle.setLabelColor(en ? touchgfx::Color::getColorFromRGB(140, 190, 90) : touchgfx::Color::getColorFromRGB(200, 90, 70));
|
||||
enableToggle.setLabelColorPressed(en ? touchgfx::Color::getColorFromRGB(140, 190, 90) : touchgfx::Color::getColorFromRGB(200, 90, 70));
|
||||
enableToggle.invalidate();
|
||||
}
|
||||
|
||||
void EqualizerView::band1Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[0].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band2Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[1].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band3Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[2].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band4Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[3].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band5Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[4].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band6Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[5].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band7Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[6].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band8Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[7].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band9Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[8].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band10Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[9].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#include <gui/overdrive_screen/OverdriveView.hpp>
|
||||
#include <gui/overdrive_screen/OverdrivePresenter.hpp>
|
||||
|
||||
OverdrivePresenter::OverdrivePresenter(OverdriveView& v)
|
||||
: view(v)
|
||||
{
|
||||
}
|
||||
|
||||
void OverdrivePresenter::activate()
|
||||
{
|
||||
}
|
||||
|
||||
void OverdrivePresenter::deactivate()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
#include <gui/overdrive_screen/OverdriveView.hpp>
|
||||
#include <audio_effects.h>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
OverdriveView::OverdriveView()
|
||||
{
|
||||
}
|
||||
|
||||
void OverdriveView::setupScreen()
|
||||
{
|
||||
OverdriveViewBase::setupScreen();
|
||||
}
|
||||
|
||||
void OverdriveView::tearDownScreen()
|
||||
{
|
||||
OverdriveViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void OverdriveView::goBack()
|
||||
{
|
||||
application().gotoOverviewScreenBlockTransition();
|
||||
}
|
||||
|
||||
void OverdriveView::toggleEnabled()
|
||||
{
|
||||
bool en = !AudioEffects_GetParams()->overdrive.enabled;
|
||||
AudioEffects_GetParams()->overdrive.enabled = en;
|
||||
enableToggle.setLabelText(touchgfx::TypedText(en ? T_ON : T_OFF));
|
||||
enableToggle.setLabelColor(en ? touchgfx::Color::getColorFromRGB(140, 190, 90) : touchgfx::Color::getColorFromRGB(200, 90, 70));
|
||||
enableToggle.setLabelColorPressed(en ? touchgfx::Color::getColorFromRGB(140, 190, 90) : touchgfx::Color::getColorFromRGB(200, 90, 70));
|
||||
enableToggle.invalidate();
|
||||
}
|
||||
|
||||
void OverdriveView::param1Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->overdrive.drive = value / 100.0f;
|
||||
}
|
||||
void OverdriveView::param2Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->overdrive.tone = value / 100.0f;
|
||||
}
|
||||
void OverdriveView::param3Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->overdrive.level = value / 100.0f;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#include <gui/overview_screen/OverviewView.hpp>
|
||||
#include <gui/overview_screen/OverviewPresenter.hpp>
|
||||
|
||||
OverviewPresenter::OverviewPresenter(OverviewView& v)
|
||||
: view(v)
|
||||
{
|
||||
}
|
||||
|
||||
void OverviewPresenter::activate()
|
||||
{
|
||||
}
|
||||
|
||||
void OverviewPresenter::deactivate()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#include <gui/overview_screen/OverviewView.hpp>
|
||||
|
||||
OverviewView::OverviewView()
|
||||
{
|
||||
}
|
||||
|
||||
void OverviewView::setupScreen()
|
||||
{
|
||||
OverviewViewBase::setupScreen();
|
||||
}
|
||||
|
||||
void OverviewView::tearDownScreen()
|
||||
{
|
||||
OverviewViewBase::tearDownScreen();
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#include <gui/reverb_screen/ReverbView.hpp>
|
||||
#include <gui/reverb_screen/ReverbPresenter.hpp>
|
||||
|
||||
ReverbPresenter::ReverbPresenter(ReverbView& v)
|
||||
: view(v)
|
||||
{
|
||||
}
|
||||
|
||||
void ReverbPresenter::activate()
|
||||
{
|
||||
}
|
||||
|
||||
void ReverbPresenter::deactivate()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
#include <gui/reverb_screen/ReverbView.hpp>
|
||||
#include <audio_effects.h>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
ReverbView::ReverbView()
|
||||
{
|
||||
}
|
||||
|
||||
void ReverbView::setupScreen()
|
||||
{
|
||||
ReverbViewBase::setupScreen();
|
||||
}
|
||||
|
||||
void ReverbView::tearDownScreen()
|
||||
{
|
||||
ReverbViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void ReverbView::goBack()
|
||||
{
|
||||
application().gotoOverviewScreenBlockTransition();
|
||||
}
|
||||
|
||||
void ReverbView::toggleEnabled()
|
||||
{
|
||||
bool en = !AudioEffects_GetParams()->reverb.enabled;
|
||||
AudioEffects_GetParams()->reverb.enabled = en;
|
||||
enableToggle.setLabelText(touchgfx::TypedText(en ? T_ON : T_OFF));
|
||||
enableToggle.setLabelColor(en ? touchgfx::Color::getColorFromRGB(140, 190, 90) : touchgfx::Color::getColorFromRGB(200, 90, 70));
|
||||
enableToggle.setLabelColorPressed(en ? touchgfx::Color::getColorFromRGB(140, 190, 90) : touchgfx::Color::getColorFromRGB(200, 90, 70));
|
||||
enableToggle.invalidate();
|
||||
}
|
||||
|
||||
void ReverbView::param1Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->reverb.room_size = value / 100.0f;
|
||||
}
|
||||
void ReverbView::param2Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->reverb.damping = value / 100.0f;
|
||||
}
|
||||
void ReverbView::param3Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->reverb.mix = value / 100.0f;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#include <gui/saturation_screen/SaturationView.hpp>
|
||||
#include <gui/saturation_screen/SaturationPresenter.hpp>
|
||||
|
||||
SaturationPresenter::SaturationPresenter(SaturationView& v)
|
||||
: view(v)
|
||||
{
|
||||
}
|
||||
|
||||
void SaturationPresenter::activate()
|
||||
{
|
||||
}
|
||||
|
||||
void SaturationPresenter::deactivate()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
#include <gui/saturation_screen/SaturationView.hpp>
|
||||
#include <audio_effects.h>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
SaturationView::SaturationView()
|
||||
{
|
||||
}
|
||||
|
||||
void SaturationView::setupScreen()
|
||||
{
|
||||
SaturationViewBase::setupScreen();
|
||||
}
|
||||
|
||||
void SaturationView::tearDownScreen()
|
||||
{
|
||||
SaturationViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void SaturationView::goBack()
|
||||
{
|
||||
application().gotoOverviewScreenBlockTransition();
|
||||
}
|
||||
|
||||
void SaturationView::toggleEnabled()
|
||||
{
|
||||
bool en = !AudioEffects_GetParams()->saturation.enabled;
|
||||
AudioEffects_GetParams()->saturation.enabled = en;
|
||||
enableToggle.setLabelText(touchgfx::TypedText(en ? T_ON : T_OFF));
|
||||
enableToggle.setLabelColor(en ? touchgfx::Color::getColorFromRGB(140, 190, 90) : touchgfx::Color::getColorFromRGB(200, 90, 70));
|
||||
enableToggle.setLabelColorPressed(en ? touchgfx::Color::getColorFromRGB(140, 190, 90) : touchgfx::Color::getColorFromRGB(200, 90, 70));
|
||||
enableToggle.invalidate();
|
||||
}
|
||||
|
||||
void SaturationView::param1Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->saturation.drive = value / 100.0f;
|
||||
}
|
||||
void SaturationView::param2Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->saturation.level = value / 100.0f;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
#include <gui/screen1_screen/Screen1View.hpp>
|
||||
#include <gui/screen1_screen/Screen1Presenter.hpp>
|
||||
|
||||
Screen1Presenter::Screen1Presenter(Screen1View& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Screen1Presenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Screen1Presenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
#include <gui/screen1_screen/Screen1View.hpp>
|
||||
|
||||
Screen1View::Screen1View()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Screen1View::setupScreen()
|
||||
{
|
||||
Screen1ViewBase::setupScreen();
|
||||
}
|
||||
|
||||
void Screen1View::tearDownScreen()
|
||||
{
|
||||
Screen1ViewBase::tearDownScreen();
|
||||
}
|
||||
void Screen1View::slider1Clicked(int value)
|
||||
{
|
||||
gauge1.setValue(value);
|
||||
}
|
||||
Reference in new issue
Block a user