29 void readCurrentValue()
override { this->setValue(soundEditor.currentSound->oscillatorSync); }
31 void writeCurrentValue()
override {
32 bool current_value = this->getValue();
35 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
37 Kit* kit = getCurrentKit();
39 for (
Drum* thisDrum = kit->firstDrum; thisDrum !=
nullptr; thisDrum = thisDrum->next) {
41 if (thisDrum->type == DrumType::SOUND) {
42 auto* soundDrum =
static_cast<SoundDrum*
>(thisDrum);
44 if (soundDrum->synthMode != SynthMode::FM && soundDrum->sources[0].oscType != OscType::SAMPLE
45 && soundDrum->sources[1].oscType != OscType::SAMPLE) {
46 soundDrum->oscillatorSync = current_value;
53 soundEditor.currentSound->oscillatorSync = current_value;
57 Sound* sound =
static_cast<Sound*
>(modControllable);
58 return (whichThing == 1 && sound->synthMode != SynthMode::FM && sound->sources[0].oscType != OscType::SAMPLE
59 && sound->sources[1].oscType != OscType::SAMPLE);