COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 10-18-2019, 12:41 AM   #1
renzoruggieri.com
Human being with feelings
 
Join Date: Oct 2019
Location: Roseto degli Abruzzi (TE, Italy)
Posts: 13
Default Iplug2, SET/GET control

Someone can help me with this instruction that doesn't work for me.

auto SWact = [pGraphics](IControl* pCaller) {
SplashClickActionFunc(pCaller);

// it works
pSW = pCaller->GetTag();

// it works
dynamic_cast<ITextControl*>(pGraphics->GetControlWithTag(kTPanel))->SetStr("ciao");

// DON'T WORKS
dynamic_cast<ICaptionControl*>(pGraphics->GetDelegate().GetParam(kPSSW1)->Set());
};

What I need is to SET (and GET) a value in a parameter in a knob control?

Thanks

Last edited by renzoruggieri.com; 10-18-2019 at 12:48 AM. Reason: no clear title
renzoruggieri.com is offline   Reply With Quote
Old 10-18-2019, 01:25 PM   #2
renzoruggieri.com
Human being with feelings
 
Join Date: Oct 2019
Location: Roseto degli Abruzzi (TE, Italy)
Posts: 13
Default ... Iplug2, SET/GET control

That's work (on "OnParamChange(int paramIdx)")

GetParam(paramIdx)->Value();
renzoruggieri.com is offline   Reply With Quote
Old 10-18-2019, 11:07 PM   #3
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by renzoruggieri.com View Post
That's work (on "OnParamChange(int paramIdx)")

GetParam(paramIdx)->Value();
This is what I usually use.
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 10-19-2019, 12:47 AM   #4
renzoruggieri.com
Human being with feelings
 
Join Date: Oct 2019
Location: Roseto degli Abruzzi (TE, Italy)
Posts: 13
Default

Thanks for answer.

it works inside
void YourInstrument::OnParamChange(int paramIdx)
{}


But don't work outside - for example - when you push a Button...
auto YourAction = [pGraphics](IControl * pCaller) {
};
renzoruggieri.com is offline   Reply With Quote
Old 10-19-2019, 04:47 AM   #5
renzoruggieri.com
Human being with feelings
 
Join Date: Oct 2019
Location: Roseto degli Abruzzi (TE, Italy)
Posts: 13
Default SOLVED...

auto SWact = [&](IControl* pCaller) {
SplashClickActionFunc(pCaller);

SendParameterValueFromDelegate(YourControl, 70, false);
GetParam(YourControl)->Set(70);


Now it update the value and the graphic of control.
renzoruggieri.com 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 11:18 AM.


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