Hi Guys,
I recently bought a D&R Airence mixer and I'm trying to make a HID mapper for it to control the Play/Pause buttons in VDJ7.
I've read a lot about it, I understand most of the things, but one thing I can't sort out and that's the value of the button bit in this line:
<button bit="25" deck="1" name="PLAY" />
The manufacturer of the mixer has made an info sheet about HID mapping, where I found this:
With this information, what would be the value of the bit for the play buttons for 4 deck's?
Thanks for helping me :)
I recently bought a D&R Airence mixer and I'm trying to make a HID mapper for it to control the Play/Pause buttons in VDJ7.
I've read a lot about it, I understand most of the things, but one thing I can't sort out and that's the value of the button bit in this line:
<button bit="25" deck="1" name="PLAY" />
The manufacturer of the mixer has made an info sheet about HID mapping, where I found this:
With this information, what would be the value of the bit for the play buttons for 4 deck's?
Thanks for helping me :)
Posted Wed 30 Sep 15 @ 7:58 pm
Just remember that 1 byte=8 bits
So, bit="25" means:
25/8=3.125
We round the value and get the 3rd byte
Then, we multiply the number of bytes with 8 bits per byte (3*8=24) and we calculate the difference (25-24) which is 1
In other words, bit="25" means 3rd byte, bit 1
Now, the opposite way : for button USB1 ON, according to the above sheet it's 6th byte, bit 1
We have 6*8=48 + 1 = 49
So it would be bit="49"
USB2 ON is 6th byte, bit 4
6*8+4=52, so it's bit="52"
USB3 ON is 7th byte, bit 1
7*8+1=57, so it's bit="57"
And finally USB4 ON should be bit="60"
Please take a look here as well for more info about HID in version 7:
http://www.virtualdj.com/wiki/ControllerDefinitionHID.html
So, bit="25" means:
25/8=3.125
We round the value and get the 3rd byte
Then, we multiply the number of bytes with 8 bits per byte (3*8=24) and we calculate the difference (25-24) which is 1
In other words, bit="25" means 3rd byte, bit 1
Now, the opposite way : for button USB1 ON, according to the above sheet it's 6th byte, bit 1
We have 6*8=48 + 1 = 49
So it would be bit="49"
USB2 ON is 6th byte, bit 4
6*8+4=52, so it's bit="52"
USB3 ON is 7th byte, bit 1
7*8+1=57, so it's bit="57"
And finally USB4 ON should be bit="60"
Please take a look here as well for more info about HID in version 7:
http://www.virtualdj.com/wiki/ControllerDefinitionHID.html
Posted Wed 30 Sep 15 @ 11:44 pm
Ah great Phantom, thank you for this explanation!
Now that I have fixed this, this are my Device and Mapper xml pages:
<?xml version="1.0" encoding="UTF-8"?>
<device name="airence" author="CeesK" type="HID" decks="3" vid="0x03EB" pid="0x2402" reportsize "32">
<page type="in">
<button bit="49" deck="1" name="PLAY"/>
<button bit="52" deck="2" name="PLAY"/>
<button bit="57" deck="3" name="PLAY"/>
</page>
</device
and the mapper:
<?xml version="1.0" encoding="UTF-8"?>
<mapper device="airence" author="CeesK" description="airence" version="746" date="28/09/2015">
<map value="PLAY" action="play"/>
</mapper
But VDJ don't recognize it in the config. Of course I will have something wrong, but can't figure out what.
Can you tell me what i'm doing wrong?
Now that I have fixed this, this are my Device and Mapper xml pages:
<?xml version="1.0" encoding="UTF-8"?>
<device name="airence" author="CeesK" type="HID" decks="3" vid="0x03EB" pid="0x2402" reportsize "32">
<page type="in">
<button bit="49" deck="1" name="PLAY"/>
<button bit="52" deck="2" name="PLAY"/>
<button bit="57" deck="3" name="PLAY"/>
</page>
</device
and the mapper:
<?xml version="1.0" encoding="UTF-8"?>
<mapper device="airence" author="CeesK" description="airence" version="746" date="28/09/2015">
<map value="PLAY" action="play"/>
</mapper
But VDJ don't recognize it in the config. Of course I will have something wrong, but can't figure out what.
Can you tell me what i'm doing wrong?
Posted Thu 01 Oct 15 @ 4:29 pm
What do u mean by "not recognized in config" ?
do you get the device listed in the Controllers tab , but you dont get the mapping ? or something else ?
How are your files named and where are those placed ?
The only typo error i see if that both of your files are missing the last > character, but this is probably a copy-paste issue.
Description="" should be in the definition file not in the mapping file btw.
Try to see how and if the unit is detected and recorded in the Log Report.txt file. Enable the setting CreateMidiLog and post here the content of the generated file in /Documents/VirtualDJ folder
do you get the device listed in the Controllers tab , but you dont get the mapping ? or something else ?
How are your files named and where are those placed ?
The only typo error i see if that both of your files are missing the last > character, but this is probably a copy-paste issue.
Description="" should be in the definition file not in the mapping file btw.
Try to see how and if the unit is detected and recorded in the Log Report.txt file. Enable the setting CreateMidiLog and post here the content of the generated file in /Documents/VirtualDJ folder
Posted Thu 01 Oct 15 @ 9:09 pm
Also check this:
<device name="airence" author="CeesK" type="HID" decks="3" vid="0x03EB" pid="0x2402" reportsize="32">
<device name="airence" author="CeesK" type="HID" decks="3" vid="0x03EB" pid="0x2402" reportsize="32">
Posted Fri 02 Oct 15 @ 5:39 am
Maybe because when the Faders Start button is enabled, the Volume Fader automatically sends 2 things (1:Volume fader position and 2: a START/PLAY msg) ?
I suppose you are using something like this http://www.virtualdj.com/download/hidtrace.exe to see whats triggered and whats not , right ?
Some Tips:
- Better use hexadecimal values e.g. "0x39" instead of "57" . It will be easier to get the values from HidTrace that way.
- Try this format ..
<button name="PLAY" deck="1" bit="0x3C"/>
<button name="PLAY" deck="2" bit="0x39"/>
<button name="PLAY" deck="3" bit="0x31"/>
and
<map value="PLAY" action="play_pause" />
I suppose you are using something like this http://www.virtualdj.com/download/hidtrace.exe to see whats triggered and whats not , right ?
Some Tips:
- Better use hexadecimal values e.g. "0x39" instead of "57" . It will be easier to get the values from HidTrace that way.
- Try this format ..
<button name="PLAY" deck="1" bit="0x3C"/>
<button name="PLAY" deck="2" bit="0x39"/>
<button name="PLAY" deck="3" bit="0x31"/>
and
<map value="PLAY" action="play_pause" />
Posted Wed 07 Oct 15 @ 9:46 pm