haha, this seems to be all way over my head... globaltune does not work on the preenfm when i test it now. if i set it to a constant offest value it works. i took a different approach and added a globalTune float variable in osc.cpp and changed the line (and all others that should be affected):
oscState->mainFrequency = frequencyToUse[note] * oscillator->frequencyMul * (1.0f + oscillator->detune * .05f);
to
oscState->mainFrequency = frequencyToUse[note] * globalTune * oscillator->frequencyMul * (1.0f + oscillator->detune * .05f);
if i set globalTune = 4.0f in the osc init function it works as expected, everything is tuned higher.
however i tried (naively i think) to access the global_tune menu entry (that i defined in menu.h and menu.cpp) like this:
this->synthState->fullState.midiConfigValue[MIDICONFIG_GLOBAL_TUNE] and i did something like this:
globalTune = (4400.0f + (this->synthState->fullState.midiConfigValue[MIDICONFIG_GLOBAL_TUNE] - 50)) / 4400.f (globaltune is defined from 0 to 126 with 50 as 440hz. this should give me 0.1 resolution on the frequency from 435 to 447.6.
this does just not do anything.
even setting
globalTune = this->synthState->fullState.midiConfigValue[MIDICONFIG_GLOBAL_TUNE]
does not do anything, and that should yield extreme results.
so it seems that my variable access to globaltune is somehow wrong, or the value is not set at all.
menu.cpp entry looks like this:
{
"Glb Tune: ",
"globaltune",
127,
0
},
in other words, i have no idea what i am doing and i am sorry to waste so much of your time. :-(