mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:17:35 +00:00
LibDSP: Rename library namespace to DSP
That's the standard naming convention, but I didn't follow it when originally creating LibDSP and nobody corrected me, so here I am one year later :^)
This commit is contained in:
parent
3f59356c79
commit
00e13b5b27
36 changed files with 92 additions and 92 deletions
|
@ -7,13 +7,13 @@
|
|||
*/
|
||||
|
||||
#include "KeysWidget.h"
|
||||
#include "LibDSP/Keyboard.h"
|
||||
#include "TrackManager.h"
|
||||
#include <AK/Array.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <LibDSP/Keyboard.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
|
||||
KeysWidget::KeysWidget(NonnullRefPtr<LibDSP::Keyboard> keyboard)
|
||||
KeysWidget::KeysWidget(NonnullRefPtr<DSP::Keyboard> keyboard)
|
||||
: m_keyboard(move(keyboard))
|
||||
{
|
||||
set_fill_with_background_color(true);
|
||||
|
@ -27,7 +27,7 @@ int KeysWidget::mouse_note() const
|
|||
return -1;
|
||||
}
|
||||
|
||||
void KeysWidget::set_key(i8 key, LibDSP::Keyboard::Switch switch_note)
|
||||
void KeysWidget::set_key(i8 key, DSP::Keyboard::Switch switch_note)
|
||||
{
|
||||
m_keyboard->set_keyboard_note_in_active_octave(key, switch_note);
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ void KeysWidget::mousedown_event(GUI::MouseEvent& event)
|
|||
|
||||
m_mouse_note = note_for_event_position(event.position());
|
||||
|
||||
set_key(m_mouse_note, LibDSP::Keyboard::Switch::On);
|
||||
set_key(m_mouse_note, DSP::Keyboard::Switch::On);
|
||||
update();
|
||||
}
|
||||
|
||||
|
@ -264,7 +264,7 @@ void KeysWidget::mouseup_event(GUI::MouseEvent& event)
|
|||
|
||||
m_mouse_down = false;
|
||||
|
||||
set_key(m_mouse_note, LibDSP::Keyboard::Switch::Off);
|
||||
set_key(m_mouse_note, DSP::Keyboard::Switch::Off);
|
||||
update();
|
||||
}
|
||||
|
||||
|
@ -278,8 +278,8 @@ void KeysWidget::mousemove_event(GUI::MouseEvent& event)
|
|||
if (m_mouse_note == new_mouse_note)
|
||||
return;
|
||||
|
||||
set_key(m_mouse_note, LibDSP::Keyboard::Switch::Off);
|
||||
set_key(new_mouse_note, LibDSP::Keyboard::Switch::On);
|
||||
set_key(m_mouse_note, DSP::Keyboard::Switch::Off);
|
||||
set_key(new_mouse_note, DSP::Keyboard::Switch::On);
|
||||
update();
|
||||
|
||||
m_mouse_note = new_mouse_note;
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
int mouse_note() const;
|
||||
|
||||
private:
|
||||
KeysWidget(NonnullRefPtr<LibDSP::Keyboard>);
|
||||
KeysWidget(NonnullRefPtr<DSP::Keyboard>);
|
||||
|
||||
virtual void paint_event(GUI::PaintEvent&) override;
|
||||
virtual void mousedown_event(GUI::MouseEvent&) override;
|
||||
|
@ -33,9 +33,9 @@ private:
|
|||
|
||||
int note_for_event_position(Gfx::IntPoint const&) const;
|
||||
|
||||
void set_key(i8 key, LibDSP::Keyboard::Switch);
|
||||
void set_key(i8 key, DSP::Keyboard::Switch);
|
||||
|
||||
NonnullRefPtr<LibDSP::Keyboard> m_keyboard;
|
||||
NonnullRefPtr<DSP::Keyboard> m_keyboard;
|
||||
|
||||
bool m_mouse_down { false };
|
||||
int m_mouse_note { -1 };
|
||||
|
|
|
@ -70,23 +70,23 @@ KnobsWidget::KnobsWidget(TrackManager& track_manager, MainWidget& main_widget)
|
|||
for (auto& raw_parameter : m_track_manager.current_track().synth()->parameters()) {
|
||||
// The synth has range and enum parameters
|
||||
switch (raw_parameter.type()) {
|
||||
case LibDSP::ParameterType::Range: {
|
||||
auto& parameter = static_cast<LibDSP::ProcessorRangeParameter&>(raw_parameter);
|
||||
case DSP::ParameterType::Range: {
|
||||
auto& parameter = static_cast<DSP::ProcessorRangeParameter&>(raw_parameter);
|
||||
m_synth_values.append(m_values_container->add<GUI::Label>(String::number(static_cast<double>(parameter.value()))));
|
||||
auto& parameter_knob_value = m_synth_values.last();
|
||||
m_synth_labels.append(m_labels_container->add<GUI::Label>(String::formatted("Synth: {}", parameter.name())));
|
||||
m_synth_knobs.append(m_knobs_container->add<ProcessorParameterSlider>(Orientation::Vertical, parameter, parameter_knob_value));
|
||||
break;
|
||||
}
|
||||
case LibDSP::ParameterType::Enum: {
|
||||
case DSP::ParameterType::Enum: {
|
||||
// FIXME: We shouldn't do that, but we know the synth and it is nice
|
||||
auto& parameter = static_cast<LibDSP::ProcessorEnumParameter<LibDSP::Synthesizers::Waveform>&>(raw_parameter);
|
||||
auto& parameter = static_cast<DSP::ProcessorEnumParameter<DSP::Synthesizers::Waveform>&>(raw_parameter);
|
||||
// The value is empty for enum parameters
|
||||
m_synth_values.append(m_values_container->add<GUI::Label>(String::empty()));
|
||||
m_synth_labels.append(m_labels_container->add<GUI::Label>(String::formatted("Synth: {}", parameter.name())));
|
||||
auto enum_strings = Vector<String> { "Sine", "Triangle", "Square", "Saw", "Noise" };
|
||||
m_synth_knobs.append(m_knobs_container->add<ProcessorParameterDropdown<LibDSP::Synthesizers::Waveform>>(parameter, move(enum_strings)));
|
||||
m_synth_waveform = static_cast<ProcessorParameterDropdown<LibDSP::Synthesizers::Waveform>&>(m_synth_knobs.last());
|
||||
m_synth_knobs.append(m_knobs_container->add<ProcessorParameterDropdown<DSP::Synthesizers::Waveform>>(parameter, move(enum_strings)));
|
||||
m_synth_waveform = static_cast<ProcessorParameterDropdown<DSP::Synthesizers::Waveform>&>(m_synth_knobs.last());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -96,7 +96,7 @@ KnobsWidget::KnobsWidget(TrackManager& track_manager, MainWidget& main_widget)
|
|||
|
||||
for (auto& raw_parameter : m_track_manager.current_track().delay()->parameters()) {
|
||||
// FIXME: We shouldn't do that, but we know the effect and it's nice.
|
||||
auto& parameter = static_cast<LibDSP::ProcessorRangeParameter&>(raw_parameter);
|
||||
auto& parameter = static_cast<DSP::ProcessorRangeParameter&>(raw_parameter);
|
||||
m_delay_values.append(m_values_container->add<GUI::Label>(String::number(static_cast<double>(parameter.value()))));
|
||||
auto& parameter_knob_value = m_delay_values.last();
|
||||
m_delay_labels.append(m_labels_container->add<GUI::Label>(String::formatted("Delay: {}", parameter.name())));
|
||||
|
|
|
@ -49,7 +49,7 @@ private:
|
|||
RefPtr<GUI::Widget> m_knobs_container;
|
||||
RefPtr<GUI::Slider> m_volume_knob;
|
||||
RefPtr<GUI::Slider> m_octave_knob;
|
||||
RefPtr<ProcessorParameterDropdown<LibDSP::Synthesizers::Waveform>> m_synth_waveform;
|
||||
RefPtr<ProcessorParameterDropdown<DSP::Synthesizers::Waveform>> m_synth_waveform;
|
||||
NonnullRefPtrVector<GUI::Widget> m_synth_knobs;
|
||||
NonnullRefPtrVector<ProcessorParameterSlider> m_delay_knobs;
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ void MainWidget::keydown_event(GUI::KeyEvent& event)
|
|||
else
|
||||
m_keys_pressed[event.key()] = true;
|
||||
|
||||
note_key_action(event.key(), LibDSP::Keyboard::Switch::On);
|
||||
note_key_action(event.key(), DSP::Keyboard::Switch::On);
|
||||
special_key_action(event.key());
|
||||
m_keys_widget->update();
|
||||
}
|
||||
|
@ -94,11 +94,11 @@ void MainWidget::keyup_event(GUI::KeyEvent& event)
|
|||
{
|
||||
m_keys_pressed[event.key()] = false;
|
||||
|
||||
note_key_action(event.key(), LibDSP::Keyboard::Switch::Off);
|
||||
note_key_action(event.key(), DSP::Keyboard::Switch::Off);
|
||||
m_keys_widget->update();
|
||||
}
|
||||
|
||||
void MainWidget::note_key_action(int key_code, LibDSP::Keyboard::Switch switch_note)
|
||||
void MainWidget::note_key_action(int key_code, DSP::Keyboard::Switch switch_note)
|
||||
{
|
||||
auto key = m_keys_widget->key_code_to_key(key_code);
|
||||
if (key == -1)
|
||||
|
@ -110,10 +110,10 @@ void MainWidget::special_key_action(int key_code)
|
|||
{
|
||||
switch (key_code) {
|
||||
case Key_Z:
|
||||
set_octave_and_ensure_note_change(LibDSP::Keyboard::Direction::Down);
|
||||
set_octave_and_ensure_note_change(DSP::Keyboard::Direction::Down);
|
||||
break;
|
||||
case Key_X:
|
||||
set_octave_and_ensure_note_change(LibDSP::Keyboard::Direction::Up);
|
||||
set_octave_and_ensure_note_change(DSP::Keyboard::Direction::Up);
|
||||
break;
|
||||
case Key_C:
|
||||
m_knobs_widget->cycle_waveform();
|
||||
|
@ -127,20 +127,20 @@ void MainWidget::special_key_action(int key_code)
|
|||
void MainWidget::turn_off_pressed_keys()
|
||||
{
|
||||
if (m_keys_widget->mouse_note() != -1)
|
||||
m_track_manager.keyboard()->set_keyboard_note_in_active_octave(m_keys_widget->mouse_note(), LibDSP::Keyboard::Switch::Off);
|
||||
m_track_manager.keyboard()->set_keyboard_note_in_active_octave(m_keys_widget->mouse_note(), DSP::Keyboard::Switch::Off);
|
||||
for (int i = 0; i < key_code_count; ++i) {
|
||||
if (m_keys_pressed[i])
|
||||
note_key_action(i, LibDSP::Keyboard::Switch::Off);
|
||||
note_key_action(i, DSP::Keyboard::Switch::Off);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWidget::turn_on_pressed_keys()
|
||||
{
|
||||
if (m_keys_widget->mouse_note() != -1)
|
||||
m_track_manager.keyboard()->set_keyboard_note_in_active_octave(m_keys_widget->mouse_note(), LibDSP::Keyboard::Switch::On);
|
||||
m_track_manager.keyboard()->set_keyboard_note_in_active_octave(m_keys_widget->mouse_note(), DSP::Keyboard::Switch::On);
|
||||
for (int i = 0; i < key_code_count; ++i) {
|
||||
if (m_keys_pressed[i])
|
||||
note_key_action(i, LibDSP::Keyboard::Switch::On);
|
||||
note_key_action(i, DSP::Keyboard::Switch::On);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ void MainWidget::set_octave_and_ensure_note_change(int octave)
|
|||
m_keys_widget->update();
|
||||
}
|
||||
|
||||
void MainWidget::set_octave_and_ensure_note_change(LibDSP::Keyboard::Direction direction)
|
||||
void MainWidget::set_octave_and_ensure_note_change(DSP::Keyboard::Direction direction)
|
||||
{
|
||||
turn_off_pressed_keys();
|
||||
m_track_manager.keyboard()->change_virtual_keyboard_octave(direction);
|
||||
|
|
|
@ -29,7 +29,7 @@ public:
|
|||
|
||||
void add_track_actions(GUI::Menu&);
|
||||
|
||||
void set_octave_and_ensure_note_change(LibDSP::Keyboard::Direction);
|
||||
void set_octave_and_ensure_note_change(DSP::Keyboard::Direction);
|
||||
void set_octave_and_ensure_note_change(int);
|
||||
|
||||
private:
|
||||
|
@ -39,7 +39,7 @@ private:
|
|||
virtual void keyup_event(GUI::KeyEvent&) override;
|
||||
virtual void custom_event(Core::CustomEvent&) override;
|
||||
|
||||
void note_key_action(int key_code, LibDSP::Keyboard::Switch);
|
||||
void note_key_action(int key_code, DSP::Keyboard::Switch);
|
||||
void special_key_action(int key_code);
|
||||
|
||||
void turn_off_pressed_keys();
|
||||
|
|
|
@ -19,7 +19,7 @@ requires(IsEnum<EnumT>) class ProcessorParameterDropdown : public GUI::ComboBox
|
|||
C_OBJECT(ProcessorParameterDropdown);
|
||||
|
||||
public:
|
||||
ProcessorParameterDropdown(LibDSP::ProcessorEnumParameter<EnumT>& parameter, Vector<String> modes)
|
||||
ProcessorParameterDropdown(DSP::ProcessorEnumParameter<EnumT>& parameter, Vector<String> modes)
|
||||
: ComboBox()
|
||||
, m_parameter(parameter)
|
||||
, m_modes(move(modes))
|
||||
|
@ -33,7 +33,7 @@ public:
|
|||
|
||||
on_change = [this]([[maybe_unused]] auto name, GUI::ModelIndex model_index) {
|
||||
auto value = static_cast<EnumT>(model_index.row());
|
||||
m_parameter.set_value_sneaky(value, LibDSP::Detail::ProcessorParameterSetValueTag {});
|
||||
m_parameter.set_value_sneaky(value, DSP::Detail::ProcessorParameterSetValueTag {});
|
||||
};
|
||||
m_parameter.did_change_value = [this](auto new_value) {
|
||||
set_selected_index(static_cast<int>(new_value));
|
||||
|
@ -53,6 +53,6 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
LibDSP::ProcessorEnumParameter<EnumT>& m_parameter;
|
||||
DSP::ProcessorEnumParameter<EnumT>& m_parameter;
|
||||
Vector<String> m_modes;
|
||||
};
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <AK/FixedPoint.h>
|
||||
#include <AK/Math.h>
|
||||
|
||||
ProcessorParameterSlider::ProcessorParameterSlider(Orientation orientation, LibDSP::ProcessorRangeParameter& parameter, RefPtr<GUI::Label> value_label)
|
||||
ProcessorParameterSlider::ProcessorParameterSlider(Orientation orientation, DSP::ProcessorRangeParameter& parameter, RefPtr<GUI::Label> value_label)
|
||||
: Slider(orientation)
|
||||
, WidgetWithLabel(move(value_label))
|
||||
, m_parameter(parameter)
|
||||
|
@ -30,13 +30,13 @@ ProcessorParameterSlider::ProcessorParameterSlider(Orientation orientation, LibD
|
|||
m_value_label->set_text(String::formatted("{:.2f}", static_cast<double>(m_parameter)));
|
||||
|
||||
on_change = [this](auto value) {
|
||||
LibDSP::ParameterFixedPoint real_value;
|
||||
DSP::ParameterFixedPoint real_value;
|
||||
real_value.raw() = value;
|
||||
if (is_logarithmic())
|
||||
// FIXME: Implement exponential for fixed point
|
||||
real_value = exp(static_cast<double>(real_value));
|
||||
|
||||
m_parameter.set_value_sneaky(real_value, LibDSP::Detail::ProcessorParameterSetValueTag {});
|
||||
m_parameter.set_value_sneaky(real_value, DSP::Detail::ProcessorParameterSetValueTag {});
|
||||
if (m_value_label) {
|
||||
double value = static_cast<double>(m_parameter);
|
||||
String label_text = String::formatted("{:.2f}", value);
|
||||
|
|
|
@ -20,11 +20,11 @@ class ProcessorParameterSlider
|
|||
C_OBJECT(ProcessorParameterSlider);
|
||||
|
||||
public:
|
||||
ProcessorParameterSlider(Orientation, LibDSP::ProcessorRangeParameter&, RefPtr<GUI::Label>);
|
||||
constexpr bool is_logarithmic() const { return m_parameter.is_logarithmic() == LibDSP::Logarithmic::Yes; }
|
||||
ProcessorParameterSlider(Orientation, DSP::ProcessorRangeParameter&, RefPtr<GUI::Label>);
|
||||
constexpr bool is_logarithmic() const { return m_parameter.is_logarithmic() == DSP::Logarithmic::Yes; }
|
||||
|
||||
protected:
|
||||
LibDSP::ProcessorRangeParameter& m_parameter;
|
||||
DSP::ProcessorRangeParameter& m_parameter;
|
||||
|
||||
private:
|
||||
// Converts based on processor parameter boundaries.
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <LibGUI/AbstractScrollableWidget.h>
|
||||
|
||||
class TrackManager;
|
||||
using LibDSP::RollNote;
|
||||
using DSP::RollNote;
|
||||
|
||||
class RollWidget final : public GUI::AbstractScrollableWidget {
|
||||
C_OBJECT(RollWidget)
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
#include <LibDSP/Music.h>
|
||||
#include <math.h>
|
||||
|
||||
Track::Track(NonnullRefPtr<LibDSP::Transport> transport, NonnullRefPtr<LibDSP::Keyboard> keyboard)
|
||||
Track::Track(NonnullRefPtr<DSP::Transport> transport, NonnullRefPtr<DSP::Keyboard> keyboard)
|
||||
: m_transport(move(transport))
|
||||
, m_delay(make_ref_counted<LibDSP::Effects::Delay>(m_transport))
|
||||
, m_synth(make_ref_counted<LibDSP::Synthesizers::Classic>(m_transport))
|
||||
, m_delay(make_ref_counted<DSP::Effects::Delay>(m_transport))
|
||||
, m_synth(make_ref_counted<DSP::Synthesizers::Classic>(m_transport))
|
||||
, m_keyboard(move(keyboard))
|
||||
{
|
||||
set_volume(volume_max);
|
||||
|
@ -27,7 +27,7 @@ Track::Track(NonnullRefPtr<LibDSP::Transport> transport, NonnullRefPtr<LibDSP::K
|
|||
|
||||
void Track::fill_sample(Sample& sample)
|
||||
{
|
||||
auto playing_notes = LibDSP::RollNotes {};
|
||||
auto playing_notes = DSP::RollNotes {};
|
||||
|
||||
for (size_t i = 0; i < note_count; ++i) {
|
||||
bool has_roll_notes = false;
|
||||
|
@ -48,9 +48,9 @@ void Track::fill_sample(Sample& sample)
|
|||
}
|
||||
}
|
||||
|
||||
auto synthesized_sample = LibDSP::Signal { FixedArray<Audio::Sample>::must_create_but_fixme_should_propagate_errors(1) };
|
||||
auto synthesized_sample = DSP::Signal { FixedArray<Audio::Sample>::must_create_but_fixme_should_propagate_errors(1) };
|
||||
m_synth->process(playing_notes, synthesized_sample);
|
||||
auto delayed_signal = LibDSP::Signal { FixedArray<Audio::Sample>::must_create_but_fixme_should_propagate_errors(1) };
|
||||
auto delayed_signal = DSP::Signal { FixedArray<Audio::Sample>::must_create_but_fixme_should_propagate_errors(1) };
|
||||
m_delay->process(synthesized_sample, delayed_signal);
|
||||
auto delayed_sample = delayed_signal.get<FixedArray<Audio::Sample>>()[0];
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <LibDSP/Synthesizers.h>
|
||||
#include <LibDSP/Transport.h>
|
||||
|
||||
using LibDSP::RollNote;
|
||||
using DSP::RollNote;
|
||||
using RollIter = AK::SinglyLinkedListIterator<SinglyLinkedList<RollNote>, RollNote>;
|
||||
|
||||
class Track {
|
||||
|
@ -27,14 +27,14 @@ class Track {
|
|||
AK_MAKE_NONMOVABLE(Track);
|
||||
|
||||
public:
|
||||
Track(NonnullRefPtr<LibDSP::Transport>, NonnullRefPtr<LibDSP::Keyboard>);
|
||||
Track(NonnullRefPtr<DSP::Transport>, NonnullRefPtr<DSP::Keyboard>);
|
||||
~Track() = default;
|
||||
|
||||
Vector<Audio::Sample> const& recorded_sample() const { return m_recorded_sample; }
|
||||
SinglyLinkedList<RollNote> const& roll_notes(int note) const { return m_roll_notes[note]; }
|
||||
int volume() const { return m_volume; }
|
||||
NonnullRefPtr<LibDSP::Synthesizers::Classic> synth() { return m_synth; }
|
||||
NonnullRefPtr<LibDSP::Effects::Delay> delay() { return m_delay; }
|
||||
NonnullRefPtr<DSP::Synthesizers::Classic> synth() { return m_synth; }
|
||||
NonnullRefPtr<DSP::Effects::Delay> delay() { return m_delay; }
|
||||
|
||||
void fill_sample(Sample& sample);
|
||||
void reset();
|
||||
|
@ -52,12 +52,12 @@ private:
|
|||
|
||||
int m_volume;
|
||||
|
||||
NonnullRefPtr<LibDSP::Transport> m_transport;
|
||||
NonnullRefPtr<LibDSP::Effects::Delay> m_delay;
|
||||
NonnullRefPtr<LibDSP::Synthesizers::Classic> m_synth;
|
||||
NonnullRefPtr<DSP::Transport> m_transport;
|
||||
NonnullRefPtr<DSP::Effects::Delay> m_delay;
|
||||
NonnullRefPtr<DSP::Synthesizers::Classic> m_synth;
|
||||
|
||||
SinglyLinkedList<RollNote> m_roll_notes[note_count];
|
||||
RollIter m_roll_iterators[note_count];
|
||||
NonnullRefPtr<LibDSP::Keyboard> m_keyboard;
|
||||
NonnullRefPtr<DSP::Keyboard> m_keyboard;
|
||||
bool m_is_active_track { false };
|
||||
};
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
#include <AK/NonnullRefPtr.h>
|
||||
|
||||
TrackManager::TrackManager()
|
||||
: m_transport(make_ref_counted<LibDSP::Transport>(120, 4))
|
||||
, m_keyboard(make_ref_counted<LibDSP::Keyboard>(m_transport))
|
||||
: m_transport(make_ref_counted<DSP::Transport>(120, 4))
|
||||
, m_keyboard(make_ref_counted<DSP::Keyboard>(m_transport))
|
||||
{
|
||||
add_track();
|
||||
m_tracks[m_current_track]->set_active(true);
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "AK/NonnullRefPtr.h"
|
||||
#include "LibDSP/Keyboard.h"
|
||||
#include "Music.h"
|
||||
#include "Track.h"
|
||||
#include <AK/Array.h>
|
||||
#include <AK/Noncopyable.h>
|
||||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibDSP/Keyboard.h>
|
||||
|
||||
class TrackManager {
|
||||
AK_MAKE_NONCOPYABLE(TrackManager);
|
||||
|
@ -38,22 +38,22 @@ public:
|
|||
m_tracks[m_current_track]->set_active(true);
|
||||
}
|
||||
|
||||
NonnullRefPtr<LibDSP::Transport> transport() const { return m_transport; }
|
||||
NonnullRefPtr<LibDSP::Keyboard> keyboard() const { return m_keyboard; }
|
||||
NonnullRefPtr<DSP::Transport> transport() const { return m_transport; }
|
||||
NonnullRefPtr<DSP::Keyboard> keyboard() const { return m_keyboard; }
|
||||
// Legacy API, do not add new users.
|
||||
void time_forward(int amount);
|
||||
|
||||
void fill_buffer(Span<Sample>);
|
||||
void reset();
|
||||
void set_keyboard_note(int note, LibDSP::Keyboard::Switch note_switch);
|
||||
void set_keyboard_note(int note, DSP::Keyboard::Switch note_switch);
|
||||
void set_should_loop(bool b) { m_should_loop = b; }
|
||||
void add_track();
|
||||
int next_track_index() const;
|
||||
|
||||
private:
|
||||
Vector<NonnullOwnPtr<Track>> m_tracks;
|
||||
NonnullRefPtr<LibDSP::Transport> m_transport;
|
||||
NonnullRefPtr<LibDSP::Keyboard> m_keyboard;
|
||||
NonnullRefPtr<DSP::Transport> m_transport;
|
||||
NonnullRefPtr<DSP::Keyboard> m_keyboard;
|
||||
size_t m_current_track { 0 };
|
||||
|
||||
Array<Sample, sample_count> m_front_buffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue