COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 02-11-2017, 07:58 AM   #1
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 208
Default Process for activation/deactivation

Can I check if the plugin is activated ?

For example in Reaper near plugin list is a checkbox for activation/deactivation, can to check the state of this from plugin ?

I test void OnActivate(bool active) with no success.
__________________
Audio VST plugins http://vst.saschart.com
SaschArt is offline   Reply With Quote
Old 02-11-2017, 02:22 PM   #2
earlevel
Human being with feelings
 
Join Date: Dec 2015
Posts: 328
Default

Quote:
Originally Posted by SaschArt View Post
I test void OnActivate(bool active) with no success.
Not sure exactly what you want to do, but OnActivate is of return type void, so it's not a test. The comments make it clear it's not for what you think it's for, and the default, essentially null implementation is not overriden:

Code:
  // Not usually needed ... Reset is called on activate regardless of whether this is implemented.
  // Also different hosts have different interpretations of "activate".
  // Implementations should set a mutex lock like in the no-op!
  virtual void OnActivate(bool active) { TRACE;  IMutexLock lock(this); }
earlevel is offline   Reply With Quote
Old 05-21-2020, 05:32 AM   #3
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 208
Default

I didn't say that OnActivate() returns a Boolean variable or another!

I asked if it is called when the user presses the bypass/activate button from host.

There is a function called when the plugin is bypass from host? Or if I can check the status of the active/bypass plugin.
__________________
Audio VST plugins http://vst.saschart.com
SaschArt is offline   Reply With Quote
Old 05-21-2020, 03:03 PM   #4
Nonlinear
Human being with feelings
 
Join Date: Apr 2018
Posts: 302
Default

Quote:
Originally Posted by SaschArt View Post
I didn't say that OnActivate() returns a Boolean variable or another!

I asked if it is called when the user presses the bypass/activate button from host.

There is a function called when the plugin is bypass from host? Or if I can check the status of the active/bypass plugin.
Not sure if there is a function to return the status - you may have to roll your own - check for “mIsBypassed”.
Nonlinear is online now   Reply With Quote
Old 05-22-2020, 01:20 AM   #5
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 208
Default

There it's a function bool GetIsBypassed() { return mIsBypassed; } but don't works, allways return false.
__________________
Audio VST plugins http://vst.saschart.com
SaschArt is offline   Reply With Quote
Old 05-24-2020, 08:03 AM   #6
TonyGlover
Human being with feelings
 
TonyGlover's Avatar
 
Join Date: Mar 2016
Posts: 39
Default

Quote:
Originally Posted by SaschArt View Post
There it's a function bool GetIsBypassed() { return mIsBypassed; } but don't works, allways return false.
I don't understand why there are these functions that don't work. It creates confusion.
TonyGlover is offline   Reply With Quote
Old 05-25-2020, 09:23 AM   #7
Nonlinear
Human being with feelings
 
Join Date: Apr 2018
Posts: 302
Default

Quote:
Originally Posted by TonyGlover View Post
I don't understand why there are these functions that don't work. It creates confusion.
It's not on purpose! iPlug has been around a long time and has been tweaked by many people along the way - some things got fixed while others get messed up in the process. I have found lines commented out for no apparent reason that prevented things from working. Someone likely did that to fix something else or maybe to temporarily disable it while testing, etc., and never put it back, IDK.

You have to think of iPlug as a good place to start - not necessarily as a finished product. I have found the members here very helpful in getting through the issues.
Nonlinear is online now   Reply With Quote
Old 05-28-2020, 10:15 AM   #8
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: UK
Posts: 1,213
Default

seems like mIsBypassed was only ever set for AUv2 and VST3 in iPlug1 and effSetBypass was not implemented for VST2
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 05-29-2020, 01:43 AM   #9
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,086
Default

Do note that the VST2 host will also need to support this, e.g. I don't think REAPER does.
Tale 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 09:16 PM.


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