Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: Plugin SDK, events from VDJ script.
I'm experimenting with the SDK but having some issues grasping some of the fundamentals without many realworld examples. My main question at the moment is how a scripted event within VDJ can somehow raise an event within the plugin.

From my current understanding DeclareParameter* is used and then OnPrarmerter in some situations to monitor GUI elements created by the plugin. For example, if a slider is changed within the GUI OnPrarmerter will be raised within the plugin. But can this custom slider be controlled via VDJ script called within other areas of VDJ? (such as volume or fader for example). In other words, if a pad is pressed you can use VDJ script to effect fader levels. Can you do the same with elements created via the SDK? And if so, will the changes applied by VDJ script raise the OnParameter event within my plugin?
 

Posted Mon 26 Jun 23 @ 7:06 pm
AdionPRO InfinityCTOMember since 2006
OnParameter is only called when a parameter of your plugin changes.
From vdj script, you can use effect_slider, effect_button or effect_string to make this happen.

You can't get notifications for other events, so if you depend on other parameters, you need to check those yourself.
There's two ways you might do this.
You can use a repeat_start script, which could use variables and param_equal to check if something changed, and then call effect_slider to trigger your own plugin.
Another way is to call GetInfo or GetStringInfo from your plugin regularly (could be from a thread you create, or from OnProcessSamples in the case of a dsp plugin) and then compare it with the last value.
 

Posted Mon 26 Jun 23 @ 7:20 pm
 

Posted Mon 26 Jun 23 @ 7:35 pm