IHM OK!
This commit is contained in:
1 parent
c75b9dd48a
commit
bf2ef0ab16
50 files changed
+1434
-1203
No files matched your search
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -1,24 +1,36 @@
|
||||
#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
|
||||
#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);
|
||||
|
||||
/**
|
||||
* 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 ~EchoPresenter() {}
|
||||
|
||||
private:
|
||||
EchoPresenter();
|
||||
|
||||
EchoView& view;
|
||||
};
|
||||
|
||||
#endif // ECHOPRESENTER_HPP
|
||||
@@ -12,11 +12,10 @@ public:
|
||||
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);
|
||||
virtual void toggleClicked();
|
||||
virtual void sliderDelaiChanged(int value);
|
||||
virtual void sliderFeedbackChanged(int value);
|
||||
virtual void sliderMixChanged(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
@@ -1,24 +1,36 @@
|
||||
#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
|
||||
#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);
|
||||
|
||||
/**
|
||||
* 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 ~EqualizerPresenter() {}
|
||||
|
||||
private:
|
||||
EqualizerPresenter();
|
||||
|
||||
EqualizerView& view;
|
||||
};
|
||||
|
||||
#endif // EQUALIZERPRESENTER_HPP
|
||||
@@ -12,18 +12,17 @@ public:
|
||||
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);
|
||||
virtual void toggleClicked();
|
||||
virtual void sliderBand1Changed(int value);
|
||||
virtual void sliderBand2Changed(int value);
|
||||
virtual void sliderBand3Changed(int value);
|
||||
virtual void sliderBand4Changed(int value);
|
||||
virtual void sliderBand5Changed(int value);
|
||||
virtual void sliderBand6Changed(int value);
|
||||
virtual void sliderBand7Changed(int value);
|
||||
virtual void sliderBand8Changed(int value);
|
||||
virtual void sliderBand9Changed(int value);
|
||||
virtual void sliderBand10Changed(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
@@ -1,24 +1,36 @@
|
||||
#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
|
||||
#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);
|
||||
|
||||
/**
|
||||
* 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 ~OverdrivePresenter() {}
|
||||
|
||||
private:
|
||||
OverdrivePresenter();
|
||||
|
||||
OverdriveView& view;
|
||||
};
|
||||
|
||||
#endif // OVERDRIVEPRESENTER_HPP
|
||||
@@ -12,11 +12,10 @@ public:
|
||||
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);
|
||||
virtual void toggleClicked();
|
||||
virtual void sliderDriveChanged(int value);
|
||||
virtual void sliderToneChanged(int value);
|
||||
virtual void sliderLevelChanged(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
@@ -1,24 +1,36 @@
|
||||
#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
|
||||
#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);
|
||||
|
||||
/**
|
||||
* 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 ~OverviewPresenter() {}
|
||||
|
||||
private:
|
||||
OverviewPresenter();
|
||||
|
||||
OverviewView& view;
|
||||
};
|
||||
|
||||
#endif // OVERVIEWPRESENTER_HPP
|
||||
@@ -1,17 +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
|
||||
#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
|
||||
@@ -1,24 +1,36 @@
|
||||
#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
|
||||
#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);
|
||||
|
||||
/**
|
||||
* 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 ~ReverbPresenter() {}
|
||||
|
||||
private:
|
||||
ReverbPresenter();
|
||||
|
||||
ReverbView& view;
|
||||
};
|
||||
|
||||
#endif // REVERBPRESENTER_HPP
|
||||
@@ -12,11 +12,10 @@ public:
|
||||
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);
|
||||
virtual void toggleClicked();
|
||||
virtual void sliderTailleChanged(int value);
|
||||
virtual void sliderAmortiChanged(int value);
|
||||
virtual void sliderMixChanged(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
@@ -1,24 +1,36 @@
|
||||
#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
|
||||
#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);
|
||||
|
||||
/**
|
||||
* 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 ~SaturationPresenter() {}
|
||||
|
||||
private:
|
||||
SaturationPresenter();
|
||||
|
||||
SaturationView& view;
|
||||
};
|
||||
|
||||
#endif // SATURATIONPRESENTER_HPP
|
||||
@@ -12,10 +12,9 @@ public:
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
|
||||
virtual void goBack();
|
||||
virtual void toggleEnabled();
|
||||
virtual void param1Changed(int value);
|
||||
virtual void param2Changed(int value);
|
||||
virtual void toggleClicked();
|
||||
virtual void sliderDriveClicked(int value);
|
||||
virtual void sliderLevelClicked(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
#include <gui/echo_screen/EchoView.hpp>
|
||||
#include <gui/echo_screen/EchoPresenter.hpp>
|
||||
|
||||
EchoPresenter::EchoPresenter(EchoView& v)
|
||||
: view(v)
|
||||
{
|
||||
}
|
||||
|
||||
void EchoPresenter::activate()
|
||||
{
|
||||
}
|
||||
|
||||
void EchoPresenter::deactivate()
|
||||
{
|
||||
}
|
||||
#include <gui/echo_screen/EchoView.hpp>
|
||||
#include <gui/echo_screen/EchoPresenter.hpp>
|
||||
|
||||
EchoPresenter::EchoPresenter(EchoView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void EchoPresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void EchoPresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
#include <gui/echo_screen/EchoView.hpp>
|
||||
#include <audio_effects.h>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
EchoView::EchoView()
|
||||
{
|
||||
@@ -10,6 +8,10 @@ EchoView::EchoView()
|
||||
void EchoView::setupScreen()
|
||||
{
|
||||
EchoViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioEffects_GetParams()->echo.enabled);
|
||||
slider1.setValue((int16_t)(AudioEffects_GetParams()->echo.delay_ms / 10.0f));
|
||||
slider2.setValue((int16_t)(AudioEffects_GetParams()->echo.feedback / 0.95f * 100.0f));
|
||||
slider3.setValue((int16_t)(AudioEffects_GetParams()->echo.mix * 100.0f));
|
||||
}
|
||||
|
||||
void EchoView::tearDownScreen()
|
||||
@@ -17,30 +19,20 @@ void EchoView::tearDownScreen()
|
||||
EchoViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void EchoView::goBack()
|
||||
void EchoView::toggleClicked()
|
||||
{
|
||||
application().gotoOverviewScreenBlockTransition();
|
||||
AudioEffects_GetParams()->echo.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
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)
|
||||
void EchoView::sliderDelaiChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->echo.delay_ms = value * 10.0f;
|
||||
}
|
||||
void EchoView::param2Changed(int value)
|
||||
void EchoView::sliderFeedbackChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->echo.feedback = value / 100.0f * 0.95f;
|
||||
}
|
||||
void EchoView::param3Changed(int value)
|
||||
void EchoView::sliderMixChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->echo.mix = value / 100.0f;
|
||||
}
|
||||
@@ -1,15 +1,18 @@
|
||||
#include <gui/equalizer_screen/EqualizerView.hpp>
|
||||
#include <gui/equalizer_screen/EqualizerPresenter.hpp>
|
||||
|
||||
EqualizerPresenter::EqualizerPresenter(EqualizerView& v)
|
||||
: view(v)
|
||||
{
|
||||
}
|
||||
|
||||
void EqualizerPresenter::activate()
|
||||
{
|
||||
}
|
||||
|
||||
void EqualizerPresenter::deactivate()
|
||||
{
|
||||
}
|
||||
#include <gui/equalizer_screen/EqualizerView.hpp>
|
||||
#include <gui/equalizer_screen/EqualizerPresenter.hpp>
|
||||
|
||||
EqualizerPresenter::EqualizerPresenter(EqualizerView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void EqualizerPresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void EqualizerPresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
#include <gui/equalizer_screen/EqualizerView.hpp>
|
||||
#include <audio_effects.h>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
EqualizerView::EqualizerView()
|
||||
{
|
||||
@@ -10,6 +8,17 @@ EqualizerView::EqualizerView()
|
||||
void EqualizerView::setupScreen()
|
||||
{
|
||||
EqualizerViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioEffects_GetParams()->equalizer.enabled);
|
||||
bandSlider1.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[0].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider2.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[1].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider3.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[2].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider4.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[3].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider5.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[4].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider6.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[5].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider7.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[6].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider8.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[7].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider9.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[8].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
bandSlider10.setValue((int16_t)((AudioEffects_GetParams()->equalizer.bands[9].gain_db + 24.0f) / 48.0f * 100.0f));
|
||||
}
|
||||
|
||||
void EqualizerView::tearDownScreen()
|
||||
@@ -17,58 +26,48 @@ void EqualizerView::tearDownScreen()
|
||||
EqualizerViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void EqualizerView::goBack()
|
||||
void EqualizerView::toggleClicked()
|
||||
{
|
||||
application().gotoOverviewScreenBlockTransition();
|
||||
AudioEffects_GetParams()->equalizer.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
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)
|
||||
void EqualizerView::sliderBand1Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[0].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band2Changed(int value)
|
||||
void EqualizerView::sliderBand2Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[1].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band3Changed(int value)
|
||||
void EqualizerView::sliderBand3Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[2].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band4Changed(int value)
|
||||
void EqualizerView::sliderBand4Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[3].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band5Changed(int value)
|
||||
void EqualizerView::sliderBand5Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[4].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band6Changed(int value)
|
||||
void EqualizerView::sliderBand6Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[5].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band7Changed(int value)
|
||||
void EqualizerView::sliderBand7Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[6].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band8Changed(int value)
|
||||
void EqualizerView::sliderBand8Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[7].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band9Changed(int value)
|
||||
void EqualizerView::sliderBand9Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[8].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::band10Changed(int value)
|
||||
void EqualizerView::sliderBand10Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[9].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
@@ -1,15 +1,18 @@
|
||||
#include <gui/overdrive_screen/OverdriveView.hpp>
|
||||
#include <gui/overdrive_screen/OverdrivePresenter.hpp>
|
||||
|
||||
OverdrivePresenter::OverdrivePresenter(OverdriveView& v)
|
||||
: view(v)
|
||||
{
|
||||
}
|
||||
|
||||
void OverdrivePresenter::activate()
|
||||
{
|
||||
}
|
||||
|
||||
void OverdrivePresenter::deactivate()
|
||||
{
|
||||
}
|
||||
#include <gui/overdrive_screen/OverdriveView.hpp>
|
||||
#include <gui/overdrive_screen/OverdrivePresenter.hpp>
|
||||
|
||||
OverdrivePresenter::OverdrivePresenter(OverdriveView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OverdrivePresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OverdrivePresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
#include <gui/overdrive_screen/OverdriveView.hpp>
|
||||
#include <audio_effects.h>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
OverdriveView::OverdriveView()
|
||||
{
|
||||
@@ -10,6 +8,10 @@ OverdriveView::OverdriveView()
|
||||
void OverdriveView::setupScreen()
|
||||
{
|
||||
OverdriveViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioEffects_GetParams()->overdrive.enabled);
|
||||
slider1.setValue((int16_t)(AudioEffects_GetParams()->overdrive.drive * 100.0f));
|
||||
slider2.setValue((int16_t)(AudioEffects_GetParams()->overdrive.tone * 100.0f));
|
||||
slider3.setValue((int16_t)(AudioEffects_GetParams()->overdrive.level * 100.0f));
|
||||
}
|
||||
|
||||
void OverdriveView::tearDownScreen()
|
||||
@@ -17,30 +19,20 @@ void OverdriveView::tearDownScreen()
|
||||
OverdriveViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void OverdriveView::goBack()
|
||||
void OverdriveView::toggleClicked()
|
||||
{
|
||||
application().gotoOverviewScreenBlockTransition();
|
||||
AudioEffects_GetParams()->overdrive.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
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)
|
||||
void OverdriveView::sliderDriveChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->overdrive.drive = value / 100.0f;
|
||||
}
|
||||
void OverdriveView::param2Changed(int value)
|
||||
void OverdriveView::sliderToneChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->overdrive.tone = value / 100.0f;
|
||||
}
|
||||
void OverdriveView::param3Changed(int value)
|
||||
void OverdriveView::sliderLevelChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->overdrive.level = value / 100.0f;
|
||||
}
|
||||
@@ -1,15 +1,18 @@
|
||||
#include <gui/overview_screen/OverviewView.hpp>
|
||||
#include <gui/overview_screen/OverviewPresenter.hpp>
|
||||
|
||||
OverviewPresenter::OverviewPresenter(OverviewView& v)
|
||||
: view(v)
|
||||
{
|
||||
}
|
||||
|
||||
void OverviewPresenter::activate()
|
||||
{
|
||||
}
|
||||
|
||||
void OverviewPresenter::deactivate()
|
||||
{
|
||||
}
|
||||
#include <gui/overview_screen/OverviewView.hpp>
|
||||
#include <gui/overview_screen/OverviewPresenter.hpp>
|
||||
|
||||
OverviewPresenter::OverviewPresenter(OverviewView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OverviewPresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OverviewPresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,15 +1,16 @@
|
||||
#include <gui/overview_screen/OverviewView.hpp>
|
||||
|
||||
OverviewView::OverviewView()
|
||||
{
|
||||
}
|
||||
|
||||
void OverviewView::setupScreen()
|
||||
{
|
||||
OverviewViewBase::setupScreen();
|
||||
}
|
||||
|
||||
void OverviewView::tearDownScreen()
|
||||
{
|
||||
OverviewViewBase::tearDownScreen();
|
||||
}
|
||||
#include <gui/overview_screen/OverviewView.hpp>
|
||||
|
||||
OverviewView::OverviewView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OverviewView::setupScreen()
|
||||
{
|
||||
OverviewViewBase::setupScreen();
|
||||
}
|
||||
|
||||
void OverviewView::tearDownScreen()
|
||||
{
|
||||
OverviewViewBase::tearDownScreen();
|
||||
}
|
||||
@@ -1,15 +1,18 @@
|
||||
#include <gui/reverb_screen/ReverbView.hpp>
|
||||
#include <gui/reverb_screen/ReverbPresenter.hpp>
|
||||
|
||||
ReverbPresenter::ReverbPresenter(ReverbView& v)
|
||||
: view(v)
|
||||
{
|
||||
}
|
||||
|
||||
void ReverbPresenter::activate()
|
||||
{
|
||||
}
|
||||
|
||||
void ReverbPresenter::deactivate()
|
||||
{
|
||||
}
|
||||
#include <gui/reverb_screen/ReverbView.hpp>
|
||||
#include <gui/reverb_screen/ReverbPresenter.hpp>
|
||||
|
||||
ReverbPresenter::ReverbPresenter(ReverbView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ReverbPresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ReverbPresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
#include <gui/reverb_screen/ReverbView.hpp>
|
||||
#include <audio_effects.h>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
ReverbView::ReverbView()
|
||||
{
|
||||
@@ -10,6 +8,10 @@ ReverbView::ReverbView()
|
||||
void ReverbView::setupScreen()
|
||||
{
|
||||
ReverbViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioEffects_GetParams()->reverb.enabled);
|
||||
slider1.setValue((int16_t)(AudioEffects_GetParams()->reverb.room_size * 100.0f));
|
||||
slider2.setValue((int16_t)(AudioEffects_GetParams()->reverb.damping * 100.0f));
|
||||
slider3.setValue((int16_t)(AudioEffects_GetParams()->reverb.mix * 100.0f));
|
||||
}
|
||||
|
||||
void ReverbView::tearDownScreen()
|
||||
@@ -17,30 +19,20 @@ void ReverbView::tearDownScreen()
|
||||
ReverbViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void ReverbView::goBack()
|
||||
void ReverbView::toggleClicked()
|
||||
{
|
||||
application().gotoOverviewScreenBlockTransition();
|
||||
AudioEffects_GetParams()->reverb.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
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)
|
||||
void ReverbView::sliderTailleChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->reverb.room_size = value / 100.0f;
|
||||
}
|
||||
void ReverbView::param2Changed(int value)
|
||||
void ReverbView::sliderAmortiChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->reverb.damping = value / 100.0f;
|
||||
}
|
||||
void ReverbView::param3Changed(int value)
|
||||
void ReverbView::sliderMixChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->reverb.mix = value / 100.0f;
|
||||
}
|
||||
@@ -1,15 +1,18 @@
|
||||
#include <gui/saturation_screen/SaturationView.hpp>
|
||||
#include <gui/saturation_screen/SaturationPresenter.hpp>
|
||||
|
||||
SaturationPresenter::SaturationPresenter(SaturationView& v)
|
||||
: view(v)
|
||||
{
|
||||
}
|
||||
|
||||
void SaturationPresenter::activate()
|
||||
{
|
||||
}
|
||||
|
||||
void SaturationPresenter::deactivate()
|
||||
{
|
||||
}
|
||||
#include <gui/saturation_screen/SaturationView.hpp>
|
||||
#include <gui/saturation_screen/SaturationPresenter.hpp>
|
||||
|
||||
SaturationPresenter::SaturationPresenter(SaturationView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SaturationPresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SaturationPresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
#include <gui/saturation_screen/SaturationView.hpp>
|
||||
#include <audio_effects.h>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
SaturationView::SaturationView()
|
||||
{
|
||||
@@ -10,6 +8,9 @@ SaturationView::SaturationView()
|
||||
void SaturationView::setupScreen()
|
||||
{
|
||||
SaturationViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioEffects_GetParams()->saturation.enabled);
|
||||
slider1.setValue((int16_t)(AudioEffects_GetParams()->saturation.drive * 100.0f));
|
||||
slider2.setValue((int16_t)(AudioEffects_GetParams()->saturation.level * 100.0f));
|
||||
}
|
||||
|
||||
void SaturationView::tearDownScreen()
|
||||
@@ -17,26 +18,16 @@ void SaturationView::tearDownScreen()
|
||||
SaturationViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void SaturationView::goBack()
|
||||
void SaturationView::toggleClicked()
|
||||
{
|
||||
application().gotoOverviewScreenBlockTransition();
|
||||
AudioEffects_GetParams()->saturation.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
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)
|
||||
void SaturationView::sliderDriveClicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->saturation.drive = value / 100.0f;
|
||||
}
|
||||
void SaturationView::param2Changed(int value)
|
||||
void SaturationView::sliderLevelClicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->saturation.level = value / 100.0f;
|
||||
}
|
||||
Reference in new issue
Block a user