Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Possible bug with mapping an action to a fader instead of a button in VDJScript.

This topic is old and might contain outdated or incorrect information.

Hi All

I've put together a couple of scripts in order to simulate how a radio studio mic behaves for when I'm broadcasting using my Denon MC6000mk2. I'm actually using a USB Condenser mic attached to the PC, and the necessary audio mapping to ensure this is recorded correctly, that all works fine.

The purpose of the scripts is to Mute my booth output, which I have routed to some monitor speakers in my home studio in the audio config, as soon as the microphone is switched on, then return the booth output to the volume it used to be at once the mic is switched off.

The following works great when mapped to a button - that is to say that if I turn the mic on and off with a button, the booth is muted while i'm talking, and returns to it's pre-set level once I press the button again to turn the mic off. The problem is that it doesn't work when assigned to either a fader or a dial (same thing I guess in terms of how Virtual DJ process them)

The following script is assigned to my booth volume control:
set "$boothvol" & mic off ? booth_volume : nothing

The following script works as I would expect when assigned to a button for Mic on / off
mic ? get_var "$boothvol" & param_cast & booth_volume & mic off : booth_volume 0 & mic on

However, the following doesn't work when assigned to a fader or knob - it doesn't restore the Booth volume and you have to manually re-engage the booth output once the mic has been switched off by moving the fader to 0 by moving the booth volume up or down momentarily:
param_equal 0 ? get_var "$boothvol" & param_cast & booth_volume & mic off : mic_volume & booth_volume 0 & mic on

It seems that the $boothvol parameter is getting lost - presumably because I'm dealing with the parameter value of the fader at the same time - if I change the script thus:
param_equal 0 ? booth_volume 100 & mic off : mic_volume & booth_volume 0 & mic on
Then the booth output mutes correctly, and but somes on at 100% volume rather than at the pre-set level.

Is this a syntax error by me, is there a workaround - or is this something that can be fixed.

Thanks for looking!
Pete
 

Posted Sat 02 May 20 @ 1:53 am
locoDogPRO InfinityModeratorMember since 2013
That implicit can be impossible to dodge, if you're on windows maybe a virtualfx might do.
 

Posted Sat 02 May 20 @ 2:03 am
locodog wrote :
That implicit can be impossible to dodge, if you're on windows maybe a virtualfx might do.


I think it is certainly implicitly consuming the parameter value of the fader - I've thrown get_var to the screen and it has the value of $boothvol correctly set - it's the binding that's setting it to the value of the fader - which will be zero by nature of the script.

There's an argument that this is a bug though - since the documentation states that the param_cast should deal with the result of the last query.

I am indeed on windows - what are the virtualfx which you mention

Thanks for coming back so quickly

Pete


 

Posted Sat 02 May 20 @ 2:10 am
I've just downloaded virtualfx - will have a look to see if I can solve it this way too - thanks again
 

Posted Sat 02 May 20 @ 2:16 am
locoDogPRO InfinityModeratorMember since 2013
virtualfx will disconnect the implicit from the script, so it should work out [and that's another use for virtualfx I didn't think of when making it]
 

Posted Sat 02 May 20 @ 2:19 am
locodog wrote :
virtualfx will disconnect the implicit from the script, so it should work out [and that's another use for virtualfx I didn't think of when making it]


Yes, that's worked - I assigned a similar script to the one I posted initially to the first slider of a copy of VirtualFX called "FadeMic", and I've just assigned the fader I want to use on the controller to activate that effect and manipulate fader 1.

Thanks for providing a great DIY add on which really increases what's possible in VirtualDJ
 

Posted Mon 04 May 20 @ 12:59 am
NicotuxHome userMember since 2014
this bug is incredible
everything was working until last year

here is a workaround ^^ (does not work in relative)
mic_volume & nothing & param_equal 0 ? param_cast absolute & param_add 0 "get_var $boothvol" && booth_volume && mic_off : booth_volume 0 && mic on && mic_volume

but this one does !!
mic_volume & nothing & param_bigger 0 ? booth_volume 0 && mic on && mic_volume : param_cast absolute & param_add 0 "get_var $boothvol" && booth_volume && mic_off

 

Posted Mon 04 May 20 @ 4:14 am


(Old topics and forums are automatically closed)