1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:27:46 +00:00

Piano: Use LibDSP to implement delay

This is the first step in transitioning Piano to a full LibDSP backend.
For now, the delay effect is replaced with a (mostly identical)
implementation in LibDSP.

The new ProcessorParameterSlider attaches to a LibDSP::Processor's
range parameter (LibDSP::ProcessorRangeParameter) and changes it
automatically. It also has the ability to update an external GUI::Label.
This is used for the three delay parameters and it will become useful
for auto-generating UI for Processors.
This commit is contained in:
kleines Filmröllchen 2021-08-27 16:20:09 +02:00 committed by Ali Mohammad Pur
parent a749b16674
commit 0dc6fe9102
8 changed files with 84 additions and 49 deletions

View file

@ -7,6 +7,8 @@
#pragma once
#include "ProcessorParameterSlider.h"
#include <AK/NonnullRefPtrVector.h>
#include <LibGUI/Frame.h>
class TrackManager;
@ -33,7 +35,7 @@ private:
RefPtr<GUI::Label> m_decay_label;
RefPtr<GUI::Label> m_sustain_label;
RefPtr<GUI::Label> m_release_label;
RefPtr<GUI::Label> m_delay_label;
NonnullRefPtrVector<GUI::Label> m_delay_labels;
RefPtr<GUI::Widget> m_values_container;
RefPtr<GUI::Label> m_volume_value;
@ -43,7 +45,7 @@ private:
RefPtr<GUI::Label> m_decay_value;
RefPtr<GUI::Label> m_sustain_value;
RefPtr<GUI::Label> m_release_value;
RefPtr<GUI::Label> m_delay_value;
NonnullRefPtrVector<GUI::Label> m_delay_values;
RefPtr<GUI::Widget> m_knobs_container;
RefPtr<GUI::Slider> m_volume_knob;
@ -53,7 +55,7 @@ private:
RefPtr<GUI::Slider> m_decay_knob;
RefPtr<GUI::Slider> m_sustain_knob;
RefPtr<GUI::Slider> m_release_knob;
RefPtr<GUI::Slider> m_delay_knob;
NonnullRefPtrVector<ProcessorParameterSlider> m_delay_knobs;
bool m_change_underlying { true };
};