MCPcopy Create free account
hub / github.com/TheWaveWarden/odin2 / treeValueChangedGeneralMisc

Method treeValueChangedGeneralMisc

Source/PluginProcessorValueChange.cpp:1092–1114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1090// }
1091
1092void OdinAudioProcessor::treeValueChangedGeneralMisc(const String &p_ID, float p_new_value) {
1093#ifdef DEBUG_VARIABLES
1094 DBG("Misc: " + p_ID + ": " + std::to_string(p_new_value));
1095#endif
1096 StringRef id = StringRef(p_ID);
1097
1098 if (id == m_glide_identifier) {
1099 float glide_samplerate_adjusted = pow(p_new_value, 44800. / m_samplerate);
1100 for (int voice = 0; voice < VOICES; ++voice) {
1101 m_voice[voice].setGlide(glide_samplerate_adjusted);
1102 }
1103 } else if (id == m_master_identifier) {
1104 m_master_control = Decibels::decibelsToGain(p_new_value);
1105 } else if (id == m_unison_width_identifier) {
1106 for (int voice = 0; voice < VOICES; ++voice) {
1107 m_voice[voice].setUnisonPanAmount(p_new_value);
1108 }
1109 } else if (id == m_unison_detune_identifier) {
1110 for (int voice = 0; voice < VOICES; ++voice) {
1111 m_voice[voice].setUnisonDetuneAmount(p_new_value);
1112 }
1113 }
1114}
1115
1116// void OdinAudioProcessor::treeValueChangedNonParam(ValueTree &tree, const Identifier &id) {
1117

Callers

nothing calls this directly

Calls 3

setUnisonDetuneAmountMethod · 0.80
setGlideMethod · 0.45
setUnisonPanAmountMethod · 0.45

Tested by

no test coverage detected