How to send midi cc messages



Controller definition for MIDI - made yourself
Go back to German content

VERSION 8 syntax -

from version 6.x

Controller definition for MIDI - made yourself
(Translation from English by H. Jakovski)

The 'Definition' file for a MIDI controller is an XML file and is located in 'My Documents / VirtualDJ / Devices /'. It has the following structure:

The 'root' element of the XML file must be called and has the following values:
- name: Unique name which identifies the controller (is also used in the mapper area).
- author: (Optional) Name of the author of the XML definition file.
- type: Must be "MIDI" in this case.
- decks: Can be either "1" or "2", depending on whether the controller is designed for only one deck or for two decks at the same time.
- sysexid: (Optional) response to the identity request via sysex. (See also "Device Identification" below)
- drivername: (Optional) name of the driver
- drivernameout: (Optional) Name of the output driver, is different
- midiin: (Optional) number of the midi input interface on this computer
- midiout: (Optional) number of the midi output interface on this computer
- sysexquery: (Optional) Sysex commands that should be sent to the device for identification
- sysexanswer: (Optional) Sysex response that comes back from the device
- vid and pid: The vid and pid have to from version 7.0 onwards when creating definitions. The two values ​​can currently be determined in the device manager. Find the USB device and note the two values. In our example the values ​​are: vid = "0x1AA1" pid = "0x0010"

<?xml version="1.0" encoding="UTF-8"?>
<device name="Mein Controller" author="Ich" type="MIDI" decks="2" sysexid="F07E??06020001020304" vid="0x1AA1" pid="0x0010">

Example for the file name of a custom definition file: 'Vestax VCI100 definition.xml'.

Device identification:

In order to automatically detect the devices in VirtualDJ To ensure this, a possibility must be stored in the definition file to determine the device and the midi port to which it was connected. There are various ways of doing this, depending on how MIDI compatible the controller is.

If the connected MIDI controller adheres to the specifications of the MIDI protocol, the best way is to store the so-called 'device ID' (SysExID) in the XML. This is achieved by entering the value 'sysexid = "VALUE"' as in the example above. The SysExID (answer to the identity request) should start with 'F07E ?? 0602'. This is followed by a 3-byte manufacturer ID and finally the product ID. The two '??' in our example stand for the currently used MIDI channel. As a rule there are 2 numbers there, but for the entry with '??' have to be replaced, otherwise the controller would ONLY be recognized on the specified MIDI channel. For example, if you were to connect a second, different midi controller, this could lead to a shift in the MIDI channel and the device would no longer be recognized.

The easiest way to determine the ID and all other required data is with the following tool:

Here you will find an explanation of how the Miditrace tool is used.

When you have connected the program to your controller, just start the tool, click on the controller in the list on the right and press 'Send' at the top. The hexadecimal numbers that are already entered (SysEx ID Request) are sent to the controller, which should usually respond with its SysExID. Simply copy this and enter the midi channel as described above with '??' replace.

If your controller does not fully adhere to the specification of the MIDI standard, it will be much more difficult. (At this point I recommend beginners to get out and ask for help in the forum.) You need the information from the manufacturer of the controller whether there is a 'SysEx' request that enables a clear identification of the device and what this answer looks like. Since SysEx gives the manufacturer the opportunity to implement his own commands for his devices, you will not get any further here without the manufacturer's information.

!!! DANGER !!! Never send pointless, random or not 100% understood SysEx commands to your controller. Otherwise something on the hardware may be damaged, for example if you send the 'Manufacturer SysEx' for the command - 'Delete the existing firmware' to the controller. NOT A GOOD IDEA ;-)

Alternatively, if the controller has not implemented a SysExID, you also have the option of identifying the device by the name of the driver used.

Please note, however, that the name of the driver can be changed by the user under Windows Vista and Mac OSX, or if you are using an English Windows version, for example, the name may vary due to the other language. So this method is not 100%!
If the output interface uses a different driver name, for example, this can also be entered with 'drivernameout = VALUE' in order to achieve a better hit rate.

Should the driver NONE If you have a unique name and you cannot use a SysExID, the last option is to enter the midiport used.
However, this number changes when you use other / other MIDI devices, or it is definitely wrong on other computers.
This type of identification is primarily intended to allow developers quick and easy access during the test phase. The two values ​​'midiin = VALUE' and 'midiout = VALUE' have been implemented for this purpose. The permanent identification of a device should be realized in one of the ways described above !!!

In the event that all of the methods shown here do NOT work, an identification string can be dispensed with. Then the mapping is applied to all profiles that are NOT covered by another profile created with identification. I.e. if you write the definition file ONLY FOR YOURSELF, you can do without an identification if necessary. (Note from the translator: It is always better to identify it, as this means that the definition file can also be used by other users.)

Because unusable definitions are generated again and again, a very important point here.
If a controller can process 2 decks, i.e. there are e.g. 2 jog wheels or 2 play buttons on the controller (1x deck A and once deck B), the same elements are ALWAYS given the same name in the definition. So e.g. JOGWHEEL. Please DO NOT append numbers or numbers to the element names. (JOGWHEEL_1 or JOGWHEEL_A is wrong!)

Separate control in VDJ is still possible with the script language. The distinction between Jog 1 and 2 is made by adding deck = "1" or deck = "2"

MIDI elements:

Each button, fader, knob, LED, LCD, etc. is defined by a so-called 'child' element within the element.
All of these 'child' elements (with the exception of 'init' and 'exit') can contain the following parameters:
- name: The name of the element - this will be displayed later in the mapper
- deck: (Optional) The deck (1/2) for which this element is used (if the controller supports two decks) - e.g. for the 'PLAY' button. For same items on the
Both decks should ALWAYS use the same names, e.g. for the play button 'PLAY' - the distinction between the left and right deck is made by the
'deck' parameter.
- channel: (optional) the midi channel on which the transmission is carried out (if a distinction has to be made between different channels)


A button is defined by the '
© Atomix Productions | Site map