diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index b26109f..1c69a2f 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -922,9 +922,9 @@ void MainContentComponent::paint(juce::Graphics& g) { drawSection(10, 128, 498, 200); drawSection(518, 128, 624, 200); drawSection(1152, 128, 498, 200); - drawSection(75, 338, 498, 160); + drawSection(10, 338, 563, 160); drawSection(583, 338, 502, 160); - drawSection(1095, 338, 490, 160); + drawSection(1095, 338, 555, 160); drawSection(10, 956, 1640, 136); // FX sub-sections diff --git a/Source/PluginEditor.h b/Source/PluginEditor.h index 19b1452..38d117a 100644 --- a/Source/PluginEditor.h +++ b/Source/PluginEditor.h @@ -57,8 +57,12 @@ private: class PatchLCD : public juce::Component { public: + std::function onClick; void setText(const juce::String& t) { text = t; repaint(); } + const juce::String& getText() const { return text; } void paint(juce::Graphics& g) override; + void mouseEnter(const juce::MouseEvent&) override { setMouseCursor(juce::MouseCursor::PointingHandCursor); } + void mouseDown(const juce::MouseEvent&) override { if (onClick) onClick(); } private: juce::String text = "INIT"; }; @@ -92,6 +96,7 @@ private: int lastTriggeredNote = -1; int currentPitchBend = 64; // 0..127, 64 = center bool pitchBendDragging = false; + int pitchBendStartY = 0; bool pitchBendGliding = false; float pitchBendGlideStart = 0.0f; diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index f4dc10a..4f8c817 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -53,7 +53,9 @@ juce::AudioProcessorValueTreeState::ParameterLayout ChromaFlockProcessor::create // OSC 1 layout.add(std::make_unique( juce::ParameterID{"osc1Wave", 1}, "OSC1 Wave", - juce::StringArray{"Sine", "Saw", "Square", "Triangle", "Noise"}, 1)); + juce::StringArray{"Sine", "Saw", "Square", "Triangle", "Noise", + "Pulse 25%", "Pulse 12%", "Rev Saw", "Full Rect", "Half Rect", + "Stair 4", "Stair 8", "Soft Sine", "Sinc", "Exp Pulse", "Double Sine"}, 1)); layout.add(std::make_unique( juce::ParameterID{"osc1Oct", 1}, "OSC1 Octave", juce::NormalisableRange(-3.0f, 3.0f, 1.0f), 0.0f)); @@ -69,7 +71,9 @@ juce::AudioProcessorValueTreeState::ParameterLayout ChromaFlockProcessor::create // OSC 2 layout.add(std::make_unique( juce::ParameterID{"osc2Wave", 1}, "OSC2 Wave", - juce::StringArray{"Sine", "Saw", "Square", "Triangle", "Noise"}, 3)); + juce::StringArray{"Sine", "Saw", "Square", "Triangle", "Noise", + "Pulse 25%", "Pulse 12%", "Rev Saw", "Full Rect", "Half Rect", + "Stair 4", "Stair 8", "Soft Sine", "Sinc", "Exp Pulse", "Double Sine"}, 3)); layout.add(std::make_unique( juce::ParameterID{"osc2Oct", 1}, "OSC2 Octave", juce::NormalisableRange(-3.0f, 3.0f, 1.0f), -1.0f)); @@ -206,7 +210,7 @@ juce::AudioProcessorValueTreeState::ParameterLayout ChromaFlockProcessor::create juce::StringArray{"Sine", "Triangle", "Saw", "Square"}, 0)); layout.add(std::make_unique( juce::ParameterID{"lfo1Dest", 1}, "LFO1 Dest", - juce::StringArray{"Filter", "OSC1", "OSC2", "Both OSC"}, 0)); + juce::StringArray{"Filter", "OSC1", "OSC2", "Both OSC", "OSC2 Phase"}, 0)); layout.add(std::make_unique( juce::ParameterID{"lfo1Sync", 1}, "LFO1 Sync", juce::StringArray{"Sync Off", "Sync On"}, 0)); @@ -227,7 +231,7 @@ juce::AudioProcessorValueTreeState::ParameterLayout ChromaFlockProcessor::create juce::StringArray{"Sine", "Triangle", "Saw", "Square"}, 0)); layout.add(std::make_unique( juce::ParameterID{"lfo2Dest", 1}, "LFO2 Dest", - juce::StringArray{"Filter", "OSC1", "OSC2", "Both OSC"}, 0)); + juce::StringArray{"Filter", "OSC1", "OSC2", "Both OSC", "OSC2 Phase"}, 0)); layout.add(std::make_unique( juce::ParameterID{"lfo2Sync", 1}, "LFO2 Sync", juce::StringArray{"Sync Off", "Sync On"}, 0)); diff --git a/Source/PluginProcessor.h b/Source/PluginProcessor.h index d38802e..28b4bf4 100644 --- a/Source/PluginProcessor.h +++ b/Source/PluginProcessor.h @@ -5,6 +5,7 @@ #include "DSP/Voice.h" #include "DSP/Distortion.h" #include "DSP/Compressor.h" +#include "DSP/Limiter.h" #include "DSP/Delay.h" #include "DSP/Reverb.h" #include "PresetManager.h" @@ -88,9 +89,11 @@ private: Distortion distortion; Compressor compressor; + Limiter limiter; Delay delay; ReverbFX reverbFX; float autoPanPhase = 0.0f; + float autoPanPhaseOffset = 0.0f; double currentSampleRate = 44100.0; double currentBpm = 120.0;