At the end of dev_notes/ToDo.txt I found this:
"LFO frequency should be stated in Hz."
I gave it a try and I have a working version for LFO freq.
The code can be found on my showLFOFrequencyInHz branch on github:
https://github.com/Yoshimi/yoshimi/compare/21d982f6c92fc076399ccaeaeb41907fb7c82e06...heuchi:showLFOFrequencyInHz
I added a function to WidgetPDial, which I called show_custom_value(string).
This function can be used in the callback code for the controls.
float lfofreq = (powf(2.0f, o->value() * 10.0f) - 1.0f) / 12.0f;
ostringstream oss;
oss.precision(3);
oss << lfofreq << " Hz";
o->show_custom_value(string(oss.str()));
This doesn't look very nice yet, because of the string generation. We might
add a helper in Misc/MiscFuncs to simplify it. Something like:
string valueWithUnit(float value, string unit);
Some more controls this could be used for:
Amplitude LFO depth in %
Frequency LFO depth in cents.
Attack, Decay, Release Times in ms
Comments welcome.
Jörn
Yoshimi source code is available from either:
http://sourceforge.net/projects/yoshimi
Or: https://github.com/Yoshimi/yoshimi
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx