COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 11-27-2016, 08:05 AM   #1
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default GetCanAutomate() Possible Fix

As you may know GetCanAutomate() doesn't really work in FL Studio for example.
This is a quick fix. We just don't inform a host about parameter change. This is working properly in FL Studio but I use chunks in my plugin, so I might need to investigate this more.

IPlugBase.cpp

Code:
void IPlugBase::SetParameterFromGUI(int idx, double normalizedValue)
{
  Trace(TRACELOC, "%d:%f", idx, normalizedValue);
  WDL_MutexLock lock(&mMutex);
  GetParam(idx)->SetNormalized(normalizedValue);
  if (GetParam(idx)->GetCanAutomate()) InformHostOfParamChange(idx, normalizedValue);
  OnParamChange(idx);
}
Code:
void IPlugBase::DirtyParameters()
{
  WDL_MutexLock lock(&mMutex);

  for (int p = 0; p < NParams(); p++)
  {
    double normalizedValue = GetParam(p)->GetNormalized();
	if (GetParam(p)->GetCanAutomate()) InformHostOfParamChange(p, normalizedValue);
  }
}
Youlean is offline   Reply With Quote
Old 11-27-2016, 12:15 PM   #2
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Unfortunately this will just prevent users to do last tweaked parameter in FL Studio...
Youlean 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 06:25 PM.


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