Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: MIDI mapping

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

Hello!

I start to create MIDI Mapper, but I can not find it in in device list
<device name="Behringer.CMD.DC-1" author="Dj Johny" description="Behringer.CMD.DC-1 (Johny)" version="1" type="MIDI" vid="0x1397" pid="0x00c4" padColumns="4" padRows="4">


 

Posted Wed 09 Aug 17 @ 1:33 pm
You will need to have a Pro licence or subscription as your mapping will only work for 10 minutes at a time without this.
 

Posted Wed 09 Aug 17 @ 2:20 pm
Also the CMD DC-1 is already natively mapped in VDJ

So if you get a license to use VDJ with controllers, it'll probably be easier to change the mapping that is already included in the software to suit your needs
 

Posted Wed 09 Aug 17 @ 2:50 pm
!!!! First, personal I Don't have virtual dj, I help to my friend creat mapper his wishes
Second Virtual Dj mapper not so funcional
Thirdly remap is not possible, because all knobs is gruped in 2 groups, and not posible to add command to each knob. Same is with some buttons
 

Posted Wed 09 Aug 17 @ 4:06 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
in order to bypass the built-n definition of a device, and your own custom definition to take-over, you need to rename the definition as force-name.xml

If its only the key separation issue, then there is really no reason to build your own definition.
You can always use action_deck x ? or device_side 'left' ? queries in the mapping.
E.g. for a 4 decks device you can have ..
action_deck 1 ? action for the button on deck 1 : action_deck 2 ? action_for_deck2 : action_deck 3 ? action_for_deck3 : action_for_deck4
or if its a dual-deck (2 sides) unit..
device_side 'left' ? action_for_left_deck : action_for_right_deck

E.g. for an encoder present on both sides with the same Key name...
device_side 'left' ? deck master video_fx_select : video_transition_select

Left side encoder will select the Master Video FX and the right-side encoder will select the Video Transition.
 

Posted Thu 10 Aug 17 @ 7:37 am
Yes I understood that, if following controller use for fx and etc, then is working
But my friend want to use the following controller for sampler and now is a problem.
Because his want use knobs seperatly for each sampler slot volume
And next small 8 buttons, for selecting witch sampler slot volume is controled by knob

following controller has 8 knobs
and 16 big pad buttons, he want adjust volume for each slot seperatly
normaly knobs 1 - 8 for slots 1 - 8
if small buttons is selected
then knobs is for slots 9 - 16
If I understud correctly, sampler doesn't device sides or deck ? etc.
if some body has other way how to do it without writing new mapper ok

p.s. sorry about my english
 

Posted Thu 10 Aug 17 @ 5:07 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
TOP_BTN
action_deck 1 ? toggle '$sam_mode1' : action_deck 2 ? toggle '$sam_mode2' : action_deck 3 ? toggle '$sam_mode3' : toggle '$sam_mode4'
BTM_BTN1
toggle '$sam_mode5'
BTM_BTN2
toggle '$sam_mode6'
BTM_BTN3
toggle '$sam_mode7'
BTM_BTN4
toggle '$sam_mode8'


TOP_KNB
action_deck 1 ? var '$sam_mode1' ? sampler_volume_nogroup 9 : sampler_volume_nogroup 1 : action_deck 2 ? var '$sam_mode2' ? sampler_volume_nogroup 10 : sampler_volume_nogroup 2 : action_deck 3 ? var '$sam_mode3' ? sampler_volume_nogroup 11 : sampler_volume_nogroup 3 : var '$sam_mode4' ? sampler_volume_nogroup 12 : sampler_volume_nogroup 4

BTM_KNB
action_deck 1 ? var '$sam_mode5' ? sampler_volume_nogroup 13 : sampler_volume_nogroup 5 : action_deck 2 ? var '$sam_mode6' ? sampler_volume_nogroup 14 : sampler_volume_nogroup 6 : action_deck 3 ? var '$sam_mode7' ? sampler_volume_nogroup 15 : sampler_volume_nogroup 7 : var '$sam_mode8' ? sampler_volume_nogroup 16 : sampler_volume_nogroup 8

Un-tested
 

Posted Thu 10 Aug 17 @ 5:13 pm
ok thank you, but stupid question
why action dack 1 ? etc ?
 

Posted Thu 10 Aug 17 @ 5:26 pm
and what mean command, $sam_mode I don't found it :(.
 

Posted Thu 10 Aug 17 @ 5:30 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
When 2 or more buttons are defined with the same "name" but with different "deck" in the definition, then a single Key is offered in mapping. In this case you can tell from which assigned "deck" the Key is pressed, using the verb action_deck x

$sam_modex is just the name of the variables that i used in my code to set a different action for the knob depending the status of the small buttons.
The names of the variables can be anything of course.
 

Posted Thu 10 Aug 17 @ 5:30 pm
hmm that I understood, but sampler not defined for decks, sampler it is bay self
So I asked about action_deck
 

Posted Thu 10 Aug 17 @ 5:35 pm
I test it, it's working, thakn you, but I be wont understood, please explane that

The relationship between sampler and action_dack
 

Posted Thu 10 Aug 17 @ 5:43 pm
djdad wrote :
When 2 or more buttons are defined with the same "name" but with different "deck" in the definition, then a single Key is offered in mapping. In this case you can tell from which assigned "deck" the Key is pressed, using the verb action_deck x

$sam_modex is just the name of the variables that i used in my code to set a different action for the knob depending the status of the small buttons.
The names of the variables can be anything of course.


Can you please elaborate on why the CMD device definition was created like this? Coming from a background of mapping individual buttons with simple script it seems this way of defining the "deck" inside the definition file creates a more complicated script needed to utilize all the buttons.
The issues I found trying to map my controller seems to be exactly what you have described here. How are we to know the definition is configured this way without beefing about to actually "see" the device xml file.?

I understand the script you provided for the OP but in order for me to grasp HOW I can map those multi scripts to a single button and have it do the things I want, I'm trying to wrap my head around WHY not just have ALL the controls and LED mappings listed. In short, why the need to program complicated scripting commands on a single line instead of the usual "touch a control, map it" individually. Please advise.
 

Posted Sat 24 Feb 18 @ 5:04 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
When we map a device that usually comes with something different than VirtualDJ, we always try to offer an approach as closer as its default one, so that when a user tries VirtualDJ with this controller , to get more or less the same functionality as with the bundled software.

This particular unit was supposed to offer functionality for 4 decks (ability to load 4 decks with a track), Effects on 4 decks etc but with the Sampler acting as global (same as VDJ).
The definition is created based on what we need to offer as functionality, so the decks that the unit is supposed to control are included in the definition.

Why do we do this ? Simple answer, for mapping simplicity. Even though this sounds a bit strange for what you are after, for the majority who wish to replace a simple script with another simple script will be easier.
Example: keep the 4 decks functionality but instead of a series of knobs to adjust the Effect parameter, to adjust Filter. In this case you replace the simple script .. effect_slider 1 with another simple script .. filter and you do this just once and affects all 4 knobs on all 4 decks. If the deck was not defined, and the 4 knobs were having different names like knob1, knob2,..etc, you would have to repeat the above mapping 4 times !

When it comes to changing the way a controller works (the idea behind the default mapping) and e.g. you would want to use that device to control just 2 decks or just the active one, and assign different actions to the 4 different keys, then yes, it sounds a bit complicated for some, but if you get there, means that you already exploring VDJ into the deep parts and probably can bare to add some more complex scripts.

How to know if a key has pre-defined deck ? Well, if the same Key name comes up in the Controllers tab when you turn/push different ones, it means that there is a deck assignment behind the scenes, and you could always look at the manual as well.. e.g. this page explains on the image that its defined as DECK 1,2,3,4
https://www.virtualdj.com/manuals/hardware/behringer/cmddc1/effects.html

With "4 Deck" mappings, you need to use action_deck x , to query from which Key the trigger comes. For "2-Decks" controllers, best is to use device_side 'left|right' to query the left/right side trigger.
So if a key is defined as effect_slider 1 for 4 Decks and you wish to change the action on all 4 of them, you need something like...
action_deck 1 ? deck x dothis : action_deck 2 ? deck x dothis : action_deck 3 ? deck x dothis : deck x dothis

The whole idea on how we define and map devices is an internal decision, that in most of the cases offers an easy way for the users to customize it.
There will be special cases where the non-deck-definition could be more suitable, but thats not serving the majority of users.
 

Posted Mon 26 Feb 18 @ 12:32 am


(Old topics and forums are automatically closed)