快速登录:  

Forum: VirtualDJ Plugins

话题: VDJScript: address plugin param or button by name

由于该帖子已年深日久,可能包含陈旧过时或描述错误的信息。

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
 

发表时间 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.
 

发表时间 Sat 01 Aug 15 @ 4:41 pm
denoirHome userMember since 2014
 

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

发表时间 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?
 

发表时间 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
 

发表时间 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?
 

发表时间 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.
 

发表时间 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?
 

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

发表时间 Mon 03 Aug 15 @ 9:00 am


(陈旧帖子或论坛版块会自动关闭)