Taking a variation on Kristian's suggestion I've started building the new limits code for just the LFOs at the same time as I'm doing the knob pointer colours.
This has NO effect on any existing instrument files, it purely concerns the default settings for new ones, as well as the colours for all of them. I am finding very small inconsistencies too where the displayed position is different from the actual value. I thought I'd already got rid of these when i went right though them some years ago :( Once I'm sure it's correct I'll go on a 'magic number' hunt :P Below is what I've got so far added to the LFO parameters header: /* * This is a new replacement for limits that can be directly * accessed anywhere that includes this header. */ struct LFOminmax{ float min; float max; float def; bool learn; bool integer; }; namespace LFODEF{ const LFOminmax ampFreq {0,1,0.625,true,false}; const LFOminmax freqFreq {0,1,0.546875,true,false}; const LFOminmax filtFreq {0,1,0.625,true,false}; const LFOminmax voiceAmpFreq {0,1,0.703125,true,false}; const LFOminmax voiceFreqFreq {0,1,0.390625,true,false}; const LFOminmax voiceFiltFreq {0,1,0.390625,true,false}; const LFOminmax depth {0,127,0,true,true}; const LFOminmax voiceAmpDepth {0,127,32,true,true}; const LFOminmax voiceFreqDepth {0,127,40,true,true}; const LFOminmax voiceFiltDepth {0,127,20,true,true}; } And this is the way it's called: freq->value(value); if (engine >= PART::engine::addVoice1 && engine < PART::engine::addMod1) { switch (par) { case 0: freq->selection_color(setKnob(value,LFODEF::voiceAmpFreq.def)); break; case 1: freq->selection_color(setKnob(value,LFODEF::voiceFreqFreq.def)); break; case 2: freq->selection_color(setKnob(value,LFODEF::voiceFiltFreq.def)); break; } } else ....... -- Will J Godfrey {apparently now an 'elderly'} https://willgodfrey.bandcamp.com/ http://yoshimi.github.io Say you have a poem and I have a tune. Exchange them and we can both have a poem, a tune, and a song. _______________________________________________ Yoshimi-devel mailing list Yoshimi-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/yoshimi-devel