Ingreso rápido:  

Forum: General Discussion

Tema: Toggle volume (without holding)?

Este tópico es antiguo y puede contener información incorrecta para la nueva versión.

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.
 

Mensajes Tue 19 Aug 14 @ 9:57 am
PachNPRO InfinityMember since 2009
Maybe this way?

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

Mensajes Wed 20 Aug 14 @ 4:54 am
FruitPRO InfinityMember since 2003
That's not a real mute.

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

Mensajes Wed 20 Aug 14 @ 5:14 am
@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.
 

Mensajes Wed 20 Aug 14 @ 12:45 pm
SBDJPRO Infinity Member since 2006
As far as I know there isn't a practical way to do this in VDJScript. It's implementable as a plugin though.
 

Mensajes Wed 20 Aug 14 @ 6:55 pm
try to kill the eq together
eq_kill_high & eq_kill_low & eq_kill_mid
 

Mensajes Wed 20 Aug 14 @ 7:11 pm
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.
 

Mensajes Thu 21 Aug 14 @ 8:54 am
try with the command "down"
down ? eq_kill_high & eq_kill_low & eq_kill_mid : nothing
 

Mensajes Thu 21 Aug 14 @ 7:22 pm
more easy, try:
level 0% while_pressed
 

Mensajes Fri 22 Aug 14 @ 1:22 am
PachNPRO InfinityMember since 2009
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'
 

Mensajes Fri 22 Aug 14 @ 3:54 am
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.
 

Mensajes Fri 22 Aug 14 @ 8:32 am


(Los tópicos y foros antiguos son automáticamente cerrados)