Connexion rapide:  

Forum: General Discussion

Sujet Reset Stems and Unmute Stems within one action
Hi, this is Sven from germany and i have a question / problem with VDJScript (using Build 5949 on Win10).

I wrote an action for a Button which is working, but the syntax looks horrible. So i'm looking for a better approach.


What do i wanna do in general?

With one Button on a controller i'd like to

1. reset the eq
2. set the 'filter' to 50%
3. reset all 5 stems back to 50%
4. unmute a stem if it is muted


The action for the first three Commands is easy and working fine:

action="eq_reset & filter 50% & stem 'Vocal' 50% & stem 'Instru' 50% & stem 'Bass' 50% & stem 'Kick' 50% & stem 'HiHat' 50%"



But now Command 4: We have 5 StemCommands to check ( mute_stem 'Vocal', mute_stem 'Instru' and so on) with a possible state "on" and "off" -> so there are 32 Combinations at all to check.

My problem is that the following abstract command doesn't work because as soon as i use the ? Operator for the first time to check a state - the '&' Operator now works only in one of the two expressions from the '?'-switch and not in the "higher" level anymore:


The command what i need is written in abstract form like this:

action = "ResetEQ" AND
"Reset Filter" AND
"Reset5 Stems" AND
"if stem 'Vocal' is muted ? unmute it else do nothing" AND // (4A)
"if stem 'Instru' is muted ? unmute it else do nothing" AND // (4B)
"if stem 'Bass' is muted ? unmute it else do nothing" AND
"if stem 'Kick' is muted ? unmute it else do nothing" AND
"if stem 'HiHat' is muted ? unmute it else do nothing" AND

when i write examplary the Parts 4A and 4B it in that way:

"mute_stem 'Vocal' ? mute_stem 'Vocal' : nothing & mute_stem 'Instru' ? mute_stem 'Instru' : nothing" it doesn't work because the "&" Operator is not interpreted like the "AND" instruction from the abstract command above. It is interpreted as "and" in the 2.Expression from the first "?" operation.

So the only way for me was to program out all 32 possible paths of the 5 mute_stem commands :

eq_reset & filter 50% & stem 'Vocal' 50% & stem 'Instru' 50% & stem 'Bass' 50% & stem 'Kick' 50% & stem 'HiHat' 50% & mute_stem 'Vocal' ? mute_stem 'Instru' ? mute_stem 'Bass' ? mute_stem 'Kick' ? mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'Instru' & mute_stem 'Bass' & mute_stem 'Kick' & mute_stem 'HiHat' : mute_stem 'Vocal' & mute_stem 'Instru' & mute_stem 'Bass' & mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'Instru' & mute_stem 'Bass' & mute_stem 'HiHat' : mute_stem 'Vocal' & mute_stem 'Instru' & mute_stem 'Bass' : mute_stem 'Kick' ? mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'Instru' & mute_stem 'Kick' & mute_stem 'HiHat' : mute_stem 'Vocal' & mute_stem 'Instru' & mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'Instru' & mute_stem 'HiHat' : mute_stem 'Vocal' & mute_stem 'Instru' : mute_stem 'Bass' ? mute_stem 'Kick' ? mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'Bass' & mute_stem 'Kick' & mute_stem 'HiHat' : mute_stem 'Vocal' & mute_stem 'Bass' & mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'Bass' & mute_stem 'HiHat' : mute_stem 'Vocal' & mute_stem 'Bass' : mute_stem 'Kick' ? mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'Kick' & mute_stem 'HiHt' : mute_stem 'Vocal' & mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'HiHat' : mute_stem 'Vocal' : mute_stem 'Instru' ? mute_stem 'Bass' ? mute_stem 'Kick' ? mute_stem 'HiHat' ? mute_stem 'Instru' & mute_stem 'Bass' & mute_stem 'Kick' & mute_stem 'HiHat' : mute_stem 'Instru' & mute_stem 'Bass' & mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'Instru' & mute_stem 'Bass' & mute_stem 'HiHat' : mute_stem 'Instru' & mute_stem 'Bass' : mute_stem 'Kick' ? mute_stem 'HiHat' ? mute_stem 'Instru' & mute_stem 'Kick' & mute_stem 'HiHat' : mute_stem 'Instru' & mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'Instru' & mute_stem 'HiHat' : mute_stem 'Instru' : mute_stem 'Bass' ? mute_stem 'Kick' ? mute_stem 'HiHt' ? mute_stem 'Bass' & mute_stem 'Kick' & mute_stem 'HiHat' : mute_stem 'Bass' & mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'Bass' & mute_stem 'HiHat' : mute_stem 'Bass' : mute_stem 'Kick' ? mute_stem 'HiHat' ? mute_stem 'Kick' & mute_stem 'HiHat' : mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'HiHat' : nothing


Wow is that a cumbersome command.

-> Much easier would it be, when there would be in a reset command for all stems (which resets all stems back to 50% AND unmutes a stem if it is muted) analogous to the 'eq_reset' command (which resets all eq_bands AND ALSO resets a 'eq_kill' if it was set -> perfect!). Where can i make such an suggestion - where is the right place for it?

So my final question: Is there an easier syntax to program the abstract command above in VDJ (without programming out all 32 decision-paths)?

Thanks for helping me.
 

Posté Fri 26 Jun 20 @ 10:15 am
PachNPRO InfinityMember since 2009
Just a hint. Use the [ code ] Tag if you are posting a script.
It makes reading the code much easier.



eq_reset & filter 50% & stem 'Vocal' 50% & stem 'Instru' 50% & stem 'Bass' 50% & stem 'Kick' 50% & stem 'HiHat' 50% & mute_stem 'Vocal' ? mute_stem 'Instru' ? mute_stem 'Bass' ? mute_stem 'Kick' ? mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'Instru' & mute_stem 'Bass' & mute_stem 'Kick' & mute_stem 'HiHat' : mute_stem 'Vocal' & mute_stem 'Instru' & mute_stem 'Bass' & mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'Instru' & mute_stem 'Bass' & mute_stem 'HiHat' : mute_stem 'Vocal' & mute_stem 'Instru' & mute_stem 'Bass' : mute_stem 'Kick' ? mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'Instru' & mute_stem 'Kick' & mute_stem 'HiHat' : mute_stem 'Vocal' & mute_stem 'Instru' & mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'Instru' & mute_stem 'HiHat' : mute_stem 'Vocal' & mute_stem 'Instru' : mute_stem 'Bass' ? mute_stem 'Kick' ? mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'Bass' & mute_stem 'Kick' & mute_stem 'HiHat' : mute_stem 'Vocal' & mute_stem 'Bass' & mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'Bass' & mute_stem 'HiHat' : mute_stem 'Vocal' & mute_stem 'Bass' : mute_stem 'Kick' ? mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'Kick' & mute_stem 'HiHt' : mute_stem 'Vocal' & mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'Vocal' & mute_stem 'HiHat' : mute_stem 'Vocal' : mute_stem 'Instru' ? mute_stem 'Bass' ? mute_stem 'Kick' ? mute_stem 'HiHat' ? mute_stem 'Instru' & mute_stem 'Bass' & mute_stem 'Kick' & mute_stem 'HiHat' : mute_stem 'Instru' & mute_stem 'Bass' & mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'Instru' & mute_stem 'Bass' & mute_stem 'HiHat' : mute_stem 'Instru' & mute_stem 'Bass' : mute_stem 'Kick' ? mute_stem 'HiHat' ? mute_stem 'Instru' & mute_stem 'Kick' & mute_stem 'HiHat' : mute_stem 'Instru' & mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'Instru' & mute_stem 'HiHat' : mute_stem 'Instru' : mute_stem 'Bass' ? mute_stem 'Kick' ? mute_stem 'HiHt' ? mute_stem 'Bass' & mute_stem 'Kick' & mute_stem 'HiHat' : mute_stem 'Bass' & mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'Bass' & mute_stem 'HiHat' : mute_stem 'Bass' : mute_stem 'Kick' ? mute_stem 'HiHat' ? mute_stem 'Kick' & mute_stem 'HiHat' : mute_stem 'Kick' : mute_stem 'HiHat' ? mute_stem 'HiHat' : nothing



EDIT: okay, IF the format is better. Maybe its copy&paste problem and not preserving new lines
 

Posté Fri 26 Jun 20 @ 10:33 am
In a forthcoming update eq_reset will do all of this (except filter).

So you will be able to do:
eq_reset & filter 50%


As always no ETA, but soon ;)
 

Posté Fri 26 Jun 20 @ 10:47 am
So rather than just resetting the normal EQ, this will reset the stems EQ as well?

What about if the user only wants to reset standard EQ, not stems (or vice versa)? Shouldn't there be a stem_reset as a separate thing?
 

Posté Fri 26 Jun 20 @ 11:00 am
Dan (djtouchdan) wrote :
In a forthcoming update eq_reset will do all of this (except filter).

So you will be able to do:
eq_reset & filter 50%


As always no ETA, but soon ;)



Thanks! That sounds good! So I'm waiting for it. :)

But in general - is there an easier way to program out commands and multiple decisions? Or do i always have to program out all paths seperatlely like i showed it in the initial-Post??

In Abstract way:

action =

instruction1

AND
(
if ConditionA Do instruction2 else instruction 3
)
AND
(
if ConditionA Do instruction2 else instruction 3
) ...


What is here the best syntax?
 

Posté Fri 26 Jun 20 @ 11:55 am
NicotuxHome userMember since 2014
"quote=groovindj]
So rather than just resetting the normal EQ, this will reset the stems EQ as well?

What about if the user only wants to reset standard EQ, not stems (or vice versa)? Shouldn't there be a stem_reset as a separate thing?
[/quote"

That's true
and what will be the action of setting resetEqOnLoad ?? Shouldn't there be a resetStemOnLoad as a separate thing either?
 

Posté Fri 26 Jun 20 @ 1:00 pm
dfyffePRO InfinityMember since 2003
Is there a solo or unsolo or reset stem command ? Im trying this ( deck left stem "FullVocal" & deck left stem FullMelo & deck left stem FullRhythm) to unmute but its not working, what am i missing ?.
 

Posté Fri 26 Mar 21 @ 1:05 pm
dfyffe wrote :
Is there a solo or unsolo stem command


only_stem 'vocal'
only_stem 'melody'
 

Posté Fri 26 Mar 21 @ 3:17 pm
Does eq_reset reset all stems now? It doesn't seem to be the case yet...
Or has there since been a btter command to reset everything including stems?
Just looking for an update regarding this issue.
 

Posté Tue 14 Dec 21 @ 9:53 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
eq_reset will indeed work and reset the EQ, but it wont reset Stems if you have chosen Classic Eq (No Stems) and try to apply Stems from other buttons or faders (e.g the Stems Pads page)
 

Posté Tue 14 Dec 21 @ 11:32 pm
Thank you very much, SVENVIRTUAL, for this subject. It helps me, without including equalizer, to reset in one click the stems pads. Very useful.
 

Posté Mon 02 Oct 23 @ 9:57 am