24class Transpose final :
public Decimal,
public FormattedTitle {
26 Transpose(l10n::String name, l10n::String title_format_str) :
Decimal(name), FormattedTitle(title_format_str) {}
28 [[nodiscard]] std::string_view
getTitle()
const override {
return FormattedTitle::title(); }
30 [[nodiscard]] int32_t getMinValue()
const override {
return -9600; }
31 [[nodiscard]] int32_t getMaxValue()
const override {
return 9600; }
32 [[nodiscard]] int32_t getNumDecimalPlaces()
const override {
return 2; }
35 this->setValue(computeCurrentValueForTranspose(cvEngine.cvChannels[soundEditor.currentSourceIndex].transpose,
36 cvEngine.cvChannels[soundEditor.currentSourceIndex].cents));
39 void writeCurrentValue()
override {
40 int32_t transpose, cents;
41 computeFinalValuesForTranspose(this->getValue(), &transpose, ¢s);
42 cvEngine.setCVTranspose(soundEditor.currentSourceIndex, transpose, cents);