mirror of
https://codeberg.org/armin/chromaflock.git
synced 2026-09-01 04:10:47 +02:00
rework arpeggiator with blank notes and progressions
This commit is contained in:
parent
f79842893a
commit
d034139b5e
5 changed files with 219 additions and 104 deletions
|
|
@ -79,6 +79,23 @@ private:
|
|||
ChromaFlockProcessor& processor;
|
||||
};
|
||||
|
||||
class LedToggle : public juce::Component, public juce::Timer {
|
||||
public:
|
||||
LedToggle(juce::AudioProcessorValueTreeState& apvts, const juce::String& paramId,
|
||||
const juce::String& onText, const juce::String& offText);
|
||||
void paint(juce::Graphics& g) override;
|
||||
void mouseDown(const juce::MouseEvent&) override;
|
||||
void mouseEnter(const juce::MouseEvent&) override;
|
||||
void timerCallback() override;
|
||||
bool isLit() const { return lit; }
|
||||
std::function<void()> onChange;
|
||||
private:
|
||||
juce::AudioProcessorValueTreeState& apvts;
|
||||
juce::String paramId;
|
||||
juce::String onText, offText;
|
||||
bool lit = false;
|
||||
};
|
||||
|
||||
class PianoRollComponent : public juce::Component, public juce::Timer {
|
||||
public:
|
||||
explicit PianoRollComponent(ChromaFlockProcessor& p) : processor(p) { startTimerHz(60); }
|
||||
|
|
@ -167,18 +184,19 @@ private:
|
|||
|
||||
// LFO controls
|
||||
KnobSlider lfo1RateKnob, lfo1DepthKnob;
|
||||
juce::ComboBox lfo1ShapeBox, lfo1DestBox, lfo1SyncBox;
|
||||
juce::ComboBox lfo1ShapeBox, lfo1DestBox;
|
||||
KnobSlider lfo2RateKnob, lfo2DepthKnob;
|
||||
juce::ComboBox lfo2ShapeBox, lfo2DestBox, lfo2SyncBox;
|
||||
juce::ComboBox lfo2ShapeBox, lfo2DestBox;
|
||||
LedToggle lfo1SyncLed, lfo2SyncLed, delaySyncLed;
|
||||
|
||||
// FX2 controls
|
||||
KnobSlider delayTimeKnob, delayFbKnob, delayMixKnob, delayPingPongKnob;
|
||||
juce::ComboBox delaySyncBox;
|
||||
KnobSlider delayTimeKnob, delayFbKnob, delayMixKnob;
|
||||
KnobSlider reverbSizeKnob, reverbDampKnob, reverbMixKnob;
|
||||
|
||||
// Arpeggiator controls
|
||||
juce::Label arpEnabledLabel, arpPatternLabel, arpOctavesLabel, arpDirectionLabel, arpRateLabel;
|
||||
juce::ComboBox arpEnabledBox, arpPatternBox, arpOctavesBox, arpDirectionBox, arpRateBox;
|
||||
juce::ComboBox arpPatternBox, arpOctavesBox, arpRateBox;
|
||||
LedToggle arpEnabledLed, arpDirectionLed, delayPingPongLed;
|
||||
|
||||
// Preset menu
|
||||
juce::TextButton presetButton{"PRESET"};
|
||||
|
|
@ -212,19 +230,16 @@ private:
|
|||
|
||||
// LFO attachments
|
||||
std::unique_ptr<SliderAttachment> lfo1RateAttach, lfo1DepthAttach, lfo1BeatAttach;
|
||||
std::unique_ptr<ComboBoxAttachment> lfo1ShapeAttach, lfo1DestAttach, lfo1SyncAttach;
|
||||
std::unique_ptr<ComboBoxAttachment> lfo1ShapeAttach, lfo1DestAttach;
|
||||
std::unique_ptr<SliderAttachment> lfo2RateAttach, lfo2DepthAttach, lfo2BeatAttach;
|
||||
std::unique_ptr<ComboBoxAttachment> lfo2ShapeAttach, lfo2DestAttach, lfo2SyncAttach;
|
||||
std::unique_ptr<ComboBoxAttachment> lfo2ShapeAttach, lfo2DestAttach;
|
||||
|
||||
// FX2 attachments
|
||||
std::unique_ptr<SliderAttachment> delayTimeAttach, delayFbAttach, delayMixAttach, delayBeatAttach;
|
||||
std::unique_ptr<ComboBoxAttachment> delaySyncAttach;
|
||||
std::unique_ptr<SliderAttachment> delayPingPongAttach;
|
||||
std::unique_ptr<SliderAttachment> reverbSizeAttach, reverbDampAttach, reverbMixAttach;
|
||||
|
||||
// Arpeggiator attachments
|
||||
std::unique_ptr<ComboBoxAttachment> arpEnabledAttach, arpPatternAttach, arpOctavesAttach;
|
||||
std::unique_ptr<ComboBoxAttachment> arpDirectionAttach, arpRateAttach;
|
||||
std::unique_ptr<ComboBoxAttachment> arpPatternAttach, arpOctavesAttach, arpRateAttach;
|
||||
|
||||
void setupLabel(juce::Label& label, const juce::String& text);
|
||||
void setupKnob(juce::Slider& knob, const juce::String& name);
|
||||
|
|
@ -234,7 +249,7 @@ private:
|
|||
std::unique_ptr<SliderAttachment>& beatAttach,
|
||||
const juce::String& rateId,
|
||||
const juce::String& beatId,
|
||||
juce::ComboBox& syncBox);
|
||||
bool syncOn);
|
||||
void showPresetMenu();
|
||||
void showFileMenu();
|
||||
void loadPresetFile();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue