Sign In:     


Forum: VirtualDJ Technical Support

Topic: I am developing a Hardware HID that works by spitting out X and Y that should work like DVS
Im developing a HID that is an optical DJ cartridge and I have got it working with Virtual DJ to playback audio like DVS but my device only spits out Xdelta and Ydelta. I have a correct device xml and mapper xml but I want the cue points to work just like they do with DVS. At the moment when im playing back audio using my optical cartridge the cue points when pushed jump to cue point but start playing at default playback speed not the speed of my X delta?

Please help below are my xml files that work

device
<?xml version="1.0" encoding="UTF-8"?>
<device
name="Optical_DJ"
author="Nik"
description="Optical DJ Cartridge"
version="800"
type="HID"
vid="0x22D4"
pid="0x1702"
reportsize="4"
decks="2"
image="Optical_DJ.png">

<page type="in">
<encoder name="XDelta" byte="0" size="word" signed="true" />
<encoder name="YDelta" byte="2" size="word" signed="true" />
</page>

</device>

<?xml version="1.0" encoding="UTF-8"?>
<mapper device="Optical_DJ" name="Optical DJ Mapper Dual Decks" author="Nik">

<!-- Left HID → Deck 1 -->
<map value="XDelta" device_instance="1" action="param_multiply 1 & deck 1 scratchwheel" />
<map value="ONINIT" device_instance="1" action="deck 1 scratch 1" />

<!-- Right HID → Deck 2 -->
<map value="XDelta" device_instance="2" action="param_multiply 1 & deck 2 scratchwheel" />
<map value="ONINIT" device_instance="2" action="deck 2 scratch 1" />

<!-- YDelta left unmapped (assignable inside VirtualDJ if needed) -->

</mapper>


Hope this helps?
 

Posted Fri 27 Mar 26 @ 4:31 pm
"scratchwheel" is not vdj script, where did you find that?
"device_instance" is also not a parameter in a vdj mapper, where did you find that?

Also not sure what you meant to achieve with the ONINT?
"scratch" does perform a small scratch if used with a relative parameter, but it seems strange to want to do a small scratch whenever your controller is connected
 

I used chat GPT thanks for letting me know what should I use?
 

LLM's don't know much about VDJ script.

You can read the documentation here:
https://virtualdj.com/wiki/Developers

And the custom button editor or midi mapper inside vdj also offers some more information about the available vdj script actions.
 

I see my device is creating a small scratch when motion stops I have tried to stop it but not sure how?
 

Thank you for your help
 

For jog wheels or similar, the vdj script you want to look into is jogwheel
If you also have a touch sensor to start/stop scratching, touchwheel and touchwheel_touch can be used as well.
 

Thank you I can't get jogwheel to move the audio only scratchwheel works
 

my device just spits out Xdelta and Ydelta it has no buttons its quite simple but I have no touch input or output.
 

I have it working with jogwheel now thank you. I will keep working on it.
 

We are getting a Motion burst as the audio slows to a stop there is a little burst of audio backwards or forwards. is this because it's 16bit could be better if 8bit?

Is it because we are sending data even when stopped?
 

This is my mapper
<!-- Left HID → Deck 1 -->
<map value="XDelta" action="param_multiply 0.000004 & deck 1 jogwheel" />

<!-- Right HID → Deck 2 -->
<map value="XDelta" action="param_multiply 0.000004 & deck 2 jogwheel" />

 

Adion please could you tell me why the cue points no longer work when using my HID. The cue points still jump to their respective points but they no longer play. They just jump to that point and stop playing. I need my optical dj cartridge to work like DVS. Thank you for your help.