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

Piano: Allow per-track controls (again)

This makes Piano exactly as usable as when I started the large refactor
some years ago, which *sounds* like I'm a terrible person but now it (1)
looks nicer and (2) has a flexible backend that can already deal with
aribtrary kinds of processors on any track.
This commit is contained in:
kleines Filmröllchen 2023-02-27 15:31:43 +01:00 committed by Jelle Raaijmakers
parent d757027638
commit 0ab19dc4cd
9 changed files with 92 additions and 45 deletions

View file

@ -11,6 +11,7 @@
#include "Music.h"
#include <LibDSP/Keyboard.h>
#include <LibGUI/StackWidget.h>
#include <LibGUI/Widget.h>
class AudioPlayerLoop;
@ -32,6 +33,8 @@ public:
void change_octave_via_keys(DSP::Keyboard::Direction);
void set_octave_via_slider(int octave);
void update_selected_track();
ErrorOr<void> add_controls_for_current_track();
private:
explicit MainWidget(TrackManager&, AudioPlayerLoop&);
@ -57,7 +60,8 @@ private:
RefPtr<GUI::TabWidget> m_tab_widget;
RefPtr<GUI::Widget> m_keys_and_knobs_container;
RefPtr<KeysWidget> m_keys_widget;
RefPtr<TrackControlsWidget> m_knobs_widget;
RefPtr<GUI::StackWidget> m_knobs_widget;
Vector<NonnullRefPtr<TrackControlsWidget>> m_track_controls;
RefPtr<PlayerWidget> m_player_widget;
RefPtr<GUI::Widget> m_octave_container;