COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 03-23-2018, 09:33 AM   #1
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 527
Default WDL-OL Control for multiple parameters?

I need to make a control that reflects 7 different parameters.

Is there an example or recommended way of mapping multiple parameters to one control?
__________________
Mac OS X 10.11.x, Motu Ultralite, Reaper, FCP X.
http://vordio.net
http://twitter.com/vordio
mrlimbic is offline   Reply With Quote
Old 03-24-2018, 03:02 AM   #2
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,111
Default

https://github.com/olilarkin/wdl-ol/...tControls.h#L9
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 03-24-2018, 08:42 AM   #3
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 527
Default

Quote:
Originally Posted by olilarkin View Post
Thanks. As mine will have 7 parameters and multiple control instances, I'll pass the index of the first parameter for that instance. The parameter indexes are assumed to be in the same order from the first index.

Also need to link each of those parameters to separate knobs. Is there an example for bi-directional linking?
__________________
Mac OS X 10.11.x, Motu Ultralite, Reaper, FCP X.
http://vordio.net
http://twitter.com/vordio

Last edited by mrlimbic; 04-11-2018 at 12:41 PM.
mrlimbic is offline   Reply With Quote
Old 04-11-2018, 12:38 PM   #4
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 527
Default

I've now got a weird problem when I use a 2nd instance of my 7 parameter control. It works fine for first instance where parameters start from index 0-6.

However, when I add the 2nd instance that starts at a different index i.e 8-15 it crashes because it thinks there are not enough parameters.

The plugin itself is registered to have 15 parameters which is enough for two instances plus one more control.

My plugin registers these 7 params for each instance in the constructor. Where the first parameter index is where to start.

Code:
        AddAuxParam(mFirstParamIndex + kX); // x
        AddAuxParam(mFirstParamIndex + kY); // y
        AddAuxParam(mFirstParamIndex + kCF); // cf
        AddAuxParam(mFirstParamIndex + kCS); // cs
        AddAuxParam(mFirstParamIndex + kDF); // df
        AddAuxParam(mFirstParamIndex + kDB); // db
        AddAuxParam(mFirstParamIndex + kDFB); // dfb

Code:
Assertion failed: (idx > -1 && idx < mAuxParams.GetSize()), function GetAuxParam, file /Users/john/Development/cpp/wdl-ol/WDL/IPlug/IControl.cpp, line 145.
Is this a bug? Or should I actually be specifying aux params differently?
__________________
Mac OS X 10.11.x, Motu Ultralite, Reaper, FCP X.
http://vordio.net
http://twitter.com/vordio
mrlimbic is offline   Reply With Quote
Old 04-11-2018, 01:00 PM   #5
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 527
Default

OK. I've fixed this. It seems the indexes for aux params are not the same as the for actual params. So adding the firstindex to them went over the limit.
__________________
Mac OS X 10.11.x, Motu Ultralite, Reaper, FCP X.
http://vordio.net
http://twitter.com/vordio
mrlimbic is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:50 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.