快速登录:  

Forum: General Discussion

话题: Scripting question

由于该帖子已年深日久,可能包含陈旧过时或描述错误的信息。

I am mapping my Numark Dj2go2. Trying to alternate my channel level knobs between level and gain while pressing shift. The way I want it to work is the knob is set for level by default, and gain when shift is pressed. The script is have is:

GAIN
volume & variables '$hift'? gain : level : nothing

The problem I'm having is that with shift pressed, both the gain AND level controls are affected at the same time. Meaning they both go up/down together. How do I separate the two so that only the gain is affected while pressing shift?

Having the same problem with my cue level knob. I want the shift to control cue mix. I have it scripted like this:

HEADPHONES_VOLUME

headphone_volume & var '$hift'? headphone_mix : headphonevolume

Same thing happens here, both parameters move when shift is pressed.

Any help would be greatly appreciated!
 

发表时间 Thu 15 Feb 18 @ 9:28 pm
I forgot to add:

I am running Windows 10 on a Sony Vaio

And changed the SYNC buttons to SHIFT
 

发表时间 Thu 15 Feb 18 @ 9:33 pm
locoDogPRO InfinityModeratorMember since 2013
GAIN
var '$hift' ? gain : level : nothing

HEADPHONES_VOLUME

var '$hift' ? headphone_mix : headphone_volume

These should work, look at yours, look at mine and consider why you got the results you did.

Script does what you ask, and you asked,
control level and then if shift is pressed control gain, if shift isn't pressed control level.
 

发表时间 Thu 15 Feb 18 @ 9:45 pm
Awesome! That worked! I understand why now. I'm new to scripting. Your explanation makes sense!

Thank you for your help!
 

发表时间 Thu 15 Feb 18 @ 10:19 pm
locoDogPRO InfinityModeratorMember since 2013
No worries, I'll usually help if folk take a stab at script.
 

发表时间 Thu 15 Feb 18 @ 11:29 pm
PachNPRO InfinityMember since 2009
locodog wrote :
GAIN
var '$hift' ? gain : level : nothing



I believe the last " : nothing" is never reached and can be omitted. It's doing nothing anyway.
 

发表时间 Fri 16 Feb 18 @ 8:15 am
locoDogPRO InfinityModeratorMember since 2013
Correct, I just copy pasted.
 

发表时间 Sat 17 Feb 18 @ 8:00 am


(陈旧帖子或论坛版块会自动关闭)