Entra:     


Forum: General Discussion

Topic: Toggle volume (without holding)?

Questo argomento è obsoleto e potrebbe contenere informazioni obsolete o errate.

What is the code to toggle a deck volume from the current level% to 0%, and back again. (Like a mute key).

I currently have it as 'deck 1 0% while_pressed', but I'm looking to toggle it without needing to hold the key down.
 

Inviato Tue 19 Aug 14 @ 9:57 am
Maybe this way?

deck 1 level 0% ? deck 1 level 100% : deck 1 level 0%
 

That's not a real mute.

Even for the master I couldn't set a real mute button that's not temporary.
 

@PachN That would cut between 100% and 0%. I'm looking to cut between the current level % and 0%. Like an on/off toggle switch that you'd get on an analogue mixer. Is there an expression to call up the current or previous level %?

I've done a lot of searching, and trial & error coding (I'm no coder), but no joy.
 

As far as I know there isn't a practical way to do this in VDJScript. It's implementable as a plugin though.
 

try to kill the eq together
eq_kill_high & eq_kill_low & eq_kill_mid
 

Yes jmf28! Nice lateral thinking. Ok, I'd like to map that to when a button is held down. I thought it would be something like:

eq_kill_high & eq_kill_low & eq_kill_mid while_pressed

or

eq_kill_high while_pressed & eq_kill_low while_pressed & eq_kill_mid while_pressed

But it's not killing them all. I'm sure it's just a syntax error.
 

try with the command "down"
down ? eq_kill_high & eq_kill_low & eq_kill_mid : nothing
 

more easy, try:
level 0% while_pressed
 

down or while_pressed isn't what he wants. He wants to get rid of the down/ while_pressed and instead use a toggle funktion.

My last idea, and I'm not sure if that is even possible:

Try to get the volume of the fader with get_volume (or sth.), save it to a variable (if possible), and later cast it back to set the original volume level.

deck 1 level 0% ? deck 1 level var "myVar" param_cast 'percentage' : deck 1 level 0% & set "myVar" deck 1 get_level param_cast 'integer'
 

Got the toggle working by killing the eq's with the code further up. And can also use the level 0% while_pressed to cut to 0%. Thanks jmf28, PachN and co.

What I'd like to also do is mimic cutting up on the fader to my desired level. Eg. I'm playing at x% volume, then I press a button to toggle the volume to 0%, then I need another button to return to x% while_pressed. I think this is what you might be similar to what you are getting at PachN? I'll start testing it out this eve.
 



(Vecchi argomenti e forum sono automaticamente chiusi)