-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I have updated and fixed the midi mapping for the M-Audio Xponent. The
changes include:

a) Mapped key lock to the "big X button".
b) Fixed loop key lights not following state changes in the engine.
c) Fixed chaotic source code indentation in java-script.

I attach a patch against trunk.

JP
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0DgFYACgkQchi8veCammfk5wCgoeh3iVcr+cL6/kYpHaldtwhn
BxUAoJbEEj+XTfO27TvbCORUg7MJdATW
=ZTfv
-----END PGP SIGNATURE-----
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: raskolni...@es.gnu.org-20101211134106-u26w3ydr1gjvr2tj
# target_branch: bzr+ssh://bazaar.launchpad.net/%2Bbranch/mixxx/
# testament_sha1: 31ce3f904a934ba0ab79035f39b35bbb0fb96460
# timestamp: 2010-12-11 14:41:52 +0100
# base_revision_id: pega...@renegadetech.com-20101207151519-\
#   7lu30jhlb3eis9up
# 
# Begin patch
=== modified file 'mixxx/res/midi/M-Audio-Xponent-scripts.js'
--- mixxx/res/midi/M-Audio-Xponent-scripts.js	2010-09-14 21:45:25 +0000
+++ mixxx/res/midi/M-Audio-Xponent-scripts.js	2010-12-11 13:41:06 +0000
@@ -8,63 +8,64 @@
 MaudioXponent.mastermeter = 0;  //1 for master meter, 0 for channel meter
 MaudioXponent.flashprogress = 8; //flash duration on progress meters
 MaudioXponent.leds = {
-  "play": 0x24,
-  "cue": 0x23,
-  "back": 0x21,
-  "fwd": 0x22,
-  "in": 0x29,
-  "out": 0x2B,
-  "loop": 0x2A,
-  "loop1": 0x25,
-  "loop2": 0x26,
-  "loop4": 0x27,
-  "loop8": 0x28,
-  "leftkey": 0x1C,
-  "rightkey": 0x1D,
-  "key": 0x1E,
-  "pluskey": 0x1F,
-  "minkey": 0x20,
-  "cue1": 0x17,
-  "cue2": 0x18,
-  "cue3": 0x19,
-  "cue4": 0x1A,
-  "cue5": 0x1B,
-  "fx1": 0x0C,
-  "fx2": 0x0D,
-  "fx3": 0x0E,
-  "fx4": 0x0F,
-  "leftp": 0x10,
-  "rightp": 0x11,
-  "bigx": 0x12,
-  "big-": 0x13,
-  "head": 0x14,
-  "scratch": 0x15,
-  "fadarbutton": 0x07,
-  "sync": 0x02,
-  "low": 0x08,
-  "middle": 0x09,
-  "hight": 0x0A,
-  "gain": 0x0B,
-  "shift": 0x2C
+    "play": 0x24,
+    "cue": 0x23,
+    "back": 0x21,
+    "fwd": 0x22,
+    "in": 0x29,
+    "out": 0x2B,
+    "loop": 0x2A,
+    "loop1": 0x25,
+    "loop2": 0x26,
+    "loop4": 0x27,
+    "loop8": 0x28,
+    "leftkey": 0x1C,
+    "rightkey": 0x1D,
+    "key": 0x1E,
+    "pluskey": 0x1F,
+    "minkey": 0x20,
+    "cue1": 0x17,
+    "cue2": 0x18,
+    "cue3": 0x19,
+    "cue4": 0x1A,
+    "cue5": 0x1B,
+    "fx1": 0x0C,
+    "fx2": 0x0D,
+    "fx3": 0x0E,
+    "fx4": 0x0F,
+    "leftp": 0x10,
+    "rightp": 0x11,
+    "bigx": 0x12,
+    "big-": 0x13,
+    "head": 0x14,
+    "scratch": 0x15,
+    "fadarbutton": 0x07,
+    "sync": 0x02,
+    "low": 0x08,
+    "middle": 0x09,
+    "hight": 0x0A,
+    "gain": 0x0B,
+    "shift": 0x2C
 };
 MaudioXponent.binleds = {
-  8: "filterLowKill",
-  9: "filterMidKill",
-  10: "filterHighKill",
-  19: "reverse",
-  20: "pfl",
-  33: "back",
-  34: "fwd",
-  36: "play"
+    8:  "filterLowKill",
+    9:  "filterMidKill",
+    10: "filterHighKill",
+    18: "keylock",
+    19: "reverse",
+    20: "pfl",
+    33: "back",
+    34: "fwd",
+    36: "play"
 };
 MaudioXponent.hotcues = {
-  23: 1,
-  24: 2,
-  25: 3,
-  26: 4,
-  27: 5
+    23: 1,
+    24: 2,
+    25: 3,
+    26: 4,
+    27: 5
 };
-MaudioXponent.timer = [-1];  // Temporary storage of timer IDs
+MaudioXponent.timer = [-1, -1];  // Temporary storage of timer IDs
 MaudioXponent.state = { 
     "flashes" : 0, 
     "faderpos" : 0, 
@@ -81,59 +82,66 @@
 // ----------   Functions    ----------
 
 MaudioXponent.init = function (id) {    // called when the MIDI device is opened & set up
-  
-  //This code light on all leds and then light off
-  midi.sendShortMsg(0xB3,0x14,0x00);
-  midi.sendShortMsg(0xB3,0x15,0x00);
-  for (var led in MaudioXponent.leds) {
-    midi.sendShortMsg(MaudioXponent.on,MaudioXponent.leds[led],0x01);
-    midi.sendShortMsg(MaudioXponent.on + 1,MaudioXponent.leds[led],0x01);
-    MaudioXponent.pauseScript(15);
-  }
-  midi.sendShortMsg(0xB3,0x12,0x7F);
-  midi.sendShortMsg(0xB3,0x13,0x7F);
-  midi.sendShortMsg(0xB3,0x14,0x7F);
-  midi.sendShortMsg(0xB3,0x15,0x7F);
-  MaudioXponent.pauseScript(500);
-  for (var led in MaudioXponent.leds) {
-    midi.sendShortMsg(MaudioXponent.on,MaudioXponent.leds[led],0x00);
-    midi.sendShortMsg(MaudioXponent.on + 1,MaudioXponent.leds[led],0x00);
-    MaudioXponent.pauseScript(15);
-  }
-  midi.sendShortMsg(0xB3,0x14,0x00);
-  midi.sendShortMsg(0xB3,0x15,0x00);
-  //end of light on all leds
-
-  MaudioXponent.flashdur1 = 0;
-  MaudioXponent.flashdur2 = 0;
-  engine.connectControl("[Channel1]","visual_playposition","MaudioXponent.playPositionMeter1");
-  engine.connectControl("[Channel2]","visual_playposition","MaudioXponent.playPositionMeter2");
-  if (MaudioXponent.mastermeter == 1) {
-    engine.connectControl("[Master]","VuMeterL","MaudioXponent.volumeLEDs1");
-    engine.connectControl("[Master]","VuMeterR","MaudioXponent.volumeLEDs2");
-  } else {
-    engine.connectControl("[Channel1]","VuMeter","MaudioXponent.volumeLEDs1");
-    engine.connectControl("[Channel2]","VuMeter","MaudioXponent.volumeLEDs2");
-  }
-
-  engine.connectControl("[Channel1]","hotcue_1_enabled","MaudioXponent.hotcue");
-  engine.connectControl("[Channel1]","hotcue_2_enabled","MaudioXponent.hotcue");
-  engine.connectControl("[Channel1]","hotcue_3_enabled","MaudioXponent.hotcue");
-  engine.connectControl("[Channel1]","hotcue_4_enabled","MaudioXponent.hotcue");
-  engine.connectControl("[Channel1]","hotcue_5_enabled","MaudioXponent.hotcue");
-  engine.connectControl("[Channel2]","hotcue_1_enabled","MaudioXponent.hotcue");
-  engine.connectControl("[Channel2]","hotcue_2_enabled","MaudioXponent.hotcue");
-  engine.connectControl("[Channel2]","hotcue_3_enabled","MaudioXponent.hotcue");
-  engine.connectControl("[Channel2]","hotcue_4_enabled","MaudioXponent.hotcue");
-  engine.connectControl("[Channel2]","hotcue_5_enabled","MaudioXponent.hotcue");
-
-  //engine.connectControl("[Channel1]","bpm","MaudioXponent.bpmsync");
+    
+    //This code light on all leds and then light off
+    midi.sendShortMsg(0xB3,0x14,0x00);
+    midi.sendShortMsg(0xB3,0x15,0x00);
+    for (var led in MaudioXponent.leds) {
+	midi.sendShortMsg(MaudioXponent.on,MaudioXponent.leds[led],0x01);
+	midi.sendShortMsg(MaudioXponent.on + 1,MaudioXponent.leds[led],0x01);
+	MaudioXponent.pauseScript(15);
+    }
+    midi.sendShortMsg(0xB3,0x12,0x7F);
+    midi.sendShortMsg(0xB3,0x13,0x7F);
+    midi.sendShortMsg(0xB3,0x14,0x7F);
+    midi.sendShortMsg(0xB3,0x15,0x7F);
+    MaudioXponent.pauseScript(500);
+    for (var led in MaudioXponent.leds) {
+	midi.sendShortMsg(MaudioXponent.on,MaudioXponent.leds[led],0x00);
+	midi.sendShortMsg(MaudioXponent.on + 1,MaudioXponent.leds[led],0x00);
+	MaudioXponent.pauseScript(15);
+    }
+    midi.sendShortMsg(0xB3,0x14,0x00);
+    midi.sendShortMsg(0xB3,0x15,0x00);
+    //end of light on all leds
+
+    MaudioXponent.flashdur1 = 0;
+    MaudioXponent.flashdur2 = 0;
+    engine.connectControl("[Channel1]","visual_playposition","MaudioXponent.playPositionMeter1");
+    engine.connectControl("[Channel2]","visual_playposition","MaudioXponent.playPositionMeter2");
+    if (MaudioXponent.mastermeter == 1) {
+	engine.connectControl("[Master]","VuMeterL","MaudioXponent.volumeLEDs1");
+	engine.connectControl("[Master]","VuMeterR","MaudioXponent.volumeLEDs2");
+    } else {
+	engine.connectControl("[Channel1]","VuMeter","MaudioXponent.volumeLEDs1");
+	engine.connectControl("[Channel2]","VuMeter","MaudioXponent.volumeLEDs2");
+    }
+
+    engine.connectControl("[Channel1]","hotcue_1_enabled","MaudioXponent.hotcue");
+    engine.connectControl("[Channel1]","hotcue_2_enabled","MaudioXponent.hotcue");
+    engine.connectControl("[Channel1]","hotcue_3_enabled","MaudioXponent.hotcue");
+    engine.connectControl("[Channel1]","hotcue_4_enabled","MaudioXponent.hotcue");
+    engine.connectControl("[Channel1]","hotcue_5_enabled","MaudioXponent.hotcue");
+    engine.connectControl("[Channel2]","hotcue_1_enabled","MaudioXponent.hotcue");
+    engine.connectControl("[Channel2]","hotcue_2_enabled","MaudioXponent.hotcue");
+    engine.connectControl("[Channel2]","hotcue_3_enabled","MaudioXponent.hotcue");
+    engine.connectControl("[Channel2]","hotcue_4_enabled","MaudioXponent.hotcue");
+    engine.connectControl("[Channel2]","hotcue_5_enabled","MaudioXponent.hotcue");
+
+    engine.connectControl("[Channel1]", "loop_enabled", "MaudioXponent.onLoopExit");
+    engine.connectControl("[Channel1]", "loop_start_position", "MaudioXponent.onLoopIn");
+    engine.connectControl("[Channel1]", "loop_end_position", "MaudioXponent.onLoopOut");
+    engine.connectControl("[Channel2]", "loop_enabled", "MaudioXponent.onLoopExit");
+    engine.connectControl("[Channel2]", "loop_start_position", "MaudioXponent.onLoopIn");
+    engine.connectControl("[Channel2]", "loop_end_position", "MaudioXponent.onLoopOut");
+
+    //engine.connectControl("[Channel1]","bpm","MaudioXponent.bpmsync");
 
 };
 
 MaudioXponent.wheel = function (channel, control, value, status) {
     var currentdeck = channel+1;
-        
+    
     // In either case, register the movement
 
     if (MaudioXponent.state["shift"+currentdeck] == 1) {
@@ -178,48 +186,48 @@
 };
 
 MaudioXponent.playPositionMeter1 = function(value) {
-  if (value >= 0.75) {
-    MaudioXponent.flashdur1++;;
-    if (MaudioXponent.flashdur1 == MaudioXponent.flashprogress) {
-      midi.sendShortMsg(0xB3,0x14,0x00);
-    }
-    if (MaudioXponent.flashdur1 >= MaudioXponent.flashprogress*2) {
-      midi.sendShortMsg(0xB3,0x14,MaudioXponent.convert(value));
-      MaudioXponent.flashdur1 = 0;
-    }
-  }else{
-    midi.sendShortMsg(0xB3,0x14,MaudioXponent.convert(value));
-  }
+    if (value >= 0.75) {
+	MaudioXponent.flashdur1++;;
+	if (MaudioXponent.flashdur1 == MaudioXponent.flashprogress) {
+	    midi.sendShortMsg(0xB3,0x14,0x00);
+	}
+	if (MaudioXponent.flashdur1 >= MaudioXponent.flashprogress*2) {
+	    midi.sendShortMsg(0xB3,0x14,MaudioXponent.convert(value));
+	    MaudioXponent.flashdur1 = 0;
+	}
+    }else{
+	midi.sendShortMsg(0xB3,0x14,MaudioXponent.convert(value));
+    }
 };
 
 MaudioXponent.playPositionMeter2 = function(value) {
-  if (value >= 0.75) {
-    MaudioXponent.flashdur2++;;
-    if (MaudioXponent.flashdur2 == MaudioXponent.flashprogress) {
-      midi.sendShortMsg(0xB3,0x15,0x00);
-    }
-    if (MaudioXponent.flashdur2 >= MaudioXponent.flashprogress*2) {
-      midi.sendShortMsg(0xB3,0x15,MaudioXponent.convert(value));
-      MaudioXponent.flashdur2 = 0;
-    }
-  }else{
-    midi.sendShortMsg(0xB3,0x15,MaudioXponent.convert(value));
-  }
+    if (value >= 0.75) {
+	MaudioXponent.flashdur2++;;
+	if (MaudioXponent.flashdur2 == MaudioXponent.flashprogress) {
+	    midi.sendShortMsg(0xB3,0x15,0x00);
+	}
+	if (MaudioXponent.flashdur2 >= MaudioXponent.flashprogress*2) {
+	    midi.sendShortMsg(0xB3,0x15,MaudioXponent.convert(value));
+	    MaudioXponent.flashdur2 = 0;
+	}
+    }else{
+	midi.sendShortMsg(0xB3,0x15,MaudioXponent.convert(value));
+    }
 };
 
 MaudioXponent.volumeLEDs1 = function(value) {
-  midi.sendShortMsg(0xB3,0x12,MaudioXponent.convert(value));
+    midi.sendShortMsg(0xB3,0x12,MaudioXponent.convert(value));
 };
 
 MaudioXponent.volumeLEDs2 = function(value) {
-  midi.sendShortMsg(0xB3,0x13,MaudioXponent.convert(value));
+    midi.sendShortMsg(0xB3,0x13,MaudioXponent.convert(value));
 };
 
 MaudioXponent.convert = function(value) {
-  value = value*127;
-  value = value.toFixed(0);
-  value = value.toString(16);
-  return (value);
+    value = value*127;
+    value = value.toFixed(0);
+    value = value.toString(16);
+    return (value);
 };
 
 MaudioXponent.actbin = function(channel, control, value, status) {    // Generic binary button
@@ -245,44 +253,44 @@
 MaudioXponent.hotcue = function(channel, control, value, status) {    // Generic binary button
     var channelnow = 0;
     if (control == "[Channel2]") {
-      channelnow = 1;
+	channelnow = 1;
     }
     switch (value) {
-      case "hotcue_1_enabled":
-          if (channel == 1){
-              midi.sendShortMsg(MaudioXponent.on + channelnow,0x17,0x01);    // Turn on the LED
-          }else{
-              midi.sendShortMsg(MaudioXponent.on + channelnow,0x17,0x00);    // Turn off the LED
-          }
-      break;
-      case "hotcue_2_enabled":
-          if (channel == 1){
-              midi.sendShortMsg(MaudioXponent.on + channelnow,0x18,0x01);    // Turn on the LED
-          }else{
-              midi.sendShortMsg(MaudioXponent.on + channelnow,0x18,0x00);    // Turn off the LED
-          }
-      break;
-      case "hotcue_3_enabled":
-          if (channel == 1){
-              midi.sendShortMsg(MaudioXponent.on + channelnow,0x19,0x01);    // Turn on the LED
-          }else{
-              midi.sendShortMsg(MaudioXponent.on + channelnow,0x19,0x00);    // Turn off the LED
-          }
-      break;
-      case "hotcue_4_enabled":
-          if (channel == 1){
-              midi.sendShortMsg(MaudioXponent.on + channelnow,0x1A,0x01);    // Turn on the LED
-          }else{
-              midi.sendShortMsg(MaudioXponent.on + channelnow,0x1A,0x00);    // Turn off the LED
-          }
-      break;
-      case "hotcue_5_enabled":
-          if (channel == 1){
-              midi.sendShortMsg(MaudioXponent.on + channelnow,0x1B,0x01);    // Turn on the LED
-          }else{
-              midi.sendShortMsg(MaudioXponent.on + channelnow,0x1B,0x00);    // Turn off the LED
-          }
-      break;
+    case "hotcue_1_enabled":
+        if (channel == 1){
+            midi.sendShortMsg(MaudioXponent.on + channelnow,0x17,0x01);    // Turn on the LED
+        }else{
+            midi.sendShortMsg(MaudioXponent.on + channelnow,0x17,0x00);    // Turn off the LED
+        }
+	break;
+    case "hotcue_2_enabled":
+        if (channel == 1){
+            midi.sendShortMsg(MaudioXponent.on + channelnow,0x18,0x01);    // Turn on the LED
+        }else{
+            midi.sendShortMsg(MaudioXponent.on + channelnow,0x18,0x00);    // Turn off the LED
+        }
+	break;
+    case "hotcue_3_enabled":
+        if (channel == 1){
+            midi.sendShortMsg(MaudioXponent.on + channelnow,0x19,0x01);    // Turn on the LED
+        }else{
+            midi.sendShortMsg(MaudioXponent.on + channelnow,0x19,0x00);    // Turn off the LED
+        }
+	break;
+    case "hotcue_4_enabled":
+        if (channel == 1){
+            midi.sendShortMsg(MaudioXponent.on + channelnow,0x1A,0x01);    // Turn on the LED
+        }else{
+            midi.sendShortMsg(MaudioXponent.on + channelnow,0x1A,0x00);    // Turn off the LED
+        }
+	break;
+    case "hotcue_5_enabled":
+        if (channel == 1){
+            midi.sendShortMsg(MaudioXponent.on + channelnow,0x1B,0x01);    // Turn on the LED
+        }else{
+            midi.sendShortMsg(MaudioXponent.on + channelnow,0x1B,0x00);    // Turn off the LED
+        }
+	break;
     }
 };
 
@@ -296,35 +304,57 @@
     }
 };
 
+MaudioXponent.onLoopIn = function(channel, control, value, status) 
+{
+    channelnow = control == "[Channel2]" ? 1 : 0;
+    midi.sendShortMsg(MaudioXponent.on + channelnow, 0x29, 
+		      engine.getValue (control, value) != -1);
+    /* TODO.
+    if (-1 == engine.getValue(control, "loop_end_position")) 
+    {
+	MaudioXponent.state["flashes"] = 0;  // initialize number of flashes
+	MaudioXponent.timer[channelnow] = engine.beginTimer(
+	    250, "MaudioXponent.flashled("+ channelnow +",\"0x2B\")");
+    }
+    */
+}
+
+MaudioXponent.onLoopOut = function(channel, control, value, status) 
+{
+    channelnow = control == "[Channel2]" ? 1 : 0;
+    /*
+    if (MaudioXponent.timer[channelnow] != -1) { 
+	engine.stopTimer (MaudioXponent.timer[channelnow]);
+	MaudioXponent.timer[channelnow] = -1;
+    }
+    */
+    midi.sendShortMsg(MaudioXponent.on + channelnow, 0x2B, 
+		      engine.getValue (control, value) != -1);
+}
+
+MaudioXponent.onLoopExit = function(channel, control, value, status) 
+{
+    channelnow = control == "[Channel2]" ? 1 : 0;
+    midi.sendShortMsg(MaudioXponent.on + channelnow, 0x2A, 
+		      engine.getValue (control, value) == 1);
+}
+
 MaudioXponent.loopin = function(channel, control, value, status) {
     //MaudioXponent.debug(channel, control, value, status)
     var currentdeck = channel+1;
-    engine.setValue("[Channel"+currentdeck+"]","loop_in",1);
-    midi.sendShortMsg(MaudioXponent.on + channel,0x29,0x01);
-
-    MaudioXponent.state["flashes"] = 0;  // initialize number of flashes
-    MaudioXponent.timer[0] = engine.beginTimer(250,"MaudioXponent.flashled("+ channel +",\"0x2B\")");
+    engine.setValue("[Channel"+currentdeck+"]","loop_in", 1);
 };
 
 MaudioXponent.loopout = function(channel, control, value, status) {
     //MaudioXponent.debug(channel, control, value, status)
     var currentdeck = channel+1;
-    engine.setValue("[Channel"+currentdeck+"]","loop_out",1);
-    if (MaudioXponent.timer[0] != -1) engine.stopTimer(MaudioXponent.timer[0]);
-    midi.sendShortMsg(MaudioXponent.on + channel,0x2B,0x01);    // Turn on the LED
-    MaudioXponent.timer[1] = engine.beginTimer(250,"MaudioXponent.flashled("+ channel +",\"0x2A\")");
+    engine.setValue("[Channel"+currentdeck+"]", "loop_out", 1);
 };
 
 MaudioXponent.loopexit = function(channel, control, value, status) {
     var currentdeck = channel+1;
-    var activenow = engine.getValue("[Channel"+currentdeck+"]","reloop_exit");
-    if (activenow == 1) {    // If currently active
-        print ("dentro loop");
-    }else {    // If not currently active
-        print ("fuori loop");
-    }
-    engine.setValue("[Channel"+currentdeck+"]","reloop_exit",1);
-    //midi.sendShortMsg(MaudioXponent.on + channel,0x2A,0x01);    // Turn on the LED
+    var activenow = engine.getValue("[Channel"+currentdeck+"]", "reloop_exit");
+    engine.setValue("[Channel"+currentdeck+"]", "reloop_exit", 1);
 };
 
 MaudioXponent.flashled = function (channel, control) {
@@ -340,22 +370,22 @@
     //script.debug(channel, control, value, status);
     MaudioXponent.state["faderpos"] = engine.getValue("[Master]","crossfader");
     if (MaudioXponent.state["faderpos"] <= -0.90 && channel == 1) {
-      midi.sendShortMsg(MaudioXponent.on + channel,control,0x01);    // Turn on the LED
-      engine.setValue("[Master]","crossfader",0);
+	midi.sendShortMsg(MaudioXponent.on + channel,control,0x01);    // Turn on the LED
+	engine.setValue("[Master]","crossfader",0);
     }else if (MaudioXponent.state["faderpos"] >= 0.90 && channel == 0) {
-      midi.sendShortMsg(MaudioXponent.on + channel,control,0x01);    // Turn on the LED
-      engine.setValue("[Master]","crossfader",0);
+	midi.sendShortMsg(MaudioXponent.on + channel,control,0x01);    // Turn on the LED
+	engine.setValue("[Master]","crossfader",0);
     }
 };
 
 MaudioXponent.faderbuttonoff = function(channel, control, value, status) {
     //script.debug(channel, control, value, status);
     if (MaudioXponent.state["faderpos"] <= -0.90 && channel == 1) {
-      midi.sendShortMsg(MaudioXponent.on + channel,control,0x00);    // Turn off the LED
-      engine.setValue("[Master]","crossfader",MaudioXponent.state["faderpos"]);
+	midi.sendShortMsg(MaudioXponent.on + channel,control,0x00);    // Turn off the LED
+	engine.setValue("[Master]","crossfader",MaudioXponent.state["faderpos"]);
     }else if (MaudioXponent.state["faderpos"] >= 0.90 && channel == 0) {
-      midi.sendShortMsg(MaudioXponent.on + channel,control,0x00);    // Turn off the LED
-      engine.setValue("[Master]","crossfader",MaudioXponent.state["faderpos"]);
+	midi.sendShortMsg(MaudioXponent.on + channel,control,0x00);    // Turn off the LED
+	engine.setValue("[Master]","crossfader",MaudioXponent.state["faderpos"]);
     }
 };
 
@@ -418,36 +448,36 @@
 MaudioXponent.playlist = function(channel, control, value, status) {
     var currentdeck = channel+1;
     switch (control) {
-      case 28:
-          midi.sendShortMsg(MaudioXponent.on + channel,control,0x01);    // Turn on the LED
-          engine.setValue("[Playlist]","SelectPrevTrack",1);
-      break;
-      case 29:
-          midi.sendShortMsg(MaudioXponent.on + channel,control,0x01);    // Turn on the LED
-          engine.setValue("[Playlist]","SelectNextTrack",1);
-      break;
-      case 30:
-          midi.sendShortMsg(MaudioXponent.on + channel,control,0x01);    // Turn on the LED
-          var activenow = engine.getValue("[Channel"+currentdeck+"]","play");
-          if (activenow == 1) {    // If currently active
-              engine.setValue("[Playlist]","LoadSelectedIntoFirstStopped",1);
-          }else{
-              engine.setValue("[Channel"+currentdeck+"]","LoadSelectedTrack",1);
-          }
-      break;
-      case 31:
-          midi.sendShortMsg(MaudioXponent.on + channel,control,0x01);    // Turn on the LED
-          engine.setValue("[Playlist]","SelectPrevPlaylist",1);
-      break;
-      case 32:
-          midi.sendShortMsg(MaudioXponent.on + channel,control,0x01);    // Turn on the LED
-          engine.setValue("[Playlist]","SelectNextPlaylist",1);
-      break;
+    case 28:
+        midi.sendShortMsg(MaudioXponent.on + channel,control,0x01);    // Turn on the LED
+        engine.setValue("[Playlist]","SelectPrevTrack",1);
+	break;
+    case 29:
+        midi.sendShortMsg(MaudioXponent.on + channel,control,0x01);    // Turn on the LED
+        engine.setValue("[Playlist]","SelectNextTrack",1);
+	break;
+    case 30:
+        midi.sendShortMsg(MaudioXponent.on + channel,control,0x01);    // Turn on the LED
+        var activenow = engine.getValue("[Channel"+currentdeck+"]","play");
+        if (activenow == 1) {    // If currently active
+            engine.setValue("[Playlist]","LoadSelectedIntoFirstStopped",1);
+        }else{
+            engine.setValue("[Channel"+currentdeck+"]","LoadSelectedTrack",1);
+        }
+	break;
+    case 31:
+        midi.sendShortMsg(MaudioXponent.on + channel,control,0x01);    // Turn on the LED
+        engine.setValue("[Playlist]","SelectPrevPlaylist",1);
+	break;
+    case 32:
+        midi.sendShortMsg(MaudioXponent.on + channel,control,0x01);    // Turn on the LED
+        engine.setValue("[Playlist]","SelectNextPlaylist",1);
+	break;
     }
 };
 
 MaudioXponent.playlistoff = function(channel, control, value, status) {
-      midi.sendShortMsg(MaudioXponent.off + channel,control,0x00);    // Turn off the LED
+    midi.sendShortMsg(MaudioXponent.off + channel,control,0x00);    // Turn off the LED
 };
 
 MaudioXponent.cuedefon = function(channel, control, value, status) {
@@ -478,12 +508,12 @@
 
 MaudioXponent.shutdown = function (id) {    // called when the MIDI device is closed
 
-  for (var led in MaudioXponent.leds) {
-    midi.sendShortMsg(MaudioXponent.on,MaudioXponent.leds[led],0x00); // Turn off deck 1 lights
-    midi.sendShortMsg(MaudioXponent.on + 1,MaudioXponent.leds[led],0x00); // Turn off deck 2 lights
-  }
-  midi.sendShortMsg(0xB3,0x14,0x00);
-  midi.sendShortMsg(0xB3,0x15,0x00);
+    for (var led in MaudioXponent.leds) {
+	midi.sendShortMsg(MaudioXponent.on,MaudioXponent.leds[led],0x00); // Turn off deck 1 lights
+	midi.sendShortMsg(MaudioXponent.on + 1,MaudioXponent.leds[led],0x00); // Turn off deck 2 lights
+    }
+    midi.sendShortMsg(0xB3,0x14,0x00);
+    midi.sendShortMsg(0xB3,0x15,0x00);
 
 };
 

=== modified file 'mixxx/res/midi/M-Audio_Xponent.midi.xml'
--- mixxx/res/midi/M-Audio_Xponent.midi.xml	2010-09-14 21:45:25 +0000
+++ mixxx/res/midi/M-Audio_Xponent.midi.xml	2010-12-11 13:41:06 +0000
@@ -125,27 +125,6 @@
     </control>
     <control>
       <group>[Channel1]</group>
-      <key>reverse</key>
-      <status>0x80</status>
-      <midino>19</midino>
-      <controltype>button</controltype>
-    </control>
-    <control>
-      <group>[Channel1]</group>
-      <key>cue_gotoandstop</key>
-      <status>0x90</status>
-      <midino>18</midino>
-      <controltype>button</controltype>
-    </control>
-    <control>
-      <group>[Channel1]</group>
-      <key>cue_gotoandstop</key>
-      <status>0x80</status>
-      <midino>18</midino>
-      <controltype>button</controltype>
-    </control>
-    <control>
-      <group>[Channel1]</group>
       <key>volume</key>
       <status>0xB0</status>
       <midino>7</midino>
@@ -620,27 +599,6 @@
     </control>
     <control>
       <group>[Channel2]</group>
-      <key>reverse</key>
-      <status>0x81</status>
-      <midino>19</midino>
-      <controltype>button</controltype>
-    </control>
-    <control>
-      <group>[Channel2]</group>
-      <key>cue_gotoandstop</key>
-      <status>0x91</status>
-      <midino>18</midino>
-      <controltype>button</controltype>
-    </control>
-    <control>
-      <group>[Channel2]</group>
-      <key>cue_gotoandstop</key>
-      <status>0x81</status>
-      <midino>18</midino>
-      <controltype>button</controltype>
-    </control>
-    <control>
-      <group>[Channel2]</group>
       <key>volume</key>
       <status>0xB1</status>
       <midino>7</midino>
@@ -1055,6 +1013,33 @@
         <Script-Binding/>
       </options>
     </control>
+    <control>
+      <group>[Channel1]</group>
+      <key>MaudioXponent.actbin</key>
+      <status>0x90</status>
+      <midino>18</midino>
+      <options>
+        <Script-Binding/>
+      </options>
+    </control>
+    <control>
+      <group>[Channel2]</group>
+      <key>MaudioXponent.actbin</key>
+      <status>0x91</status>
+      <midino>18</midino>
+      <options>
+        <Script-Binding/>
+      </options>
+    </control>
+    <!-- <control> -->
+    <!--   <group>[Channel2]</group> -->
+    <!--   <key>MaudioXponent.actbinstop</key> -->
+    <!--   <status>0x80</status> -->
+    <!--   <midino>18</midino> -->
+    <!--   <options> -->
+    <!--     <Script-Binding/> -->
+    <!--   </options> -->
+    <!-- </control> -->
   </controls>
 </controller>
 </MixxxMIDIPreset>

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOT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zkOTIVCiwlk3dxvLJEkko84DJW0qYhRbsk9xKGeKUetVVbG0n2mGKM
lDLE/8XckU4UJAemuG1A

Attachment: m-audio-exponent-keylock-loop.patch.sig
Description: PGP signature

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to