mirror of
https://codeberg.org/armin/monostep.git
synced 2026-09-01 04:10:46 +02:00
Prototype
This commit is contained in:
parent
c117906a7f
commit
4271fc34bb
14 changed files with 950 additions and 169 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#include <JuceHeader.h>
|
||||
#include "ui/SequencerMatrix.h"
|
||||
|
||||
class MonoStepAudioProcessor;
|
||||
class MonostepAudioProcessor;
|
||||
|
||||
class EditorLookAndFeel final : public juce::LookAndFeel_V4
|
||||
{
|
||||
|
|
@ -23,6 +23,17 @@ public:
|
|||
|
||||
void drawButtonText (juce::Graphics&, juce::TextButton&,
|
||||
bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override;
|
||||
|
||||
void drawComboBox (juce::Graphics&, int width, int height, bool isMouseButtonDown,
|
||||
int buttonX, int buttonY, int buttonW, int buttonH, juce::ComboBox&) override;
|
||||
juce::Font getComboBoxFont (juce::ComboBox&) override;
|
||||
|
||||
void drawPopupMenuBackground (juce::Graphics&, int width, int height) override;
|
||||
void drawPopupMenuItem (juce::Graphics&, const juce::Rectangle<int>& area,
|
||||
bool isSeparator, bool isActive, bool isHighlighted, bool isTicked, bool hasSubMenu,
|
||||
const juce::String& text, const juce::String& shortcutKeyText,
|
||||
const juce::Drawable* icon, const juce::Colour* textColour) override;
|
||||
juce::Font getPopupMenuFont() override;
|
||||
};
|
||||
|
||||
class Knob final : public juce::Component
|
||||
|
|
@ -93,7 +104,7 @@ private:
|
|||
class StepPanel final : public juce::Component
|
||||
{
|
||||
public:
|
||||
explicit StepPanel (MonoStepAudioProcessor& processor);
|
||||
explicit StepPanel (MonostepAudioProcessor& processor);
|
||||
|
||||
void setSelectedStep (int stepIdx);
|
||||
void refresh();
|
||||
|
|
@ -105,7 +116,7 @@ public:
|
|||
private:
|
||||
void clearPattern();
|
||||
|
||||
MonoStepAudioProcessor& processor;
|
||||
MonostepAudioProcessor& processor;
|
||||
|
||||
int selectedStep = 0;
|
||||
bool updating = false;
|
||||
|
|
@ -118,14 +129,34 @@ private:
|
|||
juce::TextButton nextButton;
|
||||
juce::Label hintLabel;
|
||||
juce::TextButton clearButton;
|
||||
juce::TextButton shiftLeftButton;
|
||||
juce::TextButton shiftRightButton;
|
||||
|
||||
juce::Label toolsCaption;
|
||||
juce::ComboBox presetCombo;
|
||||
juce::TextButton randomizeButton;
|
||||
juce::Label randomizeCaption;
|
||||
|
||||
enum RandomGroup
|
||||
{
|
||||
RandomPattern,
|
||||
RandomOsc,
|
||||
RandomFilter,
|
||||
RandomEnv,
|
||||
RandomSeq,
|
||||
RandomFx,
|
||||
RandomGroupCount
|
||||
};
|
||||
|
||||
juce::ToggleButton randomizeToggles[RandomGroupCount];
|
||||
};
|
||||
|
||||
class MonoStepAudioProcessorEditor final : public juce::AudioProcessorEditor,
|
||||
class MonostepAudioProcessorEditor final : public juce::AudioProcessorEditor,
|
||||
public juce::Timer
|
||||
{
|
||||
public:
|
||||
explicit MonoStepAudioProcessorEditor (MonoStepAudioProcessor& processor);
|
||||
~MonoStepAudioProcessorEditor() override;
|
||||
explicit MonostepAudioProcessorEditor (MonostepAudioProcessor& processor);
|
||||
~MonostepAudioProcessorEditor() override;
|
||||
|
||||
void paint (juce::Graphics&) override;
|
||||
void resized() override;
|
||||
|
|
@ -138,15 +169,15 @@ private:
|
|||
class ContentComponent final : public juce::Component
|
||||
{
|
||||
public:
|
||||
explicit ContentComponent (MonoStepAudioProcessorEditor& owner) : ownerRef (owner) {}
|
||||
explicit ContentComponent (MonostepAudioProcessorEditor& owner) : ownerRef (owner) {}
|
||||
|
||||
void paint (juce::Graphics& g) override { ownerRef.paintContent (g); }
|
||||
|
||||
private:
|
||||
MonoStepAudioProcessorEditor& ownerRef;
|
||||
MonostepAudioProcessorEditor& ownerRef;
|
||||
};
|
||||
|
||||
MonoStepAudioProcessor& processorRef;
|
||||
MonostepAudioProcessor& processorRef;
|
||||
|
||||
ContentComponent content;
|
||||
|
||||
|
|
@ -165,8 +196,12 @@ private:
|
|||
Knob rootKnob;
|
||||
Knob gateKnob;
|
||||
Knob masterKnob;
|
||||
Knob coarseKnob;
|
||||
Knob coarseKnob2;
|
||||
Knob detuneKnob;
|
||||
Knob mixKnob;
|
||||
Knob fineKnob1;
|
||||
Knob fineKnob2;
|
||||
Knob cutoffKnob;
|
||||
Knob resKnob;
|
||||
Knob glideKnob;
|
||||
|
|
@ -174,6 +209,9 @@ private:
|
|||
Knob decayKnob;
|
||||
Knob sustainKnob;
|
||||
Knob releaseKnob;
|
||||
Knob driveKnob;
|
||||
Knob ringKnob;
|
||||
Knob accentKnob;
|
||||
|
||||
ChoiceBar rateBar;
|
||||
ChoiceBar octaveBar;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue