mirror of
https://codeberg.org/armin/chromaflock.git
synced 2026-09-01 04:10:47 +02:00
add arpeggiator, rename presets, move spectrum analyzer into waveform
This commit is contained in:
parent
a806e1a8b5
commit
3331b4cc16
9 changed files with 1126 additions and 395 deletions
|
|
@ -46,16 +46,7 @@ private:
|
|||
|
||||
class WaveformDisplay : public juce::Component, public juce::Timer {
|
||||
public:
|
||||
explicit WaveformDisplay(ChromaFlockProcessor& p) : processor(p) { startTimerHz(30); }
|
||||
void paint(juce::Graphics& g) override;
|
||||
void timerCallback() override { repaint(); }
|
||||
private:
|
||||
ChromaFlockProcessor& processor;
|
||||
};
|
||||
|
||||
class SpectrumAnalyzer : public juce::Component, public juce::Timer {
|
||||
public:
|
||||
explicit SpectrumAnalyzer(ChromaFlockProcessor& p) : processor(p) {
|
||||
explicit WaveformDisplay(ChromaFlockProcessor& p) : processor(p) {
|
||||
fft = std::make_unique<juce::dsp::FFT>(ChromaFlockProcessor::fftOrder);
|
||||
startTimerHz(30);
|
||||
}
|
||||
|
|
@ -64,6 +55,7 @@ public:
|
|||
private:
|
||||
ChromaFlockProcessor& processor;
|
||||
std::unique_ptr<juce::dsp::FFT> fft;
|
||||
std::vector<float> specSmooth;
|
||||
};
|
||||
|
||||
class PatchLCD : public juce::Component {
|
||||
|
|
@ -143,7 +135,6 @@ private:
|
|||
|
||||
VuMeter vuMeter;
|
||||
WaveformDisplay waveformDisplay;
|
||||
SpectrumAnalyzer spectrumAnalyzer;
|
||||
PianoRollComponent pianoRoll;
|
||||
|
||||
juce::Label osc1Label, osc2Label, filterLabel, envLabel, fEnvLabel, globalLabel;
|
||||
|
|
@ -185,6 +176,10 @@ private:
|
|||
juce::ComboBox delaySyncBox;
|
||||
KnobSlider reverbSizeKnob, reverbDampKnob, reverbMixKnob;
|
||||
|
||||
// Arpeggiator controls
|
||||
juce::Label arpEnabledLabel, arpPatternLabel, arpOctavesLabel, arpDirectionLabel, arpRateLabel;
|
||||
juce::ComboBox arpEnabledBox, arpPatternBox, arpOctavesBox, arpDirectionBox, arpRateBox;
|
||||
|
||||
// Preset menu
|
||||
juce::TextButton presetButton{"PRESET"};
|
||||
PatchLCD patchLCD;
|
||||
|
|
@ -227,6 +222,10 @@ private:
|
|||
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;
|
||||
|
||||
void setupLabel(juce::Label& label, const juce::String& text);
|
||||
void setupKnob(juce::Slider& knob, const juce::String& name);
|
||||
void setupCombo(juce::ComboBox& combo);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue