How to write an XML file for controllers
Printed From: Deejaysystem Professional Tools
Category: Deejaysystem international
Forum Name: English-speaking forum
Forum Description: Chat, help and support in english on any Deejaysystem related topic
URL: https://www.deejaysystem.com/forum/forum_posts.asp?TID=1013
Printed Date: 23-Nov-2024 at 16:09 Software Version: Web Wiz Forums 12.01 - http://www.webwizforums.com
Topic: How to write an XML file for controllers
Posted By: hleyen
Subject: How to write an XML file for controllers
Date Posted: 07-Dec-2012 at 11:56
Hello, I have recently bought a KORG NanoPAD2 and want to use it as a controller with Deejaysystem Audio MkII. I have tried to follow http://www.deejaysystem.com/support/manual/en/Controllers/MIDI.htm but did without success. KORG USB midi driver is installed and KORG Kontrol Editor works fine. MIDI into Samplitude works fine both as music and as control. Am I right that the names in the info section can be freely selected or do the need to reflect the real device name? I have tried the follwoing for input following what Behringer states as the output of the BCD <Input Name="A_PLAY" ** will this connect to the DJS button? Can you provide a list of button names? Type="BUTTON" ** seems self-explanatory Command="0x90" ** note on, copied from BCD Id="0x13" ** G 0, copied from BCD Press="0x7F" ** can/must be omitted? seems to be velocity or is it the reference to the DJS button? Release="0" ** no action on button release /> I have not installed any special dll other than the NanoPAD installation routine as the dll was referenced for output in translation mode only. I hope you can help to find what I have not seen. Regards Hartmut
|
Replies:
Posted By: Edy
Date Posted: 11-Dec-2012 at 13:20
The names in the <Info> section must match the name of the MIDI device. When a name is specified, the device is identified by the name.I recommend you to try the tool I've developed to analyze the MIDI devices and gather the data for writing the XML files:
http://download.deejaysystem.com/djs/DjsMidiTool.zip - http://download.deejaysystem.com/djs/DjsMidiTool.zip
The name in the info section must match the name of the Midi IN device as it appears in the drop-down list of the MIDI tool.
The <Input> entries are a kind of manifest of the controls available at the device, their type and description of the MIDI values they emit. These entries does not connect the controls to buttons in Deejaysystem, but make the controls available to detection in the input settings dialog.
<Input Name="A_PLAY"** This is an arbitrarily choosen name for identifying a specific control in the controller. Together with the <PrefixId> specified at the <Info> section they compose an unique name for the control. For instance, if PrefixId=KPAD2, then the unique control name will be KPAD2_A_PLAY. Note that an uniform convention is encouraged along all controllers when giving names to controls. Type="BUTTON"** Self explanatory and described in the http://www.deejaysystem.com/support/manual/en/Controllers/MIDI.htm - MIDI specificiation for Deejaysystem . Command="0x90"Id="0x13"Press="0x7F"Release="0"** These data describe the MIDI values the device sends when the control is used. Use the Deejaysystem MIDI Tool for retrieving the exact data you need to put here.
Using the Deejaysystem MIDI Tool
Conect your device to your computer and ensure that it's switched on and working. Then open the Deejaysystem MIDI Tool. The device should be listed at the Midi In drop-down list. Choosing it will display useful data at the event window below the list. Also, pressing and moving the controls will generate MIDI events that will be listed in the window.
For detecting each control and gathering its data, first choose the type of control: Button, Analog, Hi-Res Analog, or Encoder. Then act on each control depending on its type as described below. If the control is properly detected then the tool will display "LEARNED" and the correct data for witting the XML entry for that control.
Button: press and release once.
Analog, Hi-Res Analog: move several times along all its range.
Encoder: gently move the encoder one exact lap clockwise, then one exact lap counter-clockwise. The encoder may be detected before ending this second lap, but the data will be correct after completing it.
When you have the correct data written to the XML file then you can open Deejaysystem, go to Settings > Control > Edit, and you can map the device's controls to Deejaysytem's functions as with any other controller. The inputs should be detected properly when assigning controls to functions. Note: Close the Midi Tool prior to opening Deejaysystem.
You can write the default assignments at the MidiDefaults.XML file. These assignments are applied when restoring the default control settings in Deejaysystem (Input > Control > Defaults).
The <InputMap> entries are as follows:
<InputMap Command="DjsA_ButtonPlay"** This identifies the function or control in Deejaysystem, in this case the Play button of Deck A. The available functions and controls are the same as listed in the Input config dialog (Settings > Control > Edit) Input="KPAD2_A_PLAY"** This is the unique control name as defined above by PrefixId + Input name. We are binding the Play button of the A deck in the Korg pad with the Play button of the A deck in Deejaysystem. NoModifiers="1"etc.>** All these options (see the MidiDefaults.xml file) are the same as the available at the input config dialog for each control (Settings > Control > Edit). Hope this helps. Please let me know if you need any further info.
------------- Edy / Deejaysystem Team
http://www.deejaysystem.com -
|
Posted By: hleyen
Date Posted: 11-Dec-2012 at 16:51
Hi Edy, thank you for your fast response. I have tried your proposals and found the DjsMidiTool valuable as it made me aware of a different name:"nanoPAD 2 1 PAD" including blanks.
I have rewritten the Info section <Info> <Name>nanoPAD 2 1 PAD</Name> <PrefixId>KPAD2</PrefixId> <MidiInNames> <MidiName>nanoPAD 2 1 PAD</MidiName> </MidiInNames> <MidiOutName>nanoPAD 2 1 CTRL</MidiOutName> </Info>
I have left the input section unchanged but added <InputMap Command="DjsA_Play Button" Input="KPAD2_A_PLAY" Command="DjsA_Cue Button" Input="KPAD2_A_CUE" NoModifiers="1" > behind the input section. I have found this reference in your answer but not in the manual. Is it really needed? Will it match the buttons or will they be matched by pushing them in Djs's Control Edit Mode? I have not been able to add a button by pushing it as Deejaysystem does not react in Control Edit Mode. What about MidiDevices.dll? Do I need to "install" it and how so that Deejaysystem can recognize the Midi Device? Does the "Press" value have any influence as it varies with touch? I will contribute a configuration file once the problem is solved. Regards Hartmut
|
Posted By: Edy
Date Posted: 16-Dec-2012 at 08:42
The <Inputs> section must be filled with the exact <Input> data gathered with the MIDI Tool. This includes the Press and Release values, and any other value depending on the control type. Otherwise, Deejaysystem will fail to properly detect the controls.
If I've understood you correctly, your Press values vary with touch. If there are some buttons that are sensitive to pressure, then they should be better configured as Analog. You can still map them to buttons in Deejaysystem.
The BUTTON type interprets the MIDI parameters as follows:
- If a COMMANDRELEASE value is specified (and it's different than COMMAND) then the button is detected as "Pressed" when the MIDI message issues the COMMAND value. PRESS and RELEASE values are ignored.
- If no COMMANDRELEASE value is specified, the button is detected as "Pressed" when the MIDI message delivers a value different than RELEASE.
- Otherwise the button is considered released.
Again, the MIDI Tool will tell you which exact values you should write into the XML for each control.
The <InputMaps> section is effective only at the file MidiDefaults.xml, not the MidiDevices.xml. Otherwise it's ignored. Check out the actual file in the Plugins folder. This file is applied when setting back the Default control mappings (Settings > Control > Defaults), provided that the device and its controls have been previously defined correctly at MidiDevices.xml.
You don't need to worry about MidiDevices.dll. This is used only when certain actions must be translated into several MIDI messages for a specific device. For instance, this file is uses for sending time, status and text messages to the display of the Denon DN4500F. It doesn't have any other function. Controls are always detected as MIDI messages according to the definitions at MidiDevices.xml.
I can point you in the correct direction if you send me a screenshot of the MIDI Tool after following these steps:
1.- Ensure your device is connected and powered.
2.- Open Deejaysystem MIDI Tool
3.- Select your device from the Midi In drop down list.
4.- Press and release the Play button of the deck A in your device. A caption "BUTTON x-y LEARNED" and further data should appear.
5.- Take a screenshot and post it here.
Then I'll write the exact lines you should put in your XML files. This should give you a good clue to continue writing the XML file with all controls.
------------- Edy / Deejaysystem Team
http://www.deejaysystem.com -
|
Posted By: hleyen
Date Posted: 17-Dec-2012 at 15:57
Hello Edy, I have taken a screen shot with three presses of the button that shall be used as start. Yes, the buttons deliver a Press value based on how you touch them. As you can see the third value (press) varies and is not really predictable. I can only configure pads as a button, Control Change or Program Change but not as analog. File upload does not work for me (Error details:-Server object 006~ASP
0178~Server.CreateObject Access Error~The call to Server.CreateObject
failed while checking permissions. Access is denied to this object.) so I retype the text:
Device nanoPAD2 1 PAD ready. Vendor: 0x0037 (55) Product: 0x0005 (5) Version: 1.14 0075A: 00 09 13 6E ( 0 9 19 110) NOTEON 007CD: 00 08 13 40 ( 0 8 19 64) NOTEOFF
The two other events have other values for data2 like 5E (94) or 58 (88). I hope this information is sufficient without the screen shot. I can mail the file or put it on another server for you to download.
Regards Hartmut
|
Posted By: Edy
Date Posted: 04-Jan-2013 at 14:15
Yes, please put it in another server. I've been trying to make uploads work but there's some problem at my ISP.
------------- Edy / Deejaysystem Team
http://www.deejaysystem.com -
|
Posted By: hleyen
Date Posted: 04-Jan-2013 at 15:39
Hi Edy, I have put the image here: http://www.hiweb.mynetcologne.de/Midi_Command.gif - http://www.hiweb.mynetcologne.de/Midi_Command.gif The server does not have an index page or other content. Regards Hartmut
|
Posted By: Edy
Date Posted: 08-Jan-2013 at 05:55
I've re-read your first message and I've realized that external MIDI files are not supported in Deejaysystem Audio Mk2 yet. This is planned for the next build. Could you use http://www.deejaysystem.com/forum/forum_posts.asp?TID=783 - Deejaysystem Video VJ2 latest beta for writing and testing the XML file? This way the file will work with Mk2 as soon as the next build is released.
------------- Edy / Deejaysystem Team
http://www.deejaysystem.com -
|
Posted By: hleyen
Date Posted: 19-Jan-2013 at 15:31
I have downloaded and run the VJ2 beta 4 version. I could not install but had to start it from a directory which was generated from the zip file. I have copied my UserMidiDevices.xml into the plugins directory. Still there is no reaction of VJ2 when I run it in control edit mode and try to add a button. I am pretty sure that I have coded the xml properly. Id="0x13" (hex) refers to note 19 which what I see in the XML Analyzer. I will have to stop further investigation for a while due to business.
P.S. I have found that I can control Deejaysystem from an Android Pad using a Remote Desktop application. To do so you must deactivate the VU which would monopolize the WLAN.
Regards Hartmut
|
|