mirror of
https://codeberg.org/armin/monostep.git
synced 2026-09-01 12:20:46 +02:00
Prototype
This commit is contained in:
parent
c117906a7f
commit
4271fc34bb
14 changed files with 950 additions and 169 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue