<?xml version="1.0" encoding="utf-8"?>
<MixxxMIDIPreset vschemaVersion="1" mixxxVersion="1.9.0">
    <info>
        <name>Hercules DJ Console RMX</name>
        <author>Anders Gunnarsson</author>
        <description>Hercules DJ Console RMX controller mapping, v1.9.0. Requires script v1.9.0</description>
    </info>
    <controller id="Hercules DJ Console RMX MIDI">
        <scriptfiles>
            <file filename="Hercules-DJ-Console-RMX-scripts.js" functionprefix="HerculesRMX"/>
        </scriptfiles>
        <controls>
<!-- TODO: Organization and cleanup -->
<!-- Headphone Cue/Mix POTS Control -->
               <control>
                   <status>0xB0</status>
                   <midino>0x3A</midino>
                   <group>[Master]</group>
                   <key>HerculesRMX.headPhoneMix</key>
                   <options>
                       <Script-Binding/>
                   </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>cue_default</key>
                <status>0xB0</status>
                <midino>0x0C</midino>
                <options>
                    <Button />
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>cue_default</key>
                <status>0xB0</status>
                <midino>0x24</midino>
                <options>
                    <Button/>
                </options>
            </control>

            <control>
                <group>[Channel1]</group>
                <key>play</key>
                <status>0xB0</status>
                <midino>0x0B</midino>
                <options>
                    <Button />
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>play</key>
                <status>0xB0</status>
                <midino>0x23</midino>
                <options>
                    <Button />
                </options>
            </control>


<!-- Load Deck A/B -->
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.load</key>
                <status>0xB0</status>
                <midino>0x12</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>

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

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

            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.stop</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>HerculesRMX.crossFader</key>
                <status>0xB0</status>
                <midino>0x39</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Master]</group>
                <key>HerculesRMX.balance</key>
                <status>0xB0</status>
                <midino>0x37</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.previous</key>
                <status>0xB0</status>
                <midino>0x09</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.next</key>
                <status>0xB0</status>
                <midino>0x0A</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.deckVolume</key>
                <status>0xB0</status>
                <midino>0x32</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.rate</key>
                <status>0xB0</status>
                <midino>0x31</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Master]</group>
                <key>HerculesRMX.volume</key>
                <status>0xB0</status>
                <midino>0x38</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.cueSelect</key>
                <status>0xB0</status>
                <midino>0x14</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.bass</key>
                <status>0xB0</status>
                <midino>0x36</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.medium</key>
                <status>0xB0</status>
                <midino>0x35</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.treble</key>
                <status>0xB0</status>
                <midino>0x34</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.killLow</key>
                <status>0xB0</status>
                <midino>0x10</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.killMid</key>
                <status>0xB0</status>
                <midino>0x0F</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.killHigh</key>
                <status>0xB0</status>
                <midino>0x0E</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.previous</key>
                <status>0xB0</status>
                <midino>0x21</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.next</key>
                <status>0xB0</status>
                <midino>0x22</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.deckVolume</key>
                <status>0xB0</status>
                <midino>0x3C</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.rate</key>
                <status>0xB0</status>
                <midino>0x3B</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.cueSelect</key>
                <status>0xB0</status>
                <midino>0x18</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.bass</key>
                <status>0xB0</status>
                <midino>0x40</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.medium</key>
                <status>0xB0</status>
                <midino>0x3F</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.treble</key>
                <status>0xB0</status>
                <midino>0x3E</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.killLow</key>
                <status>0xB0</status>
                <midino>0x28</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.killMid</key>
                <status>0xB0</status>
                <midino>0x27</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.killHigh</key>
                <status>0xB0</status>
                <midino>0x26</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
<!-- A/B Gain  -->
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.gain</key>
                <status>0xB0</status>
                <midino>0x33</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.gain</key>
                <status>0xB0</status>
                <midino>0x3D</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
<!-- Sync Buttons -->
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.beatSync</key>
                <status>0xB0</status>
                <midino>0x07</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.beatSync</key>
                <status>0xB0</status>
                <midino>0x1F</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>HerculesRMX.rateReset</key>
                <status>0xB0</status>
                <midino>0x11</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>HerculesRMX.rateReset</key>
                <status>0xB0</status>
                <midino>0x20</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>keylock</key>
                <status>0xB0</status>
                <midino>0x08</midino>
                <options>
                    <Button />
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>keylock</key>
                <status>0xB0</status>
                <midino>0x15</midino>
                <options>
                    <Button />
                </options>
            </control>
            <control>
                <group>[Master]</group>
                <key>HerculesRMX.scratch</key>
                <status>0xB0</status>
                <midino>0x29</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <key>HerculesRMX.up</key>
                <group>[Playlist]</group>
                <status>0xB0</status>
                <midino>0x2A</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <key>HerculesRMX.down</key>
                <group>[Playlist]</group>
                <status>0xB0</status>
                <midino>0x2B</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <key>HerculesRMX.left</key>
                <group>[Playlist]</group>
                <status>0xB0</status>
                <midino>0x2C</midino>
                <options>
                    <Script-Binding/>
                </options>
            </control>
            <control>
                <key>HerculesRMX.right</key>
                <group>[Playlist]</group>
                <status>0xB0</status>
                <midino>0x2D</midino>
                <options>
                   <Script-Binding/>
                </options>
            </control>
            <control>
                <group>[Channel1]</group>
                <key>reverse</key>
                <status>0xB0</status>
                <midino>0x04</midino>
                <options>
                    <Button/>
                </options>
            </control>
            <control>
                <group>[Channel2]</group>
                <key>reverse</key>
                <status>0xB0</status>
                <midino>0x1C</midino>
                <options>
                    <Button/>
                </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>cue_default</key>
          <status>0xB0</status>
          <midino>0x0C</midino>
          <minimum>0.5</minimum>
      </output>
      <output>
          <group>[Channel2]</group>
          <key>cue_default</key>
          <status>0xB0</status>
          <midino>0x24</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>
