From 9874d5983b296a8ab949cf5136eec4d0e5cf7ac0 Mon Sep 17 00:00:00 2001 From: Blitblank Date: Thu, 25 Dec 2025 23:00:13 -0600 Subject: [PATCH] small ui update --- src/synth/Synth.cpp | 2 ++ src/ui/MainWindow.ui | 26 +++++++-------- src/ui/widgets/SmartSlider.ui | 60 +++++++++++++++++++++++++++++------ 3 files changed, 66 insertions(+), 22 deletions(-) diff --git a/src/synth/Synth.cpp b/src/synth/Synth.cpp index 052046b..b59bb2c 100644 --- a/src/synth/Synth.cpp +++ b/src/synth/Synth.cpp @@ -74,6 +74,8 @@ void Synth::process(float* out, uint32_t nFrames, uint32_t sampleRate) { // process all envelopes gainEnvelope_.set(getParam(ParamId::Osc1VolumeEnvA), getParam(ParamId::Osc1VolumeEnvD), getParam(ParamId::Osc1VolumeEnvS), getParam(ParamId::Osc1VolumeEnvR)); float gain = gainEnvelope_.process(); + // TODO: envelope is shared between all notes so this sequence involves a note change but only one envelope attack: + // NOTE_A_ON > NOTE_B_ON > NOTE_A_OFF and note B starts playing part-way through note A's envelope // skip if no active notes if(!gainEnvelope_.isActive()) { diff --git a/src/ui/MainWindow.ui b/src/ui/MainWindow.ui index 7da2b67..75e7a27 100644 --- a/src/ui/MainWindow.ui +++ b/src/ui/MainWindow.ui @@ -6,7 +6,7 @@ 0 0 - 800 + 739 605 @@ -38,10 +38,10 @@ - 580 + 480 180 - 171 - 321 + 120 + 300 @@ -51,10 +51,10 @@ - 40 + 120 180 - 171 - 321 + 120 + 300 @@ -64,10 +64,10 @@ - 220 + 240 180 - 171 - 321 + 120 + 300 @@ -77,10 +77,10 @@ - 400 + 360 180 - 171 - 321 + 120 + 300 diff --git a/src/ui/widgets/SmartSlider.ui b/src/ui/widgets/SmartSlider.ui index 4ff7028..32eb06b 100644 --- a/src/ui/widgets/SmartSlider.ui +++ b/src/ui/widgets/SmartSlider.ui @@ -6,22 +6,34 @@ 0 0 - 168 - 298 + 120 + 300 + + + 0 + 0 + + Form - 70 + 50 90 16 160 + + + 0 + 0 + + Qt::Orientation::Vertical @@ -32,32 +44,50 @@ - 40 + 20 260 82 24 + + + 0 + 0 + + - 40 + 20 60 82 24 + + + 0 + 0 + + - 40 - 10 + 20 + 20 82 31 + + + 0 + 0 + + 12 @@ -67,12 +97,18 @@ - 20 + 0 10 20 271 + + + 0 + 0 + + Qt::Orientation::Vertical @@ -80,12 +116,18 @@ - 120 + 100 10 20 271 + + + 0 + 0 + + Qt::Orientation::Vertical