init
This commit is contained in:
commit
2c2202e60d
2491 files changed
+1295990
No files matched your search
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
#ifndef FRONTENDAPPLICATION_HPP
|
||||
#define FRONTENDAPPLICATION_HPP
|
||||
|
||||
#include <gui_generated/common/FrontendApplicationBase.hpp>
|
||||
|
||||
class FrontendHeap;
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class FrontendApplication : public FrontendApplicationBase
|
||||
{
|
||||
public:
|
||||
FrontendApplication(Model& m, FrontendHeap& heap);
|
||||
virtual ~FrontendApplication() { }
|
||||
|
||||
virtual void handleTickEvent()
|
||||
{
|
||||
model.tick();
|
||||
FrontendApplicationBase::handleTickEvent();
|
||||
}
|
||||
private:
|
||||
};
|
||||
|
||||
#endif // FRONTENDAPPLICATION_HPP
|
||||
@@ -0,0 +1,74 @@
|
||||
#ifndef FRONTENDHEAP_HPP
|
||||
#define FRONTENDHEAP_HPP
|
||||
|
||||
#include <gui_generated/common/FrontendHeapBase.hpp>
|
||||
|
||||
class FrontendHeap : public FrontendHeapBase
|
||||
{
|
||||
public:
|
||||
/* List any user-defined view types here*/
|
||||
typedef touchgfx::meta::TypeList< touchgfx::meta::Nil, //Replace this with first user-defined type
|
||||
touchgfx::meta::Nil //List must always end with meta::Nil !
|
||||
> UserDefinedViewTypes;
|
||||
|
||||
/* List any user-defined presenter types here*/
|
||||
typedef touchgfx::meta::TypeList< touchgfx::meta::Nil, //Replace this with first user-defined type
|
||||
touchgfx::meta::Nil //List must always end with meta::Nil !
|
||||
> UserDefinedPresenterTypes;
|
||||
|
||||
/* List any user-defined transition types here*/
|
||||
typedef touchgfx::meta::TypeList< touchgfx::meta::Nil, //Replace this with first user-defined type
|
||||
touchgfx::meta::Nil //List must always end with meta::Nil !
|
||||
> UserDefinedTransitionTypes;
|
||||
|
||||
|
||||
|
||||
/* Calculate largest view, both from generated and user-defined typelists */
|
||||
typedef touchgfx::meta::select_type_maxsize< UserDefinedViewTypes >::type MaxUserViewType;
|
||||
|
||||
typedef touchgfx::meta::TypeList< MaxGeneratedViewType,
|
||||
touchgfx::meta::TypeList< MaxUserViewType,
|
||||
touchgfx::meta::Nil
|
||||
> > CombinedViewTypes;
|
||||
|
||||
typedef touchgfx::meta::select_type_maxsize< CombinedViewTypes >::type MaxViewType;
|
||||
|
||||
/* Calculate largest presenter, both from generated and user-defined typelists */
|
||||
typedef touchgfx::meta::select_type_maxsize< UserDefinedPresenterTypes >::type MaxUserPresenterType;
|
||||
|
||||
typedef touchgfx::meta::TypeList< MaxGeneratedPresenterType,
|
||||
touchgfx::meta::TypeList< MaxUserPresenterType,
|
||||
touchgfx::meta::Nil
|
||||
> > CombinedPresenterTypes;
|
||||
typedef touchgfx::meta::select_type_maxsize< CombinedPresenterTypes >::type MaxPresenterType;
|
||||
|
||||
/* Calculate largest transition, both from generated and user-defined typelists */
|
||||
typedef touchgfx::meta::select_type_maxsize< UserDefinedTransitionTypes >::type MaxUserTransitionType;
|
||||
|
||||
typedef touchgfx::meta::TypeList< MaxGeneratedTransitionType,
|
||||
touchgfx::meta::TypeList< MaxUserTransitionType,
|
||||
touchgfx::meta::Nil
|
||||
> > CombinedTransitionTypes;
|
||||
typedef touchgfx::meta::select_type_maxsize< CombinedTransitionTypes >::type MaxTransitionType;
|
||||
|
||||
static FrontendHeap& getInstance()
|
||||
{
|
||||
static FrontendHeap instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
touchgfx::Partition< CombinedPresenterTypes, 1 > presenters;
|
||||
touchgfx::Partition< CombinedViewTypes, 1 > views;
|
||||
touchgfx::Partition< CombinedTransitionTypes, 1 > transitions;
|
||||
Model model;
|
||||
FrontendApplication app;
|
||||
|
||||
private:
|
||||
FrontendHeap() : FrontendHeapBase(presenters, views, transitions, app),
|
||||
app(model, *this)
|
||||
{
|
||||
gotoStartScreen(app);
|
||||
}
|
||||
};
|
||||
|
||||
#endif // FRONTENDHEAP_HPP
|
||||
@@ -0,0 +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);
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -0,0 +1,22 @@
|
||||
#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 toggleClicked();
|
||||
virtual void sliderDelaiChanged(int value);
|
||||
virtual void sliderFeedbackChanged(int value);
|
||||
virtual void sliderMixChanged(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // ECHOVIEW_HPP
|
||||
@@ -0,0 +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);
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -0,0 +1,29 @@
|
||||
#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 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:
|
||||
};
|
||||
|
||||
#endif // EQUALIZERVIEW_HPP
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef INITSCREENPRESENTER_HPP
|
||||
#define INITSCREENPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class InitScreenView;
|
||||
|
||||
class InitScreenPresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
InitScreenPresenter(InitScreenView& 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 ~InitScreenPresenter() {}
|
||||
|
||||
private:
|
||||
InitScreenPresenter();
|
||||
|
||||
InitScreenView& view;
|
||||
};
|
||||
|
||||
#endif // INITSCREENPRESENTER_HPP
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef INITSCREENVIEW_HPP
|
||||
#define INITSCREENVIEW_HPP
|
||||
|
||||
#include <gui_generated/initscreen_screen/InitScreenViewBase.hpp>
|
||||
#include <gui/initscreen_screen/InitScreenPresenter.hpp>
|
||||
|
||||
class InitScreenView : public InitScreenViewBase
|
||||
{
|
||||
public:
|
||||
InitScreenView();
|
||||
virtual ~InitScreenView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // INITSCREENVIEW_HPP
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef MODEL_HPP
|
||||
#define MODEL_HPP
|
||||
|
||||
class ModelListener;
|
||||
|
||||
class Model
|
||||
{
|
||||
public:
|
||||
Model();
|
||||
|
||||
void bind(ModelListener* listener)
|
||||
{
|
||||
modelListener = listener;
|
||||
}
|
||||
|
||||
void tick();
|
||||
protected:
|
||||
ModelListener* modelListener;
|
||||
};
|
||||
|
||||
#endif // MODEL_HPP
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef MODELLISTENER_HPP
|
||||
#define MODELLISTENER_HPP
|
||||
|
||||
#include <gui/model/Model.hpp>
|
||||
|
||||
class ModelListener
|
||||
{
|
||||
public:
|
||||
ModelListener() : model(0) {}
|
||||
|
||||
virtual ~ModelListener() {}
|
||||
|
||||
void bind(Model* m)
|
||||
{
|
||||
model = m;
|
||||
}
|
||||
protected:
|
||||
Model* model;
|
||||
};
|
||||
|
||||
#endif // MODELLISTENER_HPP
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef OCTAVERPRESENTER_HPP
|
||||
#define OCTAVERPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class OctaverView;
|
||||
|
||||
class OctaverPresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
OctaverPresenter(OctaverView& 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 ~OctaverPresenter() {}
|
||||
|
||||
private:
|
||||
OctaverPresenter();
|
||||
|
||||
OctaverView& view;
|
||||
};
|
||||
|
||||
#endif // OCTAVERPRESENTER_HPP
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef OCTAVERVIEW_HPP
|
||||
#define OCTAVERVIEW_HPP
|
||||
|
||||
#include <gui_generated/octaver_screen/OctaverViewBase.hpp>
|
||||
#include <gui/octaver_screen/OctaverPresenter.hpp>
|
||||
|
||||
class OctaverView : public OctaverViewBase
|
||||
{
|
||||
public:
|
||||
OctaverView();
|
||||
virtual ~OctaverView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
|
||||
virtual void toggleClicked();
|
||||
virtual void slider1Clicked(int value);
|
||||
virtual void slider2Clicked(int value);
|
||||
virtual void slider3Clicked(int value);
|
||||
virtual void slider4Clicked(int value);
|
||||
virtual void slider5Clicked(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // OCTAVERVIEW_HPP
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef OSCILLOPRESENTER_HPP
|
||||
#define OSCILLOPRESENTER_HPP
|
||||
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
#include <mvp/Presenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
class OscilloView;
|
||||
|
||||
class OscilloPresenter : public touchgfx::Presenter, public ModelListener
|
||||
{
|
||||
public:
|
||||
OscilloPresenter(OscilloView& 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 ~OscilloPresenter() {}
|
||||
|
||||
private:
|
||||
OscilloPresenter();
|
||||
|
||||
OscilloView& view;
|
||||
};
|
||||
|
||||
#endif // OSCILLOPRESENTER_HPP
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef OSCILLOVIEW_HPP
|
||||
#define OSCILLOVIEW_HPP
|
||||
|
||||
#include <gui_generated/oscillo_screen/OscilloViewBase.hpp>
|
||||
#include <gui/oscillo_screen/OscilloPresenter.hpp>
|
||||
|
||||
class OscilloView : public OscilloViewBase
|
||||
{
|
||||
public:
|
||||
OscilloView();
|
||||
virtual ~OscilloView() {}
|
||||
virtual void setupScreen();
|
||||
virtual void tearDownScreen();
|
||||
virtual void handleTickEvent();
|
||||
|
||||
virtual void toggleClicked();
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // OSCILLOVIEW_HPP
|
||||
@@ -0,0 +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);
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -0,0 +1,22 @@
|
||||
#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 toggleClicked();
|
||||
virtual void sliderDriveChanged(int value);
|
||||
virtual void sliderToneChanged(int value);
|
||||
virtual void sliderLevelChanged(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // OVERDRIVEVIEW_HPP
|
||||
@@ -0,0 +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);
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -0,0 +1,22 @@
|
||||
#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();
|
||||
virtual void handleTickEvent();
|
||||
|
||||
virtual void toggleAudioOnOFF();
|
||||
virtual void slider1Changed(int value);
|
||||
protected:
|
||||
bool repeatButtonWasPressed;
|
||||
};
|
||||
|
||||
#endif // OVERVIEWVIEW_HPP
|
||||
@@ -0,0 +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);
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -0,0 +1,22 @@
|
||||
#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 toggleClicked();
|
||||
virtual void sliderTailleChanged(int value);
|
||||
virtual void sliderAmortiChanged(int value);
|
||||
virtual void sliderMixChanged(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // REVERBVIEW_HPP
|
||||
@@ -0,0 +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);
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -0,0 +1,21 @@
|
||||
#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 toggleClicked();
|
||||
virtual void sliderDriveClicked(int value);
|
||||
virtual void sliderLevelClicked(int value);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // SATURATIONVIEW_HPP
|
||||
Vendored
BIN
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
#include <gui/common/FrontendApplication.hpp>
|
||||
|
||||
FrontendApplication::FrontendApplication(Model& m, FrontendHeap& heap)
|
||||
: FrontendApplicationBase(m, heap)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +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()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
#include <gui/echo_screen/EchoView.hpp>
|
||||
#include <audio_effects.h>
|
||||
|
||||
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()
|
||||
{
|
||||
EchoViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void EchoView::toggleClicked()
|
||||
{
|
||||
AudioEffects_GetParams()->echo.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
void EchoView::sliderDelaiChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->echo.delay_ms = value * 10.0f;
|
||||
}
|
||||
void EchoView::sliderFeedbackChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->echo.feedback = value / 100.0f * 0.95f;
|
||||
}
|
||||
void EchoView::sliderMixChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->echo.mix = value / 100.0f;
|
||||
}
|
||||
@@ -0,0 +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()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
#include <gui/equalizer_screen/EqualizerView.hpp>
|
||||
#include <audio_effects.h>
|
||||
|
||||
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()
|
||||
{
|
||||
EqualizerViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void EqualizerView::toggleClicked()
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
void EqualizerView::sliderBand1Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[0].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand2Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[1].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand3Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[2].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand4Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[3].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand5Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[4].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand6Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[5].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand7Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[6].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand8Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[7].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand9Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[8].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
void EqualizerView::sliderBand10Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->equalizer.bands[9].gain_db = (value / 100.0f) * 48.0f - 24.0f;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include <gui/initscreen_screen/InitScreenView.hpp>
|
||||
#include <gui/initscreen_screen/InitScreenPresenter.hpp>
|
||||
|
||||
InitScreenPresenter::InitScreenPresenter(InitScreenView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void InitScreenPresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void InitScreenPresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#include <gui/initscreen_screen/InitScreenView.hpp>
|
||||
|
||||
InitScreenView::InitScreenView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void InitScreenView::setupScreen()
|
||||
{
|
||||
InitScreenViewBase::setupScreen();
|
||||
}
|
||||
|
||||
void InitScreenView::tearDownScreen()
|
||||
{
|
||||
InitScreenViewBase::tearDownScreen();
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#include <gui/model/Model.hpp>
|
||||
#include <gui/model/ModelListener.hpp>
|
||||
|
||||
Model::Model() : modelListener(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Model::tick()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include <gui/octaver_screen/OctaverView.hpp>
|
||||
#include <gui/octaver_screen/OctaverPresenter.hpp>
|
||||
|
||||
OctaverPresenter::OctaverPresenter(OctaverView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OctaverPresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OctaverPresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
#include <gui/octaver_screen/OctaverView.hpp>
|
||||
#include <audio_effects.h>
|
||||
|
||||
OctaverView::OctaverView()
|
||||
{
|
||||
}
|
||||
|
||||
void OctaverView::setupScreen()
|
||||
{
|
||||
OctaverViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioEffects_GetParams()->octaver.enabled);
|
||||
slider1.setValue((int16_t)(AudioEffects_GetParams()->octaver.level_down2 * 100.0f));
|
||||
slider2.setValue((int16_t)(AudioEffects_GetParams()->octaver.level_down1 * 100.0f));
|
||||
slider3.setValue((int16_t)(AudioEffects_GetParams()->octaver.level_dry * 100.0f));
|
||||
slider4.setValue((int16_t)(AudioEffects_GetParams()->octaver.level_up1 * 100.0f));
|
||||
slider5.setValue((int16_t)(AudioEffects_GetParams()->octaver.level_up2 * 100.0f));
|
||||
}
|
||||
|
||||
void OctaverView::tearDownScreen()
|
||||
{
|
||||
OctaverViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void OctaverView::toggleClicked()
|
||||
{
|
||||
AudioEffects_GetParams()->octaver.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
void OctaverView::slider1Clicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->octaver.level_down2 = value / 100.0f;
|
||||
}
|
||||
void OctaverView::slider2Clicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->octaver.level_down1 = value / 100.0f;
|
||||
}
|
||||
void OctaverView::slider3Clicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->octaver.level_dry = value / 100.0f;
|
||||
}
|
||||
void OctaverView::slider4Clicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->octaver.level_up1 = value / 100.0f;
|
||||
}
|
||||
void OctaverView::slider5Clicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->octaver.level_up2 = value / 100.0f;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include <gui/oscillo_screen/OscilloView.hpp>
|
||||
#include <gui/oscillo_screen/OscilloPresenter.hpp>
|
||||
|
||||
OscilloPresenter::OscilloPresenter(OscilloView& v)
|
||||
: view(v)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OscilloPresenter::activate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OscilloPresenter::deactivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
#include <gui/oscillo_screen/OscilloView.hpp>
|
||||
#include <audio_analysis.h>
|
||||
#include <touchgfx/Unicode.hpp>
|
||||
|
||||
OscilloView::OscilloView()
|
||||
{
|
||||
}
|
||||
|
||||
void OscilloView::setupScreen()
|
||||
{
|
||||
OscilloViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioAnalysis_IsEnabled());
|
||||
|
||||
/* Echelle du graphe en dB (affichage uniquement, pas une mesure calibree) :
|
||||
* de -80dB (proche du plancher de bruit numerique) a +5dB de marge au-dessus
|
||||
* du 0dB nominal. */
|
||||
graph1.setGraphRangeY(-80.0f, 5.0f);
|
||||
|
||||
/* Axe X en Hz, de 0 a Fe/2 (24kHz) : ce graphe (statique, points X/Y explicites,
|
||||
* contrairement au precedent DynamicGraph a increment X automatique) recoit
|
||||
* directement la frequence de chaque bin avec addDataPoint(x, y). */
|
||||
graph1.setGraphRangeX(0.0f, (float)AUDIO_ANALYSIS_SAMPLE_RATE_HZ / 2.0f);
|
||||
}
|
||||
|
||||
void OscilloView::tearDownScreen()
|
||||
{
|
||||
OscilloViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void OscilloView::handleTickEvent()
|
||||
{
|
||||
OscilloViewBase::handleTickEvent();
|
||||
|
||||
if (!AudioAnalysis_IsEnabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (AudioAnalysis_Update())
|
||||
{
|
||||
const float *magnitudesDb = AudioAnalysis_GetMagnitudesDb();
|
||||
const float binHz = (float)AUDIO_ANALYSIS_SAMPLE_RATE_HZ / (float)AUDIO_ANALYSIS_FFT_SIZE;
|
||||
|
||||
graph1.clear();
|
||||
for (int i = 0; i < (int)AUDIO_ANALYSIS_NUM_BINS; i++)
|
||||
{
|
||||
graph1.addDataPoint((float)i * binHz, magnitudesDb[i]);
|
||||
}
|
||||
|
||||
touchgfx::Unicode::snprintf(textArea2Buffer, TEXTAREA2_SIZE, "%d", (int)AudioAnalysis_GetPeakFrequencyHz());
|
||||
textArea2.setWildcard(textArea2Buffer);
|
||||
textArea2.invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
void OscilloView::toggleClicked()
|
||||
{
|
||||
AudioAnalysis_SetEnabled(toggleButton1.getState());
|
||||
}
|
||||
@@ -0,0 +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()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
#include <gui/overdrive_screen/OverdriveView.hpp>
|
||||
#include <audio_effects.h>
|
||||
|
||||
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()
|
||||
{
|
||||
OverdriveViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void OverdriveView::toggleClicked()
|
||||
{
|
||||
AudioEffects_GetParams()->overdrive.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
void OverdriveView::sliderDriveChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->overdrive.drive = value / 100.0f;
|
||||
}
|
||||
void OverdriveView::sliderToneChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->overdrive.tone = value / 100.0f;
|
||||
}
|
||||
void OverdriveView::sliderLevelChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->overdrive.level = value / 100.0f;
|
||||
}
|
||||
@@ -0,0 +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()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
#include <gui/overview_screen/OverviewView.hpp>
|
||||
#include <audio_effects.h>
|
||||
#include <audio_looper.h>
|
||||
|
||||
OverviewView::OverviewView() : repeatButtonWasPressed(false)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OverviewView::setupScreen()
|
||||
{
|
||||
OverviewViewBase::setupScreen();
|
||||
toggleButton1.forceState(AudioEffects_GetParams()->audio_on_off);
|
||||
slider1.setValue((int16_t)(AudioEffects_GetParams()->master_volume * 100.0f));
|
||||
}
|
||||
|
||||
void OverviewView::tearDownScreen()
|
||||
{
|
||||
OverviewViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void OverviewView::handleTickEvent()
|
||||
{
|
||||
OverviewViewBase::handleTickEvent();
|
||||
|
||||
/* repeatButton1 declenche une action a l'appui puis en continu tant qu'il est
|
||||
* maintenu (comportement standard TouchGFX d'un RepeatButton) : ca ne donne pas
|
||||
* directement un evenement "relache". On detecte donc nous-memes le front sur son
|
||||
* etat presse/relache, lu chaque tick, pour piloter l'enregistreur/lecteur accelere. */
|
||||
bool pressed = repeatButton1.getPressedState();
|
||||
if (pressed && !repeatButtonWasPressed)
|
||||
{
|
||||
AudioLooper_StartRecording();
|
||||
}
|
||||
else if (!pressed && repeatButtonWasPressed)
|
||||
{
|
||||
AudioLooper_StopRecordingAndPlay();
|
||||
}
|
||||
repeatButtonWasPressed = pressed;
|
||||
}
|
||||
|
||||
void OverviewView::toggleAudioOnOFF()
|
||||
{
|
||||
AudioEffects_GetParams()->audio_on_off = toggleButton1.getState();
|
||||
}
|
||||
|
||||
void OverviewView::slider1Changed(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->master_volume = value / 100.0f;
|
||||
|
||||
/* Le volume pilote l'etat marche/arret (0 = off, non nul = on), mais pas
|
||||
* l'inverse : agir sur le toggle ne doit pas modifier le volume. */
|
||||
bool en = (value != 0);
|
||||
AudioEffects_GetParams()->audio_on_off = en;
|
||||
toggleButton1.forceState(en);
|
||||
toggleButton1.invalidate();
|
||||
}
|
||||
@@ -0,0 +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()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
#include <gui/reverb_screen/ReverbView.hpp>
|
||||
#include <audio_effects.h>
|
||||
|
||||
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()
|
||||
{
|
||||
ReverbViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void ReverbView::toggleClicked()
|
||||
{
|
||||
AudioEffects_GetParams()->reverb.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
void ReverbView::sliderTailleChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->reverb.room_size = value / 100.0f;
|
||||
}
|
||||
void ReverbView::sliderAmortiChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->reverb.damping = value / 100.0f;
|
||||
}
|
||||
void ReverbView::sliderMixChanged(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->reverb.mix = value / 100.0f;
|
||||
}
|
||||
@@ -0,0 +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()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
#include <gui/saturation_screen/SaturationView.hpp>
|
||||
#include <audio_effects.h>
|
||||
|
||||
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()
|
||||
{
|
||||
SaturationViewBase::tearDownScreen();
|
||||
}
|
||||
|
||||
void SaturationView::toggleClicked()
|
||||
{
|
||||
AudioEffects_GetParams()->saturation.enabled = toggleButton1.getState();
|
||||
}
|
||||
|
||||
void SaturationView::sliderDriveClicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->saturation.drive = value / 100.0f;
|
||||
}
|
||||
void SaturationView::sliderLevelClicked(int value)
|
||||
{
|
||||
AudioEffects_GetParams()->saturation.level = value / 100.0f;
|
||||
}
|
||||
Reference in new issue
Block a user