Entra:     


Forum: VirtualDJ Technical Support

Topic: Scripting Question
So I have a MC-7000 controller and am messing around with slightly modifying some of the functions on it. That part of my task has gone well. While tooling around in the settings, I ran across what I guess is a "script" to sort by BPM, and to reverse sort if pushed twice. Here is the script I found:
browser_sort '+bpm' ? true : browser_sort '-bpm' ? true : false


So it occurred to me to use the same script for one of the custom pad functions....but when I make this the script for a pad, it doesn't work. So I'm kind of curious as to why this works with basically a button press on my controller, but not as a pad. I don't really need the script to work on a pad(although that might be useful at some point), just why it doesn't work....
 

Inviato 6 days ago @ 6:08 pm
you pulled a LED script, if sorted by bpm either ascending or descending led on : led off
you want
browser_sort bpm
 

As ALWAYS. Thank you. I can't tell you nice it is to get answers to questions by someone who actually knows the answers. Not the case with other DJ Software.

So the LED scripts need to be formatted differently than scripts for pads, right? I actually had the pad sort script working, so I'm good.

On a similar controller related question, there are 4 buttons that I don't use on the MC-7000. In the main controller editor, it appears that there are only 2 functions and the other 2 mirror the 1st two.

So in an effort to find out what was going on, I found a small app that will show you what MIDI commands are coming in via USB. All 4 buttons are different "notes". With this tiny Midi app running, in the Controller Options, I see a pane for "MIDI View". As I press the 4 buttons, what comes up in the MDI app is "8Button5". "8Button6".... all the way to 8. So I managed to do some minor scripting for the 4 buttons, and I'm a happy camper. But these names: 8Button5, do NOT show up in the main editor for my controller.

In order for this to work, this small MIDI app needs to be running. I've looked at VDJ Extensions to see if there is something that might do the same, but the 2 that I tried when searching for MIDI, didn't do the trick.

I don't see anything in the Options concerning MIDI, but am now guessing none show up unless another device that uses MIDI is connected to the computer.

it's not really a problem to run this tiny app in the background, and in my learning curve, the functions I've just added to these 4 buttons are already custom pad functions anyway. But am curious if there is a way to get VDJ to recognize the incoming MIDI commands without this little app running...
 

You shouldn't need an extra app, what buttons are they on the HW?
 

On the MC-7000, they are the 4 buttons to the right side of the FX controls... just labeled on the controller as "Assign", and numbered 1 thru 4.. I'm assuming they were designed to do something with the FX, but I haven't been able to figure out what, even after looking at the documentation. Regardless, I don't use FX much so even if they do something useful, they aren't useful for me.

And FYI, when I press them with the Controller Editor, all 4 buttons on the LEFT side show up in the Activity Window as "FX1_Assign", and on the right, all 4 as "FX2_Assign". No doubt there is some higher level function they do, but I haven't been able to "Assign" anything with them, which is why editing them to do something else seemed like a good idea.

And FYI, in the Midi Input app, Button #1 on both sides shows input as F-2, button #2 shows as input F#-2, Button 3 shows up as G-2, and button 4 as G#-2. So I'm guessing both sides send the exact same MIDI into back into VDJ, but my grasp of MIDI isn't the best.....
 

Same midi note but a different channel.
The buttons can be mapped like this
FX 1 Assign
action_deck 1 ? script for button 1 : action_deck 2 ? script for button 2 : action_deck 3 ? script for button 3 : script for button 4

Although these buttons have a default deck attached to them [without having to be mentioned] so if you want something tied to a specific deck other than the one the query implied, you'll need to state it

action_deck 1 ? script for button 1[deck 1 is implied here] : action_deck 2 ? script for button 2[deck 2 is implied here] : action_deck 3 ? [deck 3 is implied here, let's over rule that ] deck 1 script for button 3 : [process of elimination, must be deck 4 implied]script for button 4
 

"...Same midi note but a different channel..."

Yes, now I see that in the little MIDI app. And this would explain why I had to copy and paste my scripts for both the left and right side buttons in the MidiView pane. And I think I can see a way forward to just change the internal / built-in scripts for these buttons in the Controller Editor.

As always... THANKS