<?xml version="1.0" encoding="utf-8"?>
<MixxxMIDIPreset vschemaVersion="1" mixxxVersion="1.7.0">
    <info>
        <name>Hercules DJ Console RMX</name>
        <author>Garth Dahlstrom</author>
        <description>This is a complete mapping for a Hercules DJ Console RMX. Requires scripting.</description>
    </info>
    <controller id="Hercules DJ Console RMX MIDI">
        <scriptfiles>
            <file filename="Hercules-DJ-Console-RMX-scripts.js" functionprefix="HerculesRMX"/>
        </scriptfiles>
        <controls>
<!-- Headphone Cue/Mix POTS Control -->
               <control>
                   <status>0xB0</status>
                   <midino>0x3A</midino>
                   <group>[Master]</group>
                   <key>headMix</key>
                   <options>
                       <normal/>
                   </options>
               </control>

<!-- Jog Wheels -->
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.jog_wheel</key>
                <status>0xB0</status>
                <midino>0x2F</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>

            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.jog_wheel</key>
                <status>0xB0</status>
                <midino>0x30</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>

<!-- Play and CuePlay -->
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.cue</key>
                <status>0xB0</status>
                <midino>0x0C</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.cue</key>
                <status>0xB0</status>
                <midino>0x24</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>

            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.play</key>
                <status>0xB0</status>
                <midino>0x0B</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.play</key>
                <status>0xB0</status>
                <midino>0x23</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>


<!-- Load Deck A/B -->
            <control>
                <group>[Channel1]</group>
                <key>LoadSelectedTrack</key>
                <status>0xB0</status>
                <midino>0x12</midino>
                <options>
                    <Buttton/>
                </options>
            </control>

            <control>
                <group>[Channel2]</group>
                <key>LoadSelectedTrack</key>
                <status>0xB0</status>
                <midino>0x16</midino>
                <options>
                    <Buttton/>
                </options>
            </control>

<!-- Stop and Reset button -->
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.stop_and_reset_track</key>
                <status>0xB0</status>
                <midino>0x0D</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>

            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.stop_and_reset_track</key>
                <status>0xB0</status>
                <midino>0x25</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>

<!-- Flanger -->
            <control>
                <group>[Channel1]</group>
                <key>flanger</key>
                <status>0xB0</status>
                <midino>0x01</midino>
                <options>
                    <Button/>
                </options>
            </control>

            <control>
                <group>[Channel2]</group>
                <key>flanger</key>
                <status>0xB0</status>
                <midino>0x19</midino>
                <options>
                    <Button/>
                </options>
            </control>

            <control>
                <group>[Master]</group>
                <key>crossfader</key>
                <status>0xB0</status>
                <midino>0x39</midino>
                <options/>
            </control>
            <control>
                <group>[Master]</group>
                <key>balance</key>
                <status>0xB0</status>
                <midino>0x37</midino>
                <options/>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>PrevTrack</key>
                <status>0xB0</status>
                <midino>0x09</midino>
                <options>
                    <Button/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>NextTrack</key>
                <status>0xB0</status>
                <midino>0x0A</midino>
                <options>
                    <Button/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>volume</key>
                <status>0xB0</status>
                <midino>0x32</midino>
                <options/>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>rate</key>
                <status>0xB0</status>
                <midino>0x31</midino>
                <options/>
            </control>

            <control>
                <group>[Master]</group>
                <key>volume</key>
                <status>0xB0</status>
                <midino>0x38</midino>
                <options/>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>pfl</key>
                <status>0xB0</status>
                <midino>0x14</midino>
                <options>
                    <Button/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>filterLow</key>
                <status>0xB0</status>
                <midino>0x36</midino>
                <options/>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>filterMid</key>
                <status>0xB0</status>
                <midino>0x35</midino>
                <options/>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>filterHigh</key>
                <status>0xB0</status>
                <midino>0x34</midino>
                <options/>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>filterLowKill</key>
                <status>0xB0</status>
                <midino>0x10</midino>
                <options>
                    <Button/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>filterMidKill</key>
                <status>0xB0</status>
                <midino>0x0F</midino>
                <options>
                    <Button/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>filterHighKill</key>
                <status>0xB0</status>
                <midino>0x0E</midino>
                <options>
                    <Button/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>PrevTrack</key>
                <status>0xB0</status>
                <midino>0x21</midino>
                <options>
                    <Button/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>NextTrack</key>
                <status>0xB0</status>
                <midino>0x22</midino>
                <options>
                    <Button/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>volume</key>
                <status>0xB0</status>
                <midino>0x3C</midino>
                <options/>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>rate</key>
                <status>0xB0</status>
                <midino>0x3B</midino>
                <options/>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>pfl</key>
                <status>0xB0</status>
                <midino>0x18</midino>
                <options>
                    <Button/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>filterLow</key>
                <status>0xB0</status>
                <midino>0x40</midino>
                <options/>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>filterMid</key>
                <status>0xB0</status>
                <midino>0x3F</midino>
                <options/>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>filterHigh</key>
                <status>0xB0</status>
                <midino>0x3E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>filterLowKill</key>
                <status>0xB0</status>
                <midino>0x28</midino>
                <options>
                    <Button/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>filterMidKill</key>
                <status>0xB0</status>
                <midino>0x27</midino>
                <options>
                    <Button/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>filterHighKill</key>
                <status>0xB0</status>
                <midino>0x26</midino>
                <options>
                    <Button/>
                </options>
            </control>
<!-- A/B Gain  -->
            <control>
                <group>[Channel1]</group>
                <key>pregain</key>
                <status>0xB0</status>
                <midino>0x33</midino>
                <options/>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>pregain</key>
                <status>0xB0</status>
                <midino>0x3D</midino>
                <options/>
            </control>
<!-- Sync Buttons -->
            <control>
                <group>[Channel1]</group>
                <key>beatsync</key>
                <status>0xB0</status>
                <midino>0x07</midino>
                <options>
                    <Button/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>beatsync</key>
                <status>0xB0</status>
                <midino>0x1F</midino>
                <options>
                    <Button/>
                </options>
            </control>
            <control>
                <group>[Master]</group>
                <key>HerculesRMX.toggle_scratch_mode</key>
                <status>0xB0</status>
                <midino>0x29</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <key>HerculesRMX.up_down_arrows</key>
                <group>[Playlist]</group>
                <status>0xB0</status>
                <midino>0x2A</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <key>HerculesRMX.up_down_arrows</key>
                <group>[Playlist]</group>
                <status>0xB0</status>
                <midino>0x2B</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>reverse</key>
                <status>0xB0</status>
                <midino>0x04</midino>
                <options>
                    <Switch/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>reverse</key>
                <status>0xB0</status>
                <midino>0x1C</midino>
                <options>
                    <Switch/>
                </options>
            </control>

<!--
            <control>
                <group>[Master]</group>
                <key>headMix</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>transform</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>start</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>end</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>cue_gotoandstop</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>wheel_touch_switch</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>rate_temp_up</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>rate_temp_down</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>loop</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>transform</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>start</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>end</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>cue_gotoandstop</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>wheel_touch_sensor</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>wheel_touch_switch</key>
                <status>0xB0</status>
                <midino>40x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>rate_temp_up</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>rate_temp_down</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options>
                    <Invert/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>loop</key>
                <status>0xB0</status>
                <midino>0x2E</midino>
                <options/>
            </control>
-->
        </controls>

    <outputs>
        <output>
            <group>[Channel1]</group>
            <key>play</key>
            <status>0xB0</status>
            <midino>0x0B</midino>
            <minimum>0.5</minimum>
        </output>
        <output>
            <group>[Channel2]</group>
            <key>play</key>
            <status>0xB0</status>
            <midino>0x23</midino>
            <minimum>0.5</minimum>
        </output>
      <output>
        <group>[Channel1]</group>
        <key>playposition</key>
        <status>0xB0</status>
        <midino>0x3B</midino>
        <minimum>0.9</minimum>
        <maximum>0.99</maximum>
      </output>
      <output>
        <group>[Channel2]</group>
        <key>playposition</key>
        <status>0xB0</status>
        <midino>0x53</midino>
        <minimum>0.9</minimum>
        <maximum>0.99</maximum>
      </output>

<!-- Headphone Cue -->
        <output>
            <group>[Channel1]</group>
            <key>pfl</key>
            <status>0xB0</status>
            <midino>0x14</midino>
            <minimum>0.5</minimum>
        </output>
        <output>
            <group>[Channel2]</group>
            <key>pfl</key>
            <status>0xB0</status>
            <midino>0x18</midino>
            <minimum>0.5</minimum>
        </output>
    </outputs>
  </controller>
</MixxxMIDIPreset>
