Anmelden:     


Forum: VirtualDJ Plugins

Topic: Mapping the XONE:PX5 Mixer
Hi, I am writing a definition file for the Xone:PX5. First goal was just to map the faders using simple midi to have visual feedback on VirtualDJ mixer section (fake_mixer mode), but then I went on writing a proper definition file. Long term goal is to add definitions for two K2s in chained XLINK mode.

I have a working definition file, complete with audio section, however I have two problems.

First one is only cosmetic, the FX send switch on each channel is really a 3 states toggle (Internal / Dual / External), only in midi it is represented by two NoteOn/Off values depending on the direction of the switch, so the neutral position can send two different NoteOff values. I wondered if there was trick to represent a FX_DUAL key corresponding to the neutral position (I know the VDJPedia doc is not complete, since we can often see special KEYs in controller mapping files :) ).

Second one is real: I don't know how to properly define a multi valued toggle. In the FX section of the mixer there is a selector to assign the FX unit to a channel (or master, or send), a bit similar to Pioneer mixers FX channel selector. For each position the mixer sends one midi cc message with the same cc command (0x06) and a different value at each position (from 0 to 127, in increments of 21 for 7 possible different positions/values). I don't know which element is the best suited in the definition file.


<device name="XONE:PX5" author="Marie-Chantal" description="ALLEN&amp;HEATH XONE:PX5" version="850" type="MIDI" vid="0x22F0" pid="0x0018" decks="4">
<audio description="ALLEN&amp;HEATH\nXONE:PX5" input="5" output="5" record="9,10" mixer="no" mic="no" vid="0x22F0" pid="0x0018" asio="XONE PX5 ASIO Driver" linein="4" outputChannels="3,4,5,6,1,2,7,8,9,10" inputChannels="3,4,5,6,1,2,7,8,9,10" />

<!-- Faders -->
<slider name="FADER" deck="3" cc="0x00" />
<slider name="FADER" deck="1" cc="0x01" />
<slider name="FADER" deck="2" cc="0x02" />
<slider name="FADER" deck="4" cc="0x03" />
<slider name="CROSSFADER" cc="0x04" />

<!-- Channel Cue -->
<button name="CUE" deck="3" note="0x11" />
<button name="CUE" deck="1" note="0x12" />
<button name="CUE" deck="2" note="0x13" />
<button name="CUE" deck="4" note="0x14" />
<button name="CUE_A" note="0x10" />
<button name="CUE_FX" note="0x26" />

<!-- Channel Filter -->
<button name="FILTER" deck="3" note="0x0B" />
<button name="FILTER" deck="1" note="0x0C" />
<button name="FILTER" deck="2" note="0x0D" />
<button name="FILTER" deck="4" note="0x0E" />
<button name="FILTER_A" note="0x0A" />
<button name="FILTER_EXT_RTN" note="0x0F" />

<!-- FX Select Switch -->
<toggle name="FX_INT" deck="3" note="0x02" />
<toggle name="FX_EXT" deck="3" note="0x03" />
<toggle name="FX_INT" deck="1" note="0x04" />
<toggle name="FX_EXT" deck="1" note="0x05" />
<toggle name="FX_INT" deck="2" note="0x06" />
<toggle name="FX_EXT" deck="2" note="0x07" />
<toggle name="FX_INT" deck="4" note="0x08" />
<toggle name="FX_EXT" deck="4" note="0x09" />
<toggle name="FX_INT_A" note="0x00" />
<toggle name="FX_EXT_A" note="0x01" />

<!-- XONE:FILTER -->
<button name="XONE_FILTER_HPF" note="0x15" />
<button name="XONE_FILTER_BPF" note="0x16" />
<button name="XONE_FILTER_LPF" note="0x17" />
<button name="XONE_FILTER_ON" note="0x18" />
<slider name="XONE_FILTER_FREQ" cc="0x05" />

<!-- XONE:FX -->
<toggle name="XONE_FX_SEND_PRE_POST" note="0x19" />
<toggle name="XONE_FX_CROSSFADER_ASSIGN_X" note="0x1A" />
<toggle name="XONE_FX_CROSSFADER_ASSIGN_Y" note="0x1B" />
<!-- Those won't really work as expected
<toggle name="XONE_FX_ASSIGN_A" cc="0x06" value="0x00" />
<toggle name="XONE_FX_ASSIGN_DECK_3" cc="0x06" value="0x15" />
<toggle name="XONE_FX_ASSIGN_DECK_1" cc="0x06" value="0x2A" />
<toggle name="XONE_FX_ASSIGN_DECK_2" cc="0x06" value="0x39" />
<toggle name="XONE_FX_ASSIGN_DECK_4" cc="0x06" value="0x54" />
<toggle name="XONE_FX_ASSIGN_MASTER" cc="0x06" value="0x69" />
<toggle name="XONE_FX_ASSIGN_SEND" cc="0x06" value="0x7F" />
-->
<button name="XONE_FX_TAP" note="0x24" />
<encoder name="XONE_FX_INTERVAL" cc="0x08" />
<slider name="XONE_FX_DECAY" cc="0x09" />
<slider name="XONE_FX_FOCUS" cc="0x0A" />
<slider name="XONE_FX_LEVEL" cc="0x0B" />
<button name="XONE_FX_ON" note="0x25" />

<!-- XONE:SYNC -->
<button name="XONE_SYNC_MODE" note="0x23" />
<button name="XONE_SYNC_BEAT_LEFT" note="0x1D" />
<button name="XONE_SYNC_BEAT_RIGHT" note="0x1E" />
<button name="XONE_SYNC_BEND_LEFT" note="0x1F" />
<button name="XONE_SYNC_BEND_RIGHT" note="0x20" />
<button name="XONE_SYNC_STOP" note="0x21" />
<button name="XONE_SYNC_PLAY" note="0x22" />
</device>
 

geposted 19 hours ago
<toggle cc="0x06" value="0x15" name="XONE_FX_ASSIGN_DECK_3" />
<toggle cc="0x06" value="0x2A" name="XONE_FX_ASSIGN_DECK_1" />
<toggle cc="0x06" value="0x39" name="XONE_FX_ASSIGN_DECK_2" />
<toggle cc="0x06" value="0x54" name="XONE_FX_ASSIGN_DECK_4" />
<toggle cc="0x06" value="0x69" name="XONE_FX_ASSIGN_DECK_M" />
<toggle cc="0x06" value="0x7F" name="XONE_FX_ASSIGN_DECK_S" />

These should work.
Note that you can't define "OFF" (cc=0x06 value=0x00) as a different element
Your mapping will need to deal with that, so that if all other fx assign switches are off, it can tell that XONE_FX_ASSIGN_A ??? is on.
OR: You can try these as well:
<button cc="0x06" value="0x00" name="XONE_FX_ASSIGN_A" />
<button cc="0x06" value="0x15" name="XONE_FX_ASSIGN_DECK_3" />
<button cc="0x06" value="0x2A" name="XONE_FX_ASSIGN_DECK_1" />
<button cc="0x06" value="0x39" name="XONE_FX_ASSIGN_DECK_2" />
<button cc="0x06" value="0x54" name="XONE_FX_ASSIGN_DECK_4" />
<button cc="0x06" value="0x69" name="XONE_FX_ASSIGN_DECK_M" />
<button cc="0x06" value="0x7F" name="XONE_FX_ASSIGN_DECK_S" />

It should work for most controllers despite the control being a toggle, on most cases.

As for the 3 state switcher, if it doesn't send 7F on some MIDI note on center, then you can't really do much.
So if it only sends 7F on left and right positions, you need to handle it via mapping (when both messages are off, middle is on)
The hack mentioned above (define <button cc="0xXX" value="0x00" name="XONE_FX_DUAL"/>) won't work because usually you get 0 from the side that sends 7F.
I mean that if "INTERNAL" is on (7F) and you go to the middle, you will get XONE_FX_INT to go to 0, but you will not get XONE_FX_EXT to go to zero (it's already 0)
Same applies for the other way. So, if you don't get ANY 7F message on the middle pos, you are "stuck" with dealing it on the mapper side

 

Notes :
1. Usually A&H mixers which support X-LINK have the MIDI Channel set o 16, so that MIDI messages coming from the K2 (on channels 15 to 12) don't conflict with the ones from the Mixer.
I assume you get Notes in form 9F nn xx and CC in form of BF nn xx, right ?

Even though the MIDI In (messages sent from device to VDJ) should work fine without a channel definition, you should add channel="15" (for VDJ, channels are 0 to 15, not 1 to 16) to all the Mixer keys in your definition, if you intend to add the Xone K2 for the X-LINK to work.

PS. Will send you the definition of the K2 to add to your PX5, so that you use the X-LINK with them and save a USB port.

2. I understand that you have used the Ch Order 3,1,2,4, so would be better to declare this in your definition in order to have an easy way for someone who wants 1,2,3,4.
You just need to add mixerorder="3124" to your <device> line and then add mixerorder="yes" to each one of the keys that should automatically change if a different mixerOrder is selected e.g. the VOL faders, EQ knobs, PFL etc , but not Crossfader or other key not related to the Mixer Order.

3. One thing that A&H mixers usually miss from their MIDI firmware - and doubt if PX5 is an exception - is a way to get the positions of the faders, knobs and switchers when the DJ software is connected. Usually MIDI devices offer some Note/CC/SysEx that software can send on startup and get a reply from the device with the current values/positions of those keys.
If this is the case with PX5 - can't find any MIDI datasheet, then once you start VDJ, the faders positions will not match, and probably other more critical, like Source switches, FX mode etc. Keep that in mind ;)
You could check that in Traktor - i believe there is an "official" mapping - and see if the Mixer faders get reported in the software or don't match each other on startup and without moving any fader or switch.

4. I would change the <audio> line and declare 4 outs and 4 ins without linein="", so ...
  <audio description="ALLEN&HEATH\nXONE:PX5" input="4" output="4" record="9,10" mixer="no" mic="no" vid="0x22F0" pid="0x0018" asio="XONE PX5 ASIO Driver" outputChannels="3,4,5,6,1,2,7,8" inputChannels="3,4,5,6,1,2,7,8" />

You already have record="9,10" so with linein=5, VDJ would try to create 5 line inputs.
Also removed the linein="", so that Line Inputs are not auto-created, usually these inputs are meant to be used as DVS.
 

Thanks a lot (both of you)! I made the selector work by using buttons (toggles wouldn't work, even without the 0 one).

Here is the fixed version using both of your advice. Just as you told, it's like with the K2, the positions of the elements cannot be known on startup.


<device name="XONE:PX5" author="Marie-Chantal" description="ALLEN&amp;HEATH XONE:PX5" version="850" type="MIDI" vid="0x22F0" pid="0x0018" decks="4" mixerorder="3124">
<audio description="ALLEN&amp;HEATH\nXONE:PX5" input="4" output="4" record="9,10" mixer="no" mic="no" vid="0x22F0" pid="0x0018" asio="XONE PX5 ASIO Driver" outputChannels="3,4,5,6,1,2,7,8" inputChannels="3,4,5,6,1,2,7,8" />
<!-- Faders -->
<slider name="FADER" deck="3" cc="0x00" mixerorder="yes" channel="15" />
<slider name="FADER" deck="1" cc="0x01" mixerorder="yes" channel="15" />
<slider name="FADER" deck="2" cc="0x02" mixerorder="yes" channel="15" />
<slider name="FADER" deck="4" cc="0x03" mixerorder="yes" channel="15" />
<slider name="CROSSFADER" cc="0x04" />

<!-- Channel Cue -->
<button name="CUE" deck="3" note="0x11" mixerorder="yes" channel="15" />
<button name="CUE" deck="1" note="0x12" mixerorder="yes" channel="15" />
<button name="CUE" deck="2" note="0x13" mixerorder="yes" channel="15" />
<button name="CUE" deck="4" note="0x14" mixerorder="yes" channel="15" />
<button name="CUE_A" note="0x10" channel="15" />
<button name="CUE_FX" note="0x26" channel="15" />

<!-- Channel Filter -->
<button name="FILTER" deck="3" note="0x0B" mixerorder="yes" channel="15" />
<button name="FILTER" deck="1" note="0x0C" mixerorder="yes" channel="15" />
<button name="FILTER" deck="2" note="0x0D" mixerorder="yes" channel="15" />
<button name="FILTER" deck="4" note="0x0E" mixerorder="yes" channel="15" />
<button name="FILTER_A" note="0x0A" channel="15" />
<button name="FILTER_EXT_RTN" note="0x0F" channel="15" />

<!-- FX Select Switch -->
<toggle name="FX_INT" deck="3" note="0x02" mixerorder="yes" channel="15" />
<toggle name="FX_EXT" deck="3" note="0x03" mixerorder="yes" channel="15" />
<toggle name="FX_INT" deck="1" note="0x04" mixerorder="yes" channel="15" />
<toggle name="FX_EXT" deck="1" note="0x05" mixerorder="yes" channel="15" />
<toggle name="FX_INT" deck="2" note="0x06" mixerorder="yes" channel="15" />
<toggle name="FX_EXT" deck="2" note="0x07" mixerorder="yes" channel="15" />
<toggle name="FX_INT" deck="4" note="0x08" mixerorder="yes" channel="15" />
<toggle name="FX_EXT" deck="4" note="0x09" mixerorder="yes" channel="15" />
<toggle name="FX_INT_A" note="0x00" channel="15" />
<toggle name="FX_EXT_A" note="0x01" channel="15" />

<!-- XONE:FILTER -->
<button name="XONE_FILTER_HPF" note="0x15" channel="15" />
<button name="XONE_FILTER_BPF" note="0x16" channel="15" />
<button name="XONE_FILTER_LPF" note="0x17" channel="15" />
<button name="XONE_FILTER_ON" note="0x18" channel="15" />
<slider name="XONE_FILTER_FREQ" cc="0x05" channel="15" />

<!-- XONE:FX -->
<toggle name="XONE_FX_SEND_POST" note="0x19" inverted="true" channel="15" />
<toggle name="XONE_FX_SEND_PRE" note="0x19" channel="15" />
<toggle name="XONE_FX_CROSSFADER_ASSIGN_X" note="0x1A" channel="15" />
<toggle name="XONE_FX_CROSSFADER_ASSIGN_Y" note="0x1B" channel="15" />
<button name="XONE_FX_ASSIGN_CHANNEL_A" cc="0x06" value="0x00" channel="15" />
<button name="XONE_FX_ASSIGN_CHANNEL_1" cc="0x06" value="0x15" channel="15" />
<button name="XONE_FX_ASSIGN_CHANNEL_2" cc="0x06" value="0x2A" channel="15" />
<button name="XONE_FX_ASSIGN_CHANNEL_3" cc="0x06" value="0x3F" channel="15" />
<button name="XONE_FX_ASSIGN_CHANNEL_4" cc="0x06" value="0x54" channel="15" />
<button name="XONE_FX_ASSIGN_MASTER" cc="0x06" value="0x69" channel="15" />
<button name="XONE_FX_ASSIGN_SEND" cc="0x06" value="0x7F" channel="15" />
<button name="XONE_FX_TAP" note="0x24" channel="15" />
<encoder name="XONE_FX_INTERVAL" cc="0x08" channel="15" />
<slider name="XONE_FX_DECAY" cc="0x09" channel="15" />
<slider name="XONE_FX_FOCUS" cc="0x0A" channel="15" />
<slider name="XONE_FX_LEVEL" cc="0x0B" channel="15" />
<button name="XONE_FX_ON" note="0x25" channel="15" />

<!-- XONE:SYNC -->
<button name="XONE_SYNC_MODE" note="0x23" channel="15" />
<button name="XONE_SYNC_BEAT_LEFT" note="0x1D" channel="15" />
<button name="XONE_SYNC_BEAT_RIGHT" note="0x1E" channel="15" />
<button name="XONE_SYNC_BEND_LEFT" note="0x1F" channel="15" />
<button name="XONE_SYNC_BEND_RIGHT" note="0x20" channel="15" />
<button name="XONE_SYNC_STOP" note="0x21" channel="15" />
<button name="XONE_SYNC_PLAY" note="0x22" channel="15" />
</device>