mirror of
https://codeberg.org/armin/chromaflock.git
synced 2026-09-01 04:10:47 +02:00
Fix menu scaling issues, fix preset menu layout, add LED display (to
show patch), add prev/next patch buttons
This commit is contained in:
parent
827eca7e61
commit
79be724e5d
5 changed files with 281 additions and 175 deletions
|
|
@ -55,6 +55,14 @@ private:
|
|||
std::unique_ptr<juce::dsp::FFT> fft;
|
||||
};
|
||||
|
||||
class PatchLCD : public juce::Component {
|
||||
public:
|
||||
void setText(const juce::String& t) { text = t; repaint(); }
|
||||
void paint(juce::Graphics& g) override;
|
||||
private:
|
||||
juce::String text = "INIT";
|
||||
};
|
||||
|
||||
class PianoRollComponent : public juce::Component, public juce::Timer {
|
||||
public:
|
||||
explicit PianoRollComponent(ChromaFlockProcessor& p) : processor(p) { startTimerHz(30); }
|
||||
|
|
@ -139,12 +147,13 @@ private:
|
|||
|
||||
// FX2 controls
|
||||
juce::Slider delayTimeKnob, delayFbKnob, delayMixKnob;
|
||||
juce::ComboBox delayPingPongBox;
|
||||
juce::Slider delaySpreadKnob;
|
||||
juce::Slider reverbSizeKnob, reverbDampKnob, reverbMixKnob;
|
||||
|
||||
// Preset menu
|
||||
juce::TextButton presetButton{"PRESET"};
|
||||
PatchLCD patchLCD;
|
||||
juce::TextButton prevPresetButton{"<"}, nextPresetButton{">"};
|
||||
int currentPresetIndex = 0;
|
||||
|
||||
juce::ComboBox uiScaleBox;
|
||||
|
||||
|
|
@ -174,14 +183,13 @@ private:
|
|||
|
||||
// FX2 attachments
|
||||
std::unique_ptr<SliderAttachment> delayTimeAttach, delayFbAttach, delayMixAttach;
|
||||
std::unique_ptr<ComboBoxAttachment> delayPingPongAttach;
|
||||
std::unique_ptr<SliderAttachment> delaySpreadAttach;
|
||||
std::unique_ptr<SliderAttachment> reverbSizeAttach, reverbDampAttach, reverbMixAttach;
|
||||
|
||||
void setupLabel(juce::Label& label, const juce::String& text);
|
||||
void setupKnob(juce::Slider& knob, const juce::String& name);
|
||||
void setupCombo(juce::ComboBox& combo);
|
||||
void showPresetMenu();
|
||||
void applyCurrentPreset();
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(MainContentComponent)
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue