Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: VDJScript: address plugin param or button by name

This topic is old and might contain outdated or incorrect information.

denoirHome userMember since 2014
Hello there,

I'm currently trying to develop a simple plugin that should send out Midi notes when a parameter is changed.
Currently I've assigned that parameter to a button to be able to toggle it like so:

effect 'plugin' button 2 1

While that works, things will get messy once I introduce more buttons. It would feel much more natural if I could address these buttons by their name, or the name of the corresponding parameter, something like:

effect 'plugin' break

Where break would be the param the plugin is listening on through "onParameter".
I've seen effect_command but could not find any more information on how to use that? Which commands would I be sending with it?
Is it possible to directly call a plugins parameters by VDJScript?

Thanks in advance,
Marco
 

Posted Sat 01 Aug 15 @ 1:59 pm
SBDJPRO Infinity Member since 2006
No; you can get the name from the number but you can't address them by name.

You could enumerate and match manually.
 

Posted Sat 01 Aug 15 @ 4:41 pm
denoirHome userMember since 2014
 

Posted Sat 01 Aug 15 @ 5:49 pm
SBDJPRO Infinity Member since 2006
Detection of changes in variable value is done by polling continuously :)
 

Posted Sat 01 Aug 15 @ 6:40 pm
denoirHome userMember since 2014
Ahh.. and I thought onParameter would detect that. Oh well.
How often do you check for changes? Every 1/2s?
 

Posted Sun 02 Aug 15 @ 6:23 am
SBDJPRO Infinity Member since 2006
It depends on the purpose, whatever works for your functionality. For the kind of plugin like the freestyler plugin, maybe 200 times a second or so lol
 

Posted Sun 02 Aug 15 @ 9:35 am
denoirHome userMember since 2014
Okay fair enough, I'll do my testing. Thanks alot! :)

/edit:

Btw, do you have any info on how to use effect_command?
 

Posted Sun 02 Aug 15 @ 10:48 am
SBDJPRO Infinity Member since 2006
effect_command relates to a parameter declared as VDJPARAM_COMMAND. The parameter you pass to the script is passed to the variable specified in DeclareParameter.

Few effects implement it tbh.
 

Posted Sun 02 Aug 15 @ 6:26 pm
denoirHome userMember since 2014
Ah okay, thanks! I'm curious: are there any documentations and guides on plugin development for pro users that are invisible for regular users?
I know about the SDK pages but they seem to be incomplete here and there?
 

Posted Mon 03 Aug 15 @ 2:48 am
SBDJPRO Infinity Member since 2006
No; the best documentation are the SDK headers themselves :)
 

Posted Mon 03 Aug 15 @ 9:00 am


(Old topics and forums are automatically closed)