30 Transpose(l10n::String name, l10n::String title_format_str, int32_t newP, uint8_t source_id)
31 :
source::Transpose(name, newP, source_id), FormattedTitle(title_format_str, source_id + 1) {}
33 [[nodiscard]] std::string_view
getTitle()
const override {
return FormattedTitle::title(); }
36 this->setValue(computeCurrentValueForTranspose(soundEditor.currentSound->modulatorTranspose[source_id_],
37 soundEditor.currentSound->modulatorCents[source_id_]));
41 void writeCurrentValue()
override {
42 int32_t transpose, cents;
43 computeFinalValuesForTranspose(this->getValue(), &transpose, ¢s);
46 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
48 Kit* kit = getCurrentKit();
50 for (
Drum* thisDrum = kit->firstDrum; thisDrum !=
nullptr; thisDrum = thisDrum->next) {
51 if (thisDrum->type == DrumType::SOUND) {
52 auto* soundDrum =
static_cast<SoundDrum*
>(thisDrum);
55 if (soundDrum->getSynthMode() == SynthMode::FM) {
56 char modelStackMemoryForSoundDrum[MODEL_STACK_MAX_SIZE];
58 getModelStackFromSoundDrum(modelStackMemoryForSoundDrum, soundDrum)->addSoundFlags();
60 soundDrum->setModulatorTranspose(source_id_, transpose, modelStackForSoundDrum);
61 soundDrum->setModulatorCents(source_id_, cents, modelStackForSoundDrum);
68 char modelStackMemory[MODEL_STACK_MAX_SIZE];
71 soundEditor.currentSound->setModulatorTranspose(source_id_, transpose, modelStack);
72 soundEditor.currentSound->setModulatorCents(source_id_, cents, modelStack);
77 Sound* sound =
static_cast<Sound*
>(modControllable);
78 return (sound->getSynthMode() == SynthMode::FM);