From 524eb4491f4a31efea81ede387e1e1c5a0d51830 Mon Sep 17 00:00:00 2001 From: Antoine C Date: Tue, 26 Mar 2024 15:25:27 +0000 Subject: [PATCH 1/2] feat: add a waveform overlay visual for slip position --- CMakeLists.txt | 2 + res/skins/Deere/deck_waveform.xml | 3 + res/skins/LateNight/decks/overview.xml | 1 + res/skins/LateNight/skin.xml | 2 + res/skins/LateNight/waveform.xml | 3 + res/skins/Tango/decks/overview.xml | 3 + res/skins/Tango/waveform.xml | 3 + src/shaders/slipmodeshader.cpp | 60 ++++++++++ src/shaders/slipmodeshader.h | 35 ++++++ .../allshader/waveformrenderbeat.cpp | 23 ++-- .../renderers/allshader/waveformrenderbeat.h | 6 +- .../allshader/waveformrendererpreroll.cpp | 32 ++++-- .../allshader/waveformrendererpreroll.h | 10 +- .../allshader/waveformrendererrgb.cpp | 20 ++-- .../renderers/allshader/waveformrendererrgb.h | 6 +- .../allshader/waveformrendererslipmode.cpp | 107 ++++++++++++++++++ .../allshader/waveformrendererslipmode.h | 42 +++++++ .../allshader/waveformrendermark.cpp | 29 ++++- .../renderers/allshader/waveformrendermark.h | 6 +- .../renderers/waveformrendererabstract.h | 7 ++ .../renderers/waveformwidgetrenderer.cpp | 62 ++++++---- .../renderers/waveformwidgetrenderer.h | 50 ++++---- .../widgets/allshader/rgbwaveformwidget.cpp | 7 ++ 23 files changed, 446 insertions(+), 73 deletions(-) create mode 100644 src/shaders/slipmodeshader.cpp create mode 100644 src/shaders/slipmodeshader.h create mode 100644 src/waveform/renderers/allshader/waveformrendererslipmode.cpp create mode 100644 src/waveform/renderers/allshader/waveformrendererslipmode.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c67775d256..6f1f14cb286 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1497,6 +1497,7 @@ endif() if(QOPENGL) target_sources(mixxx-lib PRIVATE src/shaders/endoftrackshader.cpp + src/shaders/slipmodeshader.cpp src/shaders/patternshader.cpp src/shaders/rgbashader.cpp src/shaders/rgbshader.cpp @@ -1510,6 +1511,7 @@ if(QOPENGL) src/waveform/renderers/allshader/waveformrenderbeat.cpp src/waveform/renderers/allshader/waveformrenderer.cpp src/waveform/renderers/allshader/waveformrendererendoftrack.cpp + src/waveform/renderers/allshader/waveformrendererslipmode.cpp src/waveform/renderers/allshader/waveformrendererfiltered.cpp src/waveform/renderers/allshader/waveformrendererhsv.cpp src/waveform/renderers/allshader/waveformrendererlrrgb.cpp diff --git a/res/skins/Deere/deck_waveform.xml b/res/skins/Deere/deck_waveform.xml index 344879676d4..e7cf2dd245d 100644 --- a/res/skins/Deere/deck_waveform.xml +++ b/res/skins/Deere/deck_waveform.xml @@ -30,6 +30,9 @@ #ffffff #00FF00 #EA0000 + #f08c00 + 10 + 10 diff --git a/res/skins/LateNight/decks/overview.xml b/res/skins/LateNight/decks/overview.xml index 986889398a9..eb9f25e50ac 100644 --- a/res/skins/LateNight/decks/overview.xml +++ b/res/skins/LateNight/decks/overview.xml @@ -18,6 +18,7 @@ + diff --git a/res/skins/LateNight/skin.xml b/res/skins/LateNight/skin.xml index 0a7cbe7785c..9b4334dcc9d 100644 --- a/res/skins/LateNight/skin.xml +++ b/res/skins/LateNight/skin.xml @@ -172,6 +172,7 @@ #2c5c9a #dd151515 #f856e7 + #f08c00 #b24c12 13 11 @@ -277,6 +278,7 @@ #0000ff #bb000000 #f856e7 + #1af000 #d09300 13 11 diff --git a/res/skins/LateNight/waveform.xml b/res/skins/LateNight/waveform.xml index db51b0b65a8..10693ded09e 100644 --- a/res/skins/LateNight/waveform.xml +++ b/res/skins/LateNight/waveform.xml @@ -30,6 +30,9 @@ + + 10 + 20