Reduce plugin width by 102px and fix bottom panel layout to scale proportionally

This commit is contained in:
Armin 2026-07-22 23:10:55 +02:00
commit f035e89ba9
9 changed files with 305 additions and 106 deletions

View file

@ -43,6 +43,11 @@ public:
void psolaStretch(int targetLength);
float getHostBpm() const;
void undo();
void redo();
bool canUndo() const;
bool canRedo() const;
juce::AudioProcessorValueTreeState& getAPVTS() { return apvts; }
SliceManager& getSliceManager() { return sliceManager; }
@ -56,6 +61,8 @@ public:
std::atomic<int> currentPlaybackSample { -1 };
std::atomic<int> currentActiveSlice { -1 };
std::atomic<int> selectedSlice { -1 };
std::atomic<float> outputLevelL { 0.0f };
std::atomic<float> outputLevelR { 0.0f };
private:
juce::AudioProcessorValueTreeState apvts;
@ -73,6 +80,17 @@ private:
int currentFileIndex = -1;
void refreshFolderList();
struct UndoState
{
juce::File file;
std::vector<SliceManager::Slice> slices;
};
std::vector<UndoState> undoStack;
std::vector<UndoState> redoStack;
static constexpr int maxUndoDepth = 10;
void pushUndoState();
bool restoringFromUndo = false;
enum class AmpStage { Idle, Attack, Decay, Sustain, Release };
enum class FilterType { LP12, LP24, HP, BP, Notch };