|
|||
Like I said I cant link fader from gui to change params of effect.
It is VST SDK 2.4 I cant find in tuts or docs how I ma suppose to do that? Obviously I have to have some reference of editor class in effect class. I guess setParameter() is the function to update effects params value from faders positions. void mdaDelay::setParameter(VstInt32 index, float value) Here are complete .cpp files: effect.cpp: http://codepad.org/tDwfI4ps editor.cpp http://codepad.org/oBuzrzOu |
|||
| ^ | Joined: 20 Sep 2007 Member: #160675 | ||
|
|||
Use setParameterAutomated() instead of setParameter() ... |
|||
| ^ | Joined: 29 Feb 2004 Member: #14598 | ||
|
|||
asseca wrote: Use setParameterAutomated() instead of setParameter() ...
in editor class or in effect class? |
|||
| ^ | Joined: 20 Sep 2007 Member: #160675 | ||
|
|||
Looks like you don't send the parameter change to the editor, try this :
void mdaDelay::setParameter(VstInt32 index, float value) { // your code goes here..... // update the editor if (editor) ((AEffGUIEditor*)editor)->setParameter (index, value); } |
|||
| ^ | Joined: 20 Jun 2006 Member: #111030 Location: Los Angeles | ||
|
|||
suncica2222 wrote: asseca wrote: Use setParameterAutomated() instead of setParameter() ...
in editor class or in effect class? |
|||
| ^ | Joined: 29 Feb 2004 Member: #14598 | ||
|
|||
| ^ | Joined: 16 Aug 2004 Member: #37236 Location: Vienna, Austria | ||
|
|||
arakula wrote: asseca wrote: [...] Plugin->setParamameterAutomated().
Now that's cool new function Too fast copying from own code which bypasses the original effect->setParamameterAutomated() with custom code |
|||
| ^ | Joined: 29 Feb 2004 Member: #14598 | ||
|
|||
thank you all
this is the right answer Nomad26 wrote: Looks like you don't send the parameter change to the editor, try this :
void mdaDelay::setParameter(VstInt32 index, float value) { // your code goes here..... // update the editor if (editor) ((AEffGUIEditor*)editor)->setParameter (index, value); } |
|||
| ^ | Joined: 20 Sep 2007 Member: #160675 | ||
|
|||
Could someone give an example of how to do this with a variable, not just the parameters? |
|||
| ^ | Joined: 16 Feb 2005 Member: #58183 | ||
|
|||
suncica2222 wrote: this is the right answer Nomad26 wrote: Looks like you don't send the parameter change to the editor, try this :
void mdaDelay::setParameter(VstInt32 index, float value) { // your code goes here..... // update the editor if (editor) ((AEffGUIEditor*)editor)->setParameter (index, value); } I disagree. To my mind the DSP part of your plugin NEVER calls into the UI. The UI calls into the DSP part, but in a non-blocking way, if in any way possible. So may I suggest that you queue up the parameter changes from the DSP component and let the UI read from that. You could even employ two queues and swap out references to minimize locking. You should also call the setParameterAutomated (from the UI) to notify the host of that parameter value change. |
|||
| ^ | Joined: 18 Jul 2007 Member: #155805 Location: Netherlands | ||
|
|||
obiwanjacobi wrote: suncica2222 wrote: this is the right answer Nomad26 wrote: Looks like you don't send the parameter change to the editor, try this :
void mdaDelay::setParameter(VstInt32 index, float value) { // your code goes here..... // update the editor if (editor) ((AEffGUIEditor*)editor)->setParameter (index, value); } I disagree. To my mind the DSP part of your plugin NEVER calls into the UI. The UI calls into the DSP part, but in a non-blocking way, if in any way possible. So may I suggest that you queue up the parameter changes from the DSP component and let the UI read from that. You could even employ two queues and swap out references to minimize locking. You should also call the setParameterAutomated (from the UI) to notify the host of that parameter value change. That's the way it's done in the VST SDK examples, so I'd say that makes it "legal". And camsr, I'm not sure what you're asking. Parameters ARE variables. |
|||
| ^ | Joined: 10 Oct 2005 Member: #83902 Location: Toronto, Canada | ||
|
|||
obiwanjacobi wrote: To my mind the DSP part of your plugin NEVER calls into the UI. The UI calls into the DSP part, but in a non-blocking way, if in any way possible. I used to PostMessage from setParameter and it worked fine, but have since migrated to just polling changes from the UI with a timer; more predictable performance and none of the locking headache. |
|||
| ^ | Joined: 11 Feb 2006 Member: #97939 Location: Helsinki, Finland | ||
|
|||
How do I give the effect class scope inside the editor class? Or am I thinking wrong? I figure it needs a pointer but I don't know how. So far, all I have to bring variables from the effect into the editor is:
EffectEditor temp* = static_cast<EffectEditor*>(editor) and then to assign... temp->variable I actually don't remember if I did it this way exactly, but I had to put this into processReplacing and it looked real ugly. I don't quite understand scope yet so any help is appreciated. In the static_cast above, could the expression be (effect)? ---- ![]() |
|||
| ^ | Joined: 16 Feb 2005 Member: #58183 | ||
|
|||
mystran wrote: obiwanjacobi wrote: To my mind the DSP part of your plugin NEVER calls into the UI. The UI calls into the DSP part, but in a non-blocking way, if in any way possible. I used to PostMessage from setParameter and it worked fine, but have since migrated to just polling changes from the UI with a timer; more predictable performance and none of the locking headache. That's exactly what I am doing with VSTGL and the draw() function. But making a simple peak meter is being a headache with the asynchronous updates. ---- ![]() |
|||
| ^ | Joined: 16 Feb 2005 Member: #58183 |
| KVR Forum Index » DSP and Plug-in Development | All times are GMT - 8 Hours |
|
Printable version |
Disclaimer: All communications made available as part of this forum and any opinions, advice, statements, views or other information expressed in this forum are solely provided by, and the responsibility of, the person posting such communication and not of kvraudio.com (unless kvraudio.com is specifically identified as the author of the communication).
Powered by phpBB © phpBB Group









