Connexion rapide:  

Forum: VirtualDJ Technical Support

Sujet Need Script help with setting up Fx at startup

Ce topic est ancien et peut contenir des informations obselètes ou incorrectes.

Need help with a script.

Would like to add an action to the ONINIT to set a Preset for the Fx EQ10.

More details:

I have 7 saved presets within the Fx EQ10. would like Preset "B1" set, as the one used automatically at startup.

(currently have to open the gui and set the preset each time I start VDJ, would like to add this to the ONINIT, so this can be done automatically at startup)

I have looked though the Plugin actions of VDJscript, and could not determine how to reference the named preset "B1", for the Fx EQ10.

Help !
 

Posté Thu 04 Feb 21 @ 9:03 am
locoDogPRO InfinityModeratorMember since 2013
can't change to directly with effect_string, but can query get_effect_string and cycle presets

something like this

repeat_start 'someName' 30ms -1 & param_equal `deck master get_effect_string 'eq10' 1` "B1" ? [it's equal] repeat_stop 'someName' : deck master effect_button 'eq10' 6
 

Posté Thu 04 Feb 21 @ 9:23 am
Thank you very much Locodog

That works perfectly and saves a lot of time at startup.


-----------------------------
I also use Nicotux's mic Fx pad-page, MARS and use EQ10 as the Fx effect on the mic.

How does one reference the mic's, EQ10, so it's preset can be set to the TALK, preset?

I have tired to replace deck master in your script above with mic and also tried deck mic

both don't work.

when I open the mic's GUI it's called EQ10 (mic)
if I open the Master decks GUI it's called EQ10 (master)

 

Posté Mon 08 Feb 21 @ 8:41 am
NicotuxHome userMember since 2014
take a look in MARS .... mic is a negative deck and can't be use with "deck"
however to workaround it can be used as a slot :
repeat_start 'someName' 30ms -1 & param_equal ` get_effect_string 'mic' 'eq10' 1` "B1" ? [it's equal] repeat_stop 'someName' : effect_button 'mic' 'eq10' 6
 

Posté Mon 08 Feb 21 @ 8:50 am
Thank you Nicotux for a quick answer.

I have tried
 repeat_start 'someName' 30ms -1 & param_equal ` get_effect_string 'mic' 'eq10' 1` "TALK" ? repeat_stop 'someName' : effect_button 'mic' 'eq10' 6 


where TALK is named preset, and it does NOT work.

What needs to be tweaked with the script?

 

Posté Mon 08 Feb 21 @ 9:32 am
A general question for scripting.
How can one bracket one action from another?
So with the above script, how does one add another action. like deck 1 volume 100% and NOT have it part of of the Negative response to the aaa ? xxx : yyy format .. ie if a & is added after the yyy how do you keep it from becoming part of the yyy action.

Hope that is clear .
Let me say it a diff way
say one has aaa ? xxx : yyy

and then one wants to also do something else, that does not depend on "aaa"

How does one write

deck 2 volume 100% & (aaa ? xxx : yyy) & deck 1 volume 100%

since

deck 2 volume 100% & aaa ? xxx : yyy & deck 1 volume 100%

could be parsed as
(deck 2 volume 100% & aaa )? xxx : (yyy & deck 1 volume 100%)
above line NOT wanted

How does one separate actions in VDJscript?

so that the first script is NOT part of the "aaa" and an action at the end, is NOT part of "yyy"
 

Posté Mon 08 Feb 21 @ 9:37 am
Virtual DJ remembers the last setting which You use before close the , so that You have it at next Startup.
 

Posté Mon 08 Feb 21 @ 10:06 am
djdutschi wrote :
Virtual DJ remembers the last setting which You use before close the , so that You have it at next Startup.


Yes that's true for many things, and equally NOT true for many settings.

If everything was saved from one session to the next, it would solve the issue of resetting a lot. (and could cause problems if you are restarting VDJ to fix something not acting as one expects, maybe)

for example the volume faders, the positions of the EQs, Master volume, .......... and drum roll...... the selected Preset for EQ10 are NOT saved between sessions of VDJ, else would not be trying to add actions to the ONINIT.


Is there a way to save which EQ10 Preset is selected/active, between sessions?



-----------
(this is all based on what VDJ saves, not based on what a controller(s) might set things to)
 

Posté Mon 08 Feb 21 @ 10:39 am
NicotuxHome userMember since 2014
@IIDEEJAYII
I'm sorry, I tested with many things that used to work... (even with my bigFXGUI window)
get_effect_<thing> <slot> <effect> <index>
does not work anymore :( and return boolean instead
(maybe a side effect of 6 slots implementation ?)

but there is more :
effect_select mic 'eq10' & get_effect_string 'mic' 1
will not be a query anymore and will ... empty the name
effect_select mic 'eq10' & get_effect_string 'mic' 1 'Club'
sets the name "Club" ... but only the name not the preset itself

get_effect_slider 'mic' 'eq10' 2
do not work anymore either

so that NO, there is no way anymore to get the preset used by EQ10 (or any other values) with mic booth aux release
 

Posté Mon 08 Feb 21 @ 9:16 pm
locoDogPRO InfinityModeratorMember since 2013
@IIDEEJAYII

to your general question, there is no direct method to encapsulate script actions.
but there's a few ways to do it indirectly.

best way is, if you can; just write it in the right order.
not always possible, sometimes things have to happen in order inconvenient for script.

so
deck 2 volume 100% & (aaa ? xxx : yyy) & deck 1 volume 100%
best writing
deck 1 volume 100% & deck 2 volume 100% & (aaa ? xxx : yyy)
maybe that won't work so
deck 2 volume 100% & aaa ? xxx & deck 1 volume 100% : yyy & deck 1 volume 100%
^annoying to repeat yourself but vdj doesn't mind

a bit of a pain if you're working on big scripts, if timing isn't too critical, do this
set 'stepCount' 0 & repeat_start 'stepScript' 30ms 2 & cycle 'stepCount' 2 & var 'stepCount' 1 ? deck 2 volume 100% & aaa ? xxx : yyy : deck 1 volume 100%

there are other ways but they get dangerous.
 

Posté Mon 08 Feb 21 @ 10:37 pm
NicotuxHome userMember since 2014
@IIDEEJAYII
there is a problem with calling effect button button too
needs to specify a value now : effect_button mic 6 -1
... maybe spurious parameter interfering

i finally got ways to read the preset from mic eq10 (but only when in the slot) :

effect_select mic eq10 & repeat_start_instant xxx 10ms 42 & get_text `effect_string mic 1` & param_cast text & param_equal "Club" ? repeat_stop xxx : effect_button mic 6 -1

fix the Club to your effect "TALK" and the 42 is there in a way not to infinite loop (no way found to save current effect and current preset)
and invert final test to allow to go on with other script actions

an alternative way (with possible script extension)
effect_select mic eq10 & repeat_start_instant xxx 10ms 42 & get_text `get_effect_string mic 1 Club` & param_cast boolean & param_equal false ? effect_button mic 6 -1 : repeat_stop xxx
 

Posté Tue 09 Feb 21 @ 1:01 am
Thank you so much Nicotux you are the magician with VDJ script..

effect_select mic eq10 & repeat_start_instant xxx 10ms 42 & get_text `get_effect_string mic 1 TALK` & param_cast boolean & param_equal false ? effect_button mic 6 -1 : repeat_stop xxx 

the above, your seconded script works perfectly, yay ! ! Thank you



and could NOT get your first script to work for me.
effect_select mic eq10 & repeat_start_instant xxx 10ms 42 & get_text `effect_string mic 1` & param_cast text & param_equal "TALK" ? repeat_stop xxx : effect_button mic 6 -1


I can tell you I would never have figured this out..

Again thank you so much.

-------------------------------
Nicotux do you have Pro Infinity License?

If not, I would love to purchase one for you.. as a small part, for all the amazing work and help you do for all.
 

Posté Tue 09 Feb 21 @ 1:57 am
NicotuxHome userMember since 2014
"Nicotux do you have Pro Infinity License? "
Thanks, Yes I have one, simply linked to another account I rarely use here

By the way the Master of VDJ script Wizards is named "Locodog"
 

Posté Tue 09 Feb 21 @ 2:52 am


(Les anciens sujets et forums sont automatiquement fermés)