perf(gui): skip unchanged repaints and gate updates by tab

Add change detection to Display, WaveformDisplay, FilterDisplay,
EnvelopeDisplay, and LFODisplay so repaint() is only called when
values actually change. Gate updateVisuals() by currentTab so only
the visible tab's displays are updated each timer tick. Similarly
gate updateModList/updateMacroList to their respective tabs.

Manage dynamically created controls via ownedControls
unique_ptr vector instead of raw new leaks. Null-check parameter
lookups before creating attachments. Hold engine control lock
when reading matrix/macros/LFO shape data.

Fix envelope display curve directions (attack rising from bottom,
decay falling toward sustain, release falling toward bottom).
Add tooltip to FilterDisplay noting the approximation. Replace
ToggleButton raw param pointer with ParameterAttachment for proper
gesture handling. Sync preset and scale combos to processor state.
This commit is contained in:
2026-09-09 14:33:41 +02:00
parent 3be1e42242
commit 8364737d1c
11 changed files with 215 additions and 115 deletions
+5 -3
View File
@@ -8,13 +8,15 @@ namespace serum
{
// ===========================================================================
// Filter frequency-response view (magnitude vs log frequency).
// Approximate filter frequency-response view (magnitude vs log frequency).
// ===========================================================================
class FilterDisplay : public juce::Component
class FilterDisplay : public juce::Component,
public juce::SettableTooltipClient
{
public:
FilterDisplay() { setTooltip ("Approximate response preview; slope, drive and modulation are not modelled."); }
void setParams (int type, float cutoff, float res, float drive, int slope);
void setEnabled (bool e) { enabled = e; }
void setEnabled (bool e) { if (enabled != e) { enabled = e; repaint(); } }
void paint (juce::Graphics& g) override;