30 Transpose(l10n::String name, l10n::String title_format_str, int32_t newP)
33 [[nodiscard]] std::string_view
getTitle()
const override {
return FormattedTitle::title(); }
36 this->setValue(computeCurrentValueForTranspose(
37 soundEditor.currentSound->modulatorTranspose[soundEditor.currentSourceIndex],
38 soundEditor.currentSound->modulatorCents[soundEditor.currentSourceIndex]));
42 void writeCurrentValue()
override {
43 int32_t transpose, cents;
44 computeFinalValuesForTranspose(this->getValue(), &transpose, ¢s);
47 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
49 Kit* kit = getCurrentKit();
51 for (
Drum* thisDrum = kit->firstDrum; thisDrum !=
nullptr; thisDrum = thisDrum->next) {
52 if (thisDrum->type == DrumType::SOUND) {
53 auto* soundDrum =
static_cast<SoundDrum*
>(thisDrum);
56 if (soundDrum->getSynthMode() == SynthMode::FM) {
57 char modelStackMemoryForSoundDrum[MODEL_STACK_MAX_SIZE];
59 getModelStackFromSoundDrum(modelStackMemoryForSoundDrum, soundDrum)->addSoundFlags();
61 soundDrum->setModulatorTranspose(soundEditor.currentSourceIndex, transpose,
62 modelStackForSoundDrum);
63 soundDrum->setModulatorCents(soundEditor.currentSourceIndex, cents, modelStackForSoundDrum);
70 char modelStackMemory[MODEL_STACK_MAX_SIZE];
73 soundEditor.currentSound->setModulatorTranspose(soundEditor.currentSourceIndex, transpose, modelStack);
74 soundEditor.currentSound->setModulatorCents(soundEditor.currentSourceIndex, cents, modelStack);
79 Sound* sound =
static_cast<Sound*
>(modControllable);
80 return (sound->getSynthMode() == SynthMode::FM);