登录:     


Forum: Old versions

Topic: Question about Controllers Definitions

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

Hello, good evening. This is my 1st post. Well, I'm not a DJ at the moment, but with friends we do a mini enterprise of sound and lighting productions. I dedicate myself to the microcontroller and automation, so for now I have designed the lighting.
Now, on to the topic itself. Since I have a couple of old hard disks, intended to use the encoder to operate the VDJ by PIC. But that's for later.
Im testing on VirtualDJ trial, so I can test if it works. If it works, I will buy vdj.

I am emulating a USB device (HID) on Windows XP. This device sends 64 bytes of data (a "page") when there is any event in the device (for now there is one, to try: a button). In the tool that us provide (hidtrace) shows the device, as well appears the data I wanted to send. Bone up to now the Hardware works great, and the system takes it well.
Well, continuing, I made a driver definition file XML, to call him "mydev.xml" and that "My Documents\Virtual DJ\Devices." The content is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<device name="DJC" author="ME" type="HID" decks="2" vid="0xc0c0" pid="0xdee1" reportsize="64">

<page type="in">
<button byte="1" name="Play" deck="1" />
</page>

</device>

This is all right, the VID (vendor ID) and PID (product ID) in accordance with the device firmware.

Now the issue within the Virtual DJ, Mappers tab only appears Keyboard. Then, in the menu, that appears when clicking on the button, ticking everything except "Show only connected devices" (to see if there is no device), more names appeared, but nowhere appeared the name "DJC" (as specified in the XML file before). I got sick of clicking on "Rescan for new devices", but no case.

I hope I can get a hand.

Greetings!
 

发表时间 Tue 21 Sep 10 @ 7:59 pm
You will also need to make an initial mapping to go with it, e.g:

<?xml version="1.0" encoding="UTF-8"?>
<mapper device="DJC" author="Your Name" description="My DJ Controller" version="612" date="22/09/2010">
<map value="Play" action="play_pause" />
</mapper>


Copy this to My Documents\VirtualDJ\Mappers
 

Ok, I've made that. Now it appears. Thanks!
 

Well, after some edition of the XML of Mapper and Device, I've tested it. VDJ show that my device is plugged in. But I can't get any event from it. In hidtrace, I got this:

Page: 0

0 1 2 3 4 5 6 7 8 9 A B C D E F
_________________________________________________
0| FF 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
3| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


01234567 89ABCDEF
__________________
0| 11111111 00000001
1| 00000000 00000000
2| 00000000 00000000
3| 00000000 00000000
4| 00000000 00000000
5| 00000000 00000000
6| 00000000 00000000
7| 00000000 00000000
8| 00000000 00000000
9| 00000000 00000000
A| 00000000 00000000
B| 00000000 00000000
C| 00000000 00000000
D| 00000000 00000000
E| 00000000 00000000
F| 00000000 00000000
10| 00000000 00000000
11| 00000000 00000000
12| 00000000 00000000
13| 00000000 00000000
14| 00000000 00000000
15| 00000000 00000000
16| 00000000 00000000
17| 00000000 00000000
18| 00000000 00000000


Actually, the byte 1 is inverted. That is my button. The FF byte is like a test, just to see the order of bytes.
So, in my device xml i've added some test lines, to check what triggers:

<button byte="0" name="Byte0" inverted="1" />
<button byte="1" name="Byte1" inverted="1" />
<button byte="2" name="Byte2" inverted="1" />

But, as I said, nothing happends.
Thanks!
 



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