Prototype

This commit is contained in:
Armin 2026-08-05 23:12:17 +02:00
commit 4271fc34bb
14 changed files with 950 additions and 169 deletions

View file

@ -2,12 +2,12 @@
#include <JuceHeader.h>
class MonoStepAudioProcessor;
class MonostepAudioProcessor;
class SequencerMatrix final : public juce::Component
{
public:
explicit SequencerMatrix (MonoStepAudioProcessor& processor);
explicit SequencerMatrix (MonostepAudioProcessor& processor);
~SequencerMatrix() override = default;
std::function<void (int stepIdx)> onStepSelected;
@ -15,6 +15,7 @@ public:
std::function<void (int stepIdx, int semitone)> onNoteChanged;
std::function<void (int stepIdx, float cents)> onFineChanged;
std::function<void (int stepIdx, bool slide)> onSlideChanged;
std::function<void (int stepIdx, bool accent)> onAccentChanged;
void setSelectedStep (int stepIdx);
int getSelectedStep() const { return selectedStep; }
@ -39,14 +40,15 @@ private:
int rowForSemitone (int semitone) const;
int semitoneForRow (int row) const;
MonoStepAudioProcessor& processor;
MonostepAudioProcessor& processor;
float cellW = 24.0f;
float cellH = 17.0f;
float labelW = 40.0f;
float headerH = 24.0f;
float headerPad = 10.0f;
mutable float cellW = 24.0f;
mutable float cellH = 17.0f;
int selectedStep = 0;
int playPos = -1;
@ -64,4 +66,8 @@ private:
bool slideDragging = false;
bool startedSlideActive = false;
int slideLastStep = -1;
bool accentDragging = false;
bool startedAccentActive = false;
int accentLastStep = -1;
};