Accesso rapido:  

Forum: VirtualDJ Technical Support

Topic: Controller definition problem
ttiasPRO SubscriberMember since 2014
I´m building my own controller and are having some problem with the controller definition and/or mapping file.

VirtualDJ identifies the controller and show the mappings I have configured but when I press buttons and move sliders nothings happens.
If I don´t use the controller definition file I can create a custom mapping for it and it works just fine so the problem is probably somewhere in my files.

I´ve stripped the files to the bare minimum just to see if I can get it to work.

Controller definition:
<device name="BCNTRL" author="Mattias" description="BCNTRL" version="800" type="MIDI" vid="0x03eb" pid="0x2048" decks="2" />
<button cc="0x12" value="0x7F" off="0x00" name="B_PLAY1" />
<button cc="0x18" value="0x7F" off="0x00" name="B_PLAY2" />
<slider cc="0x01" name="SLIDER-M0" min="0x00" max="0x7F"/>
</device>

Mapping file:
<mapper device="BCNTRL">
<map value="SLIDER-M0" action="deck 1 level" />
<map value="B_PLAY1" action="deck 1 play" />
<map value="B_PLAY2" action="deck 1 play" />
</mapper>

If anyone knows what I´m doing wrong or have any tips I would be thankful.
 

Inviato Tue 02 May 23 @ 8:21 pm
You didn't define a MIDI channel for your buttons / slider
Also (assuming that messages come on channel 0) I would transform definition like this:
<?xml version="1.0" encoding="UTF-8"?>
<device name="BCNTRL" author="Mattias" description="BCNTRL" version="800" type="MIDI" vid="0x03EB" pid="0x2048" decks="2">
<button cc="0x12" channel="0" deck="1" name="PLAY" />
<button cc="0x18" channel="0" deck="2" name="PLAY" />
<slider cc="0x01" channel="0" deck="1" name="VOLUME"/>
</device>

So, I would add the midi channel, and I would remove default values as it's easier and cleaner to see the definition code and spot any issues.
Also I would bind similar keys together (as shown above)
Then on the mapper side you won't need to add "deck X" in front of your actions.
You just have to type what you want the button(s) to do and the deck will come from the definition
 

Inviato Tue 02 May 23 @ 10:16 pm
ttiasPRO SubscriberMember since 2014
I´ve tried your suggestion but still no luck. I´ve also tested to remove the mapping file and to make a custom mapping but still no response from the controller.

I have 2 things that I´m thinking might be the problem.
1: Is the version still supposed to be "version="800"" in the device section?
2: Is channel 0 the same as channel 1 ie channels are numbered 0-15 instead of 1-16?

Thanks
 

Inviato Wed 03 May 23 @ 5:26 am
locoDogPRO InfinityModeratorMember since 2013
2 yes zero indexed, 0-15
1 I think so
 

Inviato Wed 03 May 23 @ 5:50 am
For simple definitions it doesn't really matter if version=800 or if it's a greater number.
It simply tells VirtualDJ the minimum version that this device can be used at.
So, for simple devices, version=800 is ok.

Also yes channels are zero index based (0-15) so basically it's the same as it will appear on a MIDI monitor.
If you use MIDI OX for instance to monitor a controller you should see something like 90 15 7F
The second digit (0) is the MIDI channel (zero)

PS: Are you sure that your buttons send cc messages and not MIDI note messages ?
85-90% of the time controllers will send note on/off messages for buttons, not Controller Change (cc)
Please use a MIDI monitor, press a button and watch the message.
If it's something like 90 15 7F followed by 80 15 00 when you release the button, then that's a NOTE on/off message.
If it's something like B0 15 7F followed by B0 15 00, then indeed that's a control change message.

Finally just in case you're following some documentation and you haven't taken that into account:
MIDI notes / CCs are HEX.
So, if your documentation gives you values in decimal format, make sure to convert it to HEX
Decimal 12 becomes 0x0C and decimal 18 becomes 0x12
 

Inviato Wed 03 May 23 @ 8:09 am
ttiasPRO SubscriberMember since 2014
I finally managed to figure out what I was doing wrong. The " / " at the end of this line is not supposed to be there, when I removed it the buttons work.
<device name="BCNTRL" author="Mattias" description="BCNTRL" version="800" type="MIDI" vid="0x03EB" pid="0x2048" decks="2" />

Thanks for the help, it was really helpful to rule out some stuff and to verify the things I wasn´t sure about.
 

Inviato Wed 03 May 23 @ 7:28 pm