mirror of
https://codeberg.org/armin/rmx-19.git
synced 2026-10-11 16:51:55 +02:00
- Add host-tempo-synced delay: FX screen gains a 4th SYNC row for rhythmic divisions (1/16 .. 1/1) that lock delay time to DAW tempo - Embed rack faceplate background (b2.png) via juce binary data - Add offline dev probe (rmx_probe) for GUI-less MIDI testing - Allow overriding JUCE_ROOT when configuring the build - Write comprehensive README describing the instrument, UI, MIDI, DSP, and build/install steps
60 lines
No EOL
1.7 KiB
C++
60 lines
No EOL
1.7 KiB
C++
#pragma once
|
|
#include <juce_gui_basics/juce_gui_basics.h>
|
|
#include "LcdPanel.h"
|
|
#include "PluginProcessor.h"
|
|
#include "BinaryData.h"
|
|
|
|
class RackEditor : public juce::AudioProcessorEditor, private juce::Timer
|
|
{
|
|
public:
|
|
explicit RackEditor (RMX19AudioProcessor&);
|
|
~RackEditor() override;
|
|
|
|
void paint (juce::Graphics&) override;
|
|
void resized() override;
|
|
|
|
bool keyPressed (const juce::KeyPress&) override;
|
|
|
|
private:
|
|
RMX19AudioProcessor& proc;
|
|
|
|
class NavButton : public juce::Button
|
|
{
|
|
public:
|
|
NavButton (int d, const juce::String& glyph, const juce::String& label)
|
|
: juce::Button (label), dir (d), mark (glyph)
|
|
{ setWantsKeyboardFocus (true); setRepeatSpeed (320, 80); }
|
|
void paintButton (juce::Graphics&, bool, bool) override;
|
|
int dir;
|
|
juce::String mark;
|
|
};
|
|
|
|
class OkButton : public juce::Button
|
|
{
|
|
public:
|
|
OkButton (const juce::String& label, bool isEnter)
|
|
: juce::Button (label), enter (isEnter)
|
|
{ setWantsKeyboardFocus (true); setRepeatSpeed (320, 80); }
|
|
void paintButton (juce::Graphics&, bool, bool) override;
|
|
bool enter;
|
|
};
|
|
|
|
NavButton* up = nullptr; NavButton* down = nullptr;
|
|
NavButton* left = nullptr; NavButton* right = nullptr;
|
|
OkButton* enterB = nullptr; OkButton* backB = nullptr;
|
|
|
|
juce::ComboBox scaleBox;
|
|
LcdPanel display;
|
|
|
|
juce::Colour face;
|
|
juce::Image backgroundImage;
|
|
float powerPulse = 0.0f;
|
|
float uiScale = 1.5f;
|
|
|
|
static constexpr int baseW = 656, baseH = 248;
|
|
|
|
void setScale (float s);
|
|
void timerCallback() override;
|
|
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (RackEditor)
|
|
}; |