Ajout octaver
This commit is contained in:
1 parent
faef8f3673
commit
10c023cc3c
12 files changed
+701
-5
No files matched your search
@@ -71,7 +71,6 @@
|
||||
{
|
||||
"Type": "ButtonWithLabel",
|
||||
"Name": "buttonWithLabel1",
|
||||
"X": 6,
|
||||
"Y": 93,
|
||||
"Width": 420,
|
||||
"Height": 94,
|
||||
@@ -117,7 +116,7 @@
|
||||
"Type": "ButtonWithLabel",
|
||||
"Name": "buttonWithLabel3",
|
||||
"X": 380,
|
||||
"Y": -1,
|
||||
"Y": 281,
|
||||
"Width": 420,
|
||||
"Height": 94,
|
||||
"Pressed": "__generated\\glass_theme_images_widgets_button_regular_height_50_large_rounded_pressed.png",
|
||||
@@ -139,8 +138,7 @@
|
||||
{
|
||||
"Type": "ButtonWithLabel",
|
||||
"Name": "buttonWithLabel4",
|
||||
"X": 380,
|
||||
"Y": 375,
|
||||
"Y": 187,
|
||||
"Width": 420,
|
||||
"Height": 94,
|
||||
"Pressed": "__generated\\glass_theme_images_widgets_button_regular_height_50_large_rounded_pressed.png",
|
||||
@@ -182,6 +180,29 @@
|
||||
"TextRotation": "0",
|
||||
"Preset": "glass_theme\\presets\\button\\regular\\height_50\\large_rounded_normal.json"
|
||||
},
|
||||
{
|
||||
"Type": "ButtonWithLabel",
|
||||
"Name": "buttonWithLabel6",
|
||||
"X": 380,
|
||||
"Y": 93,
|
||||
"Width": 420,
|
||||
"Height": 94,
|
||||
"Pressed": "__generated\\glass_theme_images_widgets_button_regular_height_50_large_rounded_pressed.png",
|
||||
"Released": "__generated\\glass_theme_images_widgets_button_regular_height_50_large_rounded_normal.png",
|
||||
"TextId": "OCTAVER",
|
||||
"ReleasedColor": {
|
||||
"Red": 230,
|
||||
"Green": 214,
|
||||
"Blue": 170
|
||||
},
|
||||
"PressedColor": {
|
||||
"Red": 230,
|
||||
"Green": 214,
|
||||
"Blue": 170
|
||||
},
|
||||
"TextRotation": "0",
|
||||
"Preset": "glass_theme\\presets\\button\\regular\\height_50\\large_rounded_normal.json"
|
||||
},
|
||||
{
|
||||
"Type": "ToggleButton",
|
||||
"Name": "toggleButton1",
|
||||
@@ -265,6 +286,18 @@
|
||||
"Type": "ActionCustom",
|
||||
"FunctionName": "toggleAudioOnOFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"InteractionName": "Interaction7",
|
||||
"Trigger": {
|
||||
"Type": "TriggerClicked",
|
||||
"TriggerComponent": "buttonWithLabel6"
|
||||
},
|
||||
"Action": {
|
||||
"Type": "ActionGotoScreen",
|
||||
"ScreenTransitionType": "ScreenTransitionNone",
|
||||
"ActionComponent": "Octaver"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -498,6 +531,319 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "Octaver",
|
||||
"Components": [
|
||||
{
|
||||
"Type": "Image",
|
||||
"Name": "image1",
|
||||
"Y": -1,
|
||||
"Width": 800,
|
||||
"Height": 483,
|
||||
"RelativeFilename": "fondHorlogerie1.png"
|
||||
},
|
||||
{
|
||||
"Type": "Box",
|
||||
"Name": "box1",
|
||||
"Width": 800,
|
||||
"Height": 480,
|
||||
"Color": {
|
||||
"Red": 35,
|
||||
"Green": 24,
|
||||
"Blue": 15
|
||||
},
|
||||
"Alpha": 240
|
||||
},
|
||||
{
|
||||
"Type": "TextArea",
|
||||
"Name": "textArea2",
|
||||
"X": 102,
|
||||
"Y": 427,
|
||||
"Width": 35,
|
||||
"Height": 42,
|
||||
"TextId": "OCT_m2",
|
||||
"TextRotation": "0",
|
||||
"Color": {
|
||||
"Red": 230,
|
||||
"Green": 214,
|
||||
"Blue": 170
|
||||
},
|
||||
"AutoSize": true
|
||||
},
|
||||
{
|
||||
"Type": "TextArea",
|
||||
"Name": "textArea3",
|
||||
"X": 244,
|
||||
"Y": 427,
|
||||
"Width": 35,
|
||||
"Height": 42,
|
||||
"TextId": "OCT_m1",
|
||||
"TextRotation": "0",
|
||||
"Color": {
|
||||
"Red": 230,
|
||||
"Green": 214,
|
||||
"Blue": 170
|
||||
},
|
||||
"AutoSize": true
|
||||
},
|
||||
{
|
||||
"Type": "TextArea",
|
||||
"Name": "textArea4",
|
||||
"X": 389,
|
||||
"Y": 427,
|
||||
"Width": 22,
|
||||
"Height": 42,
|
||||
"TextId": "OCT_0",
|
||||
"TextRotation": "0",
|
||||
"Color": {
|
||||
"Red": 230,
|
||||
"Green": 214,
|
||||
"Blue": 170
|
||||
},
|
||||
"AutoSize": true
|
||||
},
|
||||
{
|
||||
"Type": "TextArea",
|
||||
"Name": "textArea5",
|
||||
"X": 526,
|
||||
"Y": 427,
|
||||
"Width": 45,
|
||||
"Height": 42,
|
||||
"TextId": "OCT_p1",
|
||||
"TextRotation": "0",
|
||||
"Color": {
|
||||
"Red": 230,
|
||||
"Green": 214,
|
||||
"Blue": 170
|
||||
},
|
||||
"AutoSize": true
|
||||
},
|
||||
{
|
||||
"Type": "TextArea",
|
||||
"Name": "textArea6",
|
||||
"X": 665,
|
||||
"Y": 427,
|
||||
"Width": 45,
|
||||
"Height": 42,
|
||||
"TextId": "OCT_p2",
|
||||
"TextRotation": "0",
|
||||
"Color": {
|
||||
"Red": 230,
|
||||
"Green": 214,
|
||||
"Blue": 170
|
||||
},
|
||||
"AutoSize": true
|
||||
},
|
||||
{
|
||||
"Type": "Slider",
|
||||
"Name": "slider1",
|
||||
"X": 91,
|
||||
"Y": 82,
|
||||
"Width": 56,
|
||||
"Height": 352,
|
||||
"BackgroundUnselected": "__generated\\glass_theme_images_widgets_slider_vertical_thick_track_medium.png",
|
||||
"BackgroundSelected": "__generated\\glass_theme_images_widgets_slider_vertical_thick_filler_medium.png",
|
||||
"Indicator": "__generated\\glass_theme_images_widgets_slider_vertical_thick_rounded_dark.png",
|
||||
"BackgroundX": 23,
|
||||
"BackgroundY": 26,
|
||||
"IndicatorMax": 300,
|
||||
"ValueMax": 100,
|
||||
"Preset": "glass_theme\\presets\\slider\\vertical\\thick\\medium_rounded_dark.json"
|
||||
},
|
||||
{
|
||||
"Type": "Slider",
|
||||
"Name": "slider2",
|
||||
"X": 233,
|
||||
"Y": 82,
|
||||
"Width": 56,
|
||||
"Height": 352,
|
||||
"BackgroundUnselected": "__generated\\glass_theme_images_widgets_slider_vertical_thick_track_medium.png",
|
||||
"BackgroundSelected": "__generated\\glass_theme_images_widgets_slider_vertical_thick_filler_medium.png",
|
||||
"Indicator": "__generated\\glass_theme_images_widgets_slider_vertical_thick_rounded_dark.png",
|
||||
"BackgroundX": 23,
|
||||
"BackgroundY": 26,
|
||||
"IndicatorMax": 300,
|
||||
"ValueMax": 100,
|
||||
"Preset": "glass_theme\\presets\\slider\\vertical\\thick\\medium_rounded_dark.json"
|
||||
},
|
||||
{
|
||||
"Type": "Slider",
|
||||
"Name": "slider3",
|
||||
"X": 372,
|
||||
"Y": 82,
|
||||
"Width": 56,
|
||||
"Height": 352,
|
||||
"BackgroundUnselected": "__generated\\glass_theme_images_widgets_slider_vertical_thick_track_medium.png",
|
||||
"BackgroundSelected": "__generated\\glass_theme_images_widgets_slider_vertical_thick_filler_medium.png",
|
||||
"Indicator": "__generated\\glass_theme_images_widgets_slider_vertical_thick_rounded_dark.png",
|
||||
"BackgroundX": 23,
|
||||
"BackgroundY": 26,
|
||||
"IndicatorMax": 300,
|
||||
"ValueMax": 100,
|
||||
"Preset": "glass_theme\\presets\\slider\\vertical\\thick\\medium_rounded_dark.json"
|
||||
},
|
||||
{
|
||||
"Type": "Slider",
|
||||
"Name": "slider4",
|
||||
"X": 520,
|
||||
"Y": 82,
|
||||
"Width": 56,
|
||||
"Height": 352,
|
||||
"BackgroundUnselected": "__generated\\glass_theme_images_widgets_slider_vertical_thick_track_medium.png",
|
||||
"BackgroundSelected": "__generated\\glass_theme_images_widgets_slider_vertical_thick_filler_medium.png",
|
||||
"Indicator": "__generated\\glass_theme_images_widgets_slider_vertical_thick_rounded_dark.png",
|
||||
"BackgroundX": 23,
|
||||
"BackgroundY": 26,
|
||||
"IndicatorMax": 300,
|
||||
"ValueMax": 100,
|
||||
"Preset": "glass_theme\\presets\\slider\\vertical\\thick\\medium_rounded_dark.json"
|
||||
},
|
||||
{
|
||||
"Type": "Slider",
|
||||
"Name": "slider5",
|
||||
"X": 661,
|
||||
"Y": 82,
|
||||
"Width": 56,
|
||||
"Height": 352,
|
||||
"BackgroundUnselected": "__generated\\glass_theme_images_widgets_slider_vertical_thick_track_medium.png",
|
||||
"BackgroundSelected": "__generated\\glass_theme_images_widgets_slider_vertical_thick_filler_medium.png",
|
||||
"Indicator": "__generated\\glass_theme_images_widgets_slider_vertical_thick_rounded_dark.png",
|
||||
"BackgroundX": 23,
|
||||
"BackgroundY": 26,
|
||||
"IndicatorMax": 300,
|
||||
"ValueMax": 100,
|
||||
"Preset": "glass_theme\\presets\\slider\\vertical\\thick\\medium_rounded_dark.json"
|
||||
},
|
||||
{
|
||||
"Type": "TextArea",
|
||||
"Name": "textArea1",
|
||||
"X": 295,
|
||||
"Y": 26,
|
||||
"Width": 188,
|
||||
"Height": 42,
|
||||
"TextId": "OCTAVER",
|
||||
"TextRotation": "0",
|
||||
"Color": {
|
||||
"Red": 230,
|
||||
"Green": 214,
|
||||
"Blue": 170
|
||||
},
|
||||
"AutoSize": true
|
||||
},
|
||||
{
|
||||
"Type": "ToggleButton",
|
||||
"Name": "toggleButton1",
|
||||
"X": 576,
|
||||
"Y": 20,
|
||||
"Width": 170,
|
||||
"Height": 60,
|
||||
"Pressed": "__generated\\glass_theme_images_widgets_togglebutton_large_round_text_on_active.png",
|
||||
"Released": "__generated\\glass_theme_images_widgets_togglebutton_large_round_text_off_normal.png",
|
||||
"Preset": "glass_theme\\presets\\togglebutton\\large\\round_active_text.json"
|
||||
},
|
||||
{
|
||||
"Type": "ButtonWithLabel",
|
||||
"Name": "buttonWithLabel1",
|
||||
"Width": 225,
|
||||
"Height": 94,
|
||||
"Pressed": "__generated\\glass_theme_images_widgets_button_regular_height_50_small_rounded_pressed.png",
|
||||
"Released": "__generated\\glass_theme_images_widgets_button_regular_height_50_small_rounded_normal.png",
|
||||
"TextId": "BACK",
|
||||
"ReleasedColor": {
|
||||
"Red": 230,
|
||||
"Green": 214,
|
||||
"Blue": 170
|
||||
},
|
||||
"PressedColor": {
|
||||
"Red": 230,
|
||||
"Green": 214,
|
||||
"Blue": 170
|
||||
},
|
||||
"TextRotation": "0",
|
||||
"Preset": "glass_theme\\presets\\button\\regular\\height_50\\small_rounded_normal.json"
|
||||
}
|
||||
],
|
||||
"Interactions": [
|
||||
{
|
||||
"InteractionName": "Interaction1",
|
||||
"Trigger": {
|
||||
"Type": "TriggerClicked",
|
||||
"TriggerComponent": "buttonWithLabel1"
|
||||
},
|
||||
"Action": {
|
||||
"Type": "ActionGotoScreen",
|
||||
"ScreenTransitionType": "ScreenTransitionNone",
|
||||
"ActionComponent": "Overview"
|
||||
}
|
||||
},
|
||||
{
|
||||
"InteractionName": "Interaction2",
|
||||
"Trigger": {
|
||||
"Type": "TriggerClicked",
|
||||
"TriggerComponent": "toggleButton1"
|
||||
},
|
||||
"Action": {
|
||||
"Type": "ActionCustom",
|
||||
"FunctionName": "toggleClicked"
|
||||
}
|
||||
},
|
||||
{
|
||||
"InteractionName": "Interaction3",
|
||||
"Trigger": {
|
||||
"Type": "TriggerSliderValueChanged",
|
||||
"TriggerComponent": "slider1"
|
||||
},
|
||||
"Action": {
|
||||
"Type": "ActionCustom",
|
||||
"FunctionName": "slider1Clicked"
|
||||
}
|
||||
},
|
||||
{
|
||||
"InteractionName": "Interaction4",
|
||||
"Trigger": {
|
||||
"Type": "TriggerSliderValueChanged",
|
||||
"TriggerComponent": "slider2"
|
||||
},
|
||||
"Action": {
|
||||
"Type": "ActionCustom",
|
||||
"FunctionName": "slider2Clicked"
|
||||
}
|
||||
},
|
||||
{
|
||||
"InteractionName": "Interaction5",
|
||||
"Trigger": {
|
||||
"Type": "TriggerSliderValueChanged",
|
||||
"TriggerComponent": "slider3"
|
||||
},
|
||||
"Action": {
|
||||
"Type": "ActionCustom",
|
||||
"FunctionName": "slider3Clicked"
|
||||
}
|
||||
},
|
||||
{
|
||||
"InteractionName": "Interaction6",
|
||||
"Trigger": {
|
||||
"Type": "TriggerSliderValueChanged",
|
||||
"TriggerComponent": "slider4"
|
||||
},
|
||||
"Action": {
|
||||
"Type": "ActionCustom",
|
||||
"FunctionName": "slider4Clicked"
|
||||
}
|
||||
},
|
||||
{
|
||||
"InteractionName": "Interaction7",
|
||||
"Trigger": {
|
||||
"Type": "TriggerSliderValueChanged",
|
||||
"TriggerComponent": "slider4"
|
||||
},
|
||||
"Action": {
|
||||
"Type": "ActionCustom",
|
||||
"FunctionName": "slider5Clicked"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "Saturation",
|
||||
"Components": [
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
<Text Id="EQUALIZER" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB" Alignment="Center">EQUALIZER</Translation>
|
||||
</Text>
|
||||
<Text Id="OCTAVER" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB">OCTAVER</Translation>
|
||||
</Text>
|
||||
<Text Id="OVERDRIVE" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB" Alignment="Center">OVERDRIVE</Translation>
|
||||
</Text>
|
||||
@@ -86,6 +89,21 @@
|
||||
<Text Id="EQ_16K" Alignment="Center" TypographyId="Default">
|
||||
<Translation Language="GB" Alignment="Center">16K</Translation>
|
||||
</Text>
|
||||
<Text Id="OCT_m2" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB" Alignment="Center">-2</Translation>
|
||||
</Text>
|
||||
<Text Id="OCT_m1" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB" Alignment="Center">-1</Translation>
|
||||
</Text>
|
||||
<Text Id="OCT_0" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB" Alignment="Center">0</Translation>
|
||||
</Text>
|
||||
<Text Id="OCT_p1" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB">+1</Translation>
|
||||
</Text>
|
||||
<Text Id="OCT_p2" Alignment="Center" TypographyId="Large">
|
||||
<Translation Language="GB" Alignment="Center">+2</Translation>
|
||||
</Text>
|
||||
</TextGroup>
|
||||
<TextGroup Id="Unsorted" />
|
||||
</Texts>
|
||||
|
||||
@@ -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,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;
|
||||
}
|
||||
Reference in new issue
Block a user