error using new configureSwitch function

I am trying to take advantage of the new function: configSwitch(OFFSET_PARAM, “Offset”, {"-5v to 5v", “0v-10v”});

and I am getting

error: no matching function for call to ‘BPMLFO::configSwitch(BPMLFO::ParamIds, const char [11], )’

Anybody gotten this to work?

and nevermind, I had to look RTFM instead of using the example in the “migrate to v2 page”. You still need to specify the min, max and default values.

so: configSwitch(OFFSET_PARAM, 0.f,1.f,0.f, “Offset”, {"-5v to 5v", “0v-10v”});

Oops! Migrate2 manual page fixed.

The intention for including the arguments was to require explicitly specifying offset and default values, e.g.

configSwitch(LEN_PARAM, 1, 4, 3, "Note length", {"Whole", "Half", "Quarter", "Eighth"};

In this case, the note length is 2^{-\text{LEN}} so it’s convenient to have a different offset than 0. If the min/max values could be omitted, it might confuse code readers on the correct valid range of the parameter.

2 Likes

No worries, it totally makes sense

I like the feature, but with 50+ modules between two libraries, I definitely have my work cut out for me.

I feel really bad for NSYTHI

4 Likes