Krotos Modules 3
Loading...
Searching...
No Matches
KwidgetGUI_CoreEngineGranular.cpp
Go to the documentation of this file.
1namespace krotos
2{
4 {
5 m_Start.setVisible(shouldBeVisible);
6 m_Size.setVisible(shouldBeVisible);
7 m_Rate.setVisible(shouldBeVisible);
8 m_Detune.setVisible(shouldBeVisible);
10 m_Width.setVisible(shouldBeVisible);
11 m_Level.setVisible(shouldBeVisible);
13 m_LevelRand.setVisible(shouldBeVisible);
14 m_Pan.setVisible(shouldBeVisible);
15 m_PanRand.setVisible(shouldBeVisible);
16 m_GranularLevel.setVisible(shouldBeVisible);
17 m_GrainMax.setVisible(shouldBeVisible);
18 m_Distance.setVisible(shouldBeVisible);
19 m_Shape.setVisible(shouldBeVisible);
20
21 m_StartRand.setVisible(shouldBeVisible);
22 m_SizeRand.setVisible(shouldBeVisible);
23 m_RateRand.setVisible(shouldBeVisible);
24 m_DetuneRand.setVisible(shouldBeVisible);
25 m_WidthRand.setVisible(shouldBeVisible);
26
27 m_NormaliseToggle.setVisible(shouldBeVisible);
28 m_SALoopToggle.setVisible(shouldBeVisible);
29 m_DetuneRand.setVisible(shouldBeVisible);
30 m_trigger.setVisible(shouldBeVisible);
31 m_NORToggle.setVisible(shouldBeVisible);
32 m_AutoplayToggle.setVisible(shouldBeVisible);
34 }
35
58
60 {
61 m_tabbedComponent->clearTabs();
62
63 m_tabbedComponent->addTab("MAIN", findColour(TabbedComponent::backgroundColourId), &m_mainTab, false);
64 m_tabbedComponent->addTab("RND", findColour(TabbedComponent::backgroundColourId), &m_randTab, false);
65 m_tabbedComponent->addTab("AMP ENV", findColour(TabbedComponent::backgroundColourId), &m_ampEnvTab, false);
66 m_tabbedComponent->addTab("PITCH ENV", findColour(TabbedComponent::backgroundColourId), &m_pitchEnvTab, false);
67 m_tabbedComponent->addTab("EXTRAS", findColour(TabbedComponent::backgroundColourId), &m_extrasTab, false);
68 // special case slider - changes Tab depending on Granular mode
70
71 // Loop through every tab button
72 for (int tabIndex = 0; tabIndex < m_tabbedComponent->getNumTabs(); tabIndex++)
73 {
74 const auto& tabButton = m_tabbedComponent->getTabbedButtonBar().getTabButton(tabIndex);
75 // Construct and set a unique ID for each button
76 tabButton->setComponentID("GranularTab" + tabButton->getName());
77 }
78 }
79} // namespace krotos
Slider & getSlider()
Definition AttachedSlider.cpp:165
Button & getButton()
Definition AttachedToggleButton.cpp:26
AttachedSlider m_DetuneRand
Definition KwidgetGUI_CoreEngine.h:116
void setGranularControlsVisibility(bool shouldBeVisible)
Definition KwidgetGUI_CoreEngineGranular.cpp:3
std::unique_ptr< TabbedComponent > m_tabbedComponent
Definition KwidgetGUI_CoreEngine.h:331
AttachedSlider m_Pan
Definition KwidgetGUI_CoreEngine.h:108
AttachedSlider m_Size
Definition KwidgetGUI_CoreEngine.h:104
AttachedSlider m_RateRand
Definition KwidgetGUI_CoreEngine.h:115
AttachedSlider m_Shape
Definition KwidgetGUI_CoreEngine.h:132
AttachedToggleButton m_SALoopToggle
Definition KwidgetGUI_CoreEngine.h:148
AttachedSlider m_WidthRand
Definition KwidgetGUI_CoreEngine.h:117
ComboBox m_trigger
Definition KwidgetGUI_CoreEngine.h:142
AttachedSlider m_Distance
Definition KwidgetGUI_CoreEngine.h:134
Component m_pitchEnvTab
Definition KwidgetGUI_CoreEngine.h:332
AttachedSlider m_SizeRand
Definition KwidgetGUI_CoreEngine.h:114
AttachedSlider m_StartRand
Definition KwidgetGUI_CoreEngine.h:113
AttachedSlider m_PanRand
Definition KwidgetGUI_CoreEngine.h:118
AttachedToggleButton m_AutoplayToggle
Definition KwidgetGUI_CoreEngine.h:153
Component m_extrasTab
Definition KwidgetGUI_CoreEngine.h:332
void tabSetupGranular()
Definition KwidgetGUI_CoreEngineGranular.cpp:59
AttachedToggleButton m_NormaliseToggle
Definition KwidgetGUI_CoreEngine.h:152
void resizeGranular()
Definition KwidgetGUI_CoreEngineGranular.cpp:36
AttachedSlider m_Width
Definition KwidgetGUI_CoreEngine.h:107
AttachedSlider m_GranularLevel
Definition KwidgetGUI_CoreEngine.h:111
Component m_mainTab
Definition KwidgetGUI_CoreEngine.h:332
Component m_ampEnvTab
Definition KwidgetGUI_CoreEngine.h:332
AttachedSlider m_Level
Definition KwidgetGUI_CoreEngine.h:109
AttachedSlider m_GrainMax
Definition KwidgetGUI_CoreEngine.h:133
Component m_randTab
Definition KwidgetGUI_CoreEngine.h:332
AttachedSlider m_LevelRand
Definition KwidgetGUI_CoreEngine.h:119
AttachedSlider m_Detune
Definition KwidgetGUI_CoreEngine.h:106
AttachedSlider m_Rate
Definition KwidgetGUI_CoreEngine.h:105
AttachedToggleButton m_NORToggle
Definition KwidgetGUI_CoreEngine.h:146
AttachedSlider m_Start
Definition KwidgetGUI_CoreEngine.h:103
struct krotos::KwidgetGUI_CoreEngine::Layout m_layout
void addAttachedComponent(AttachedComponentType &component, const String &paramID, bool isDraggable=true)
Definition KwidgetGUI.h:112
Definition AirAbsorptionFilter.cpp:2
static const String PitchRand
Definition Kwidget_CoreEngine.h:36
static const String ButtonLoopToggleGranularId
Definition KwidgetGUI_CoreEngine.h:86
static const String SliderPitchGranularId
Definition KwidgetGUI_CoreEngine.h:68
static const String SliderLevelGranularId
Definition KwidgetGUI_CoreEngine.h:62
const Rectangle< int > rotSliderBottomL
Definition KwidgetGUI_CoreEngine.h:264
const Rectangle< int > rotSliderTopM
Definition KwidgetGUI_CoreEngine.h:265
const Rectangle< int > rotSliderTopL
Definition KwidgetGUI_CoreEngine.h:263
const Rectangle< int > rotSliderBottomR
Definition KwidgetGUI_CoreEngine.h:268
const Rectangle< int > rotSliderTopR
Definition KwidgetGUI_CoreEngine.h:267
const Rectangle< int > rotSliderBottomM
Definition KwidgetGUI_CoreEngine.h:266
struct krotos::KwidgetGUI_CoreEngine::Layout::ControlsTabs controlsTabs