1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:08:10 +00:00

LibDSP: Allow ProcessorRangeParameter to specify if it's a log value

This doesn't affect the parameter's own behavior but is part of the
parameter meta-data, just as the name. If a parameter is logarithmic,
UI elements should represent it with an interface that scales
logarithmically.
This commit is contained in:
kleines Filmröllchen 2021-10-12 01:15:12 +02:00 committed by Andreas Kling
parent 98058f7efe
commit e7d84da3da
3 changed files with 18 additions and 9 deletions

View file

@ -17,10 +17,10 @@ namespace LibDSP::Synthesizers {
Classic::Classic(NonnullRefPtr<Transport> transport)
: LibDSP::SynthesizerProcessor(transport)
, m_waveform("Waveform"sv, Waveform::Saw)
, m_attack("Attack"sv, 0, 2000, 5)
, m_decay("Decay"sv, 0, 20'000, 80)
, m_sustain("Sustain"sv, 0, 1, 0.725)
, m_release("Release", 0, 6'000, 120)
, m_attack("Attack"sv, 0.01, 2000, 5, Logarithmic::Yes)
, m_decay("Decay"sv, 0.01, 20'000, 80, Logarithmic::Yes)
, m_sustain("Sustain"sv, 0.001, 1, 0.725, Logarithmic::No)
, m_release("Release", 0.01, 6'000, 120, Logarithmic::Yes)
{
m_parameters.append(m_waveform);
m_parameters.append(m_attack);