midi.DeviceOut = 2 //Button 1 if Joystick1.z > .5 and Pressed(Joystick1.Button1) then midi.f2 = true //continue elseif Joystick1.z < -.5 and Pressed(Joystick1.Button1) then midi.fsharp1 = true //Toggle loop elseif Pressed(Joystick1.Button1) then midi.c2 = true //play from selection endif //Button 2 if Joystick1.z > .5 and Pressed(Joystick1.Button2) then wait 10ms // elseif Joystick1.z < -.5 and Pressed(Joystick1.Button2) then wait 10ms // elseif Pressed(Joystick1.Button2) then midi.Dsharp2 = true //STAHP!!! endif //Button 3 if Joystick1.z > .5 and Pressed(Joystick1.Button3) then midi.e0 = true //solo exclusive elseif Joystick1.z < -.5 and Pressed(Joystick1.Button3) then midi.d0 = true //Mute elseif Pressed(Joystick1.Button3) then midi.csharp0 = true //Solo endif //Button 4 if Joystick1.z > .5 and Pressed(Joystick1.Button4) then midi.dsharp0 = true //Arm exclusive elseif Joystick1.z < -.5 and Pressed(Joystick1.Button4) then wait 10ms // elseif Pressed(Joystick1.Button4) then midi.c0 = true //Arm endif //Button 5 if Joystick1.z > .5 and Pressed(Joystick1.Button5) then wait 10ms // elseif Joystick1.z < -.5 and Pressed(Joystick1.Button5) then wait 10ms // elseif Pressed(Joystick1.Button5) then midi.dsharp6 = true //Toggle arrangement/session view endif //Button 6 if Joystick1.z > .5 and Pressed(Joystick1.Button6) then wait 10ms // elseif Joystick1.z < -.5 and Pressed(Joystick1.Button6) then wait 10ms // elseif Pressed(Joystick1.Button6) then midi.asharp7 = true //unfold track in arrangement endif //Button 7 if Joystick1.z > .5 and Pressed(Joystick1.Button7) then midi.a6 = true //redo elseif Joystick1.z < -.5 and Pressed(Joystick1.Button7) then wait 10ms // elseif Pressed(Joystick1.Button7) then midi.gsharp6 = true //undo endif //Button 8 if Joystick1.z > .5 and Pressed(Joystick1.Button8) then wait 10ms // elseif Joystick1.z < -.5 and Pressed(Joystick1.Button8) then wait 10ms // elseif Pressed(Joystick1.Button8) then midi.g1 = true //Record endif //Button 9 if Joystick1.z > .5 and Pressed(Joystick1.Button9) then midi.b1 = true //pan center elseif Joystick1.z < -.5 and Pressed(Joystick1.Button9) then wait 10ms // elseif Pressed(Joystick1.Button9) then wait 10ms // endif //Button 10 if Joystick1.z > .5 and Pressed(Joystick1.Button10) then wait 10ms // elseif Joystick1.z < -.5 and Pressed(Joystick1.Button10) then wait 10ms // elseif Pressed(Joystick1.Button10) then wait 10ms // endif //D Pad Up if Joystick1.z > .5 and Pressed(Joystick1.Pov1Up) then wait 10ms // elseif Joystick1.z < -.5 and Pressed(Joystick1.Pov1Up) then Keyboard.Ctrl + Keyboard.T = true Keyboard.Ctrl + Keyboard.T = false //New Track elseif Pressed(Joystick1.Pov1Up) then midi.f6 = true //Toggle clip/device endif //D Pad Right if Joystick1.z > .5 and Pressed(Joystick1.Pov1Right) then wait 10ms // elseif Joystick1.z < -.5 and Pressed(Joystick1.Pov1Right) then wait 10ms // elseif Pressed(Joystick1.Pov1Right) then midi.Control85 = .01 //Select next Track endif //D Pad Down if Joystick1.z > .5 and Pressed(Joystick1.Pov1Down) then wait 10ms // elseif Joystick1.z < -.5 and Pressed(Joystick1.Pov1Down) then Keyboard.Ctrl + Keyboard.Shift + Keyboard.T = true Keyboard.Ctrl + Keyboard.Shift + Keyboard.T = false //New Midi Track elseif Pressed(Joystick1.Pov1Down) then midi.d6 = true //Toggle browser endif //D Pad Left if Joystick1.z > .5 and Pressed(Joystick1.Pov1Left) then wait 10ms // elseif Joystick1.z < -.5 and Pressed(Joystick1.Pov1Left) then wait 10ms // elseif Pressed(Joystick1.Pov1Left) then midi.Control85 = 1 //Select Previous Track endif //Left Stick Up if Joystick1.z > .5 and Joystick1.y < -.9 then midi.Control23 = .1 //Pan Left coarse. Use ".01" for fine elseif Joystick1.z < -.5 and Joystick1.y < -.9 then wait 10ms // elseif Joystick1.y < -.9 then midi.Control22 = .01 //Volume up endif //Left Stick Down if Joystick1.z > .5 and Joystick1.y > .9 then midi.Control23 = .9 //Pan Right coarse. Use "1" for fine elseif Joystick1.z < -.5 and Joystick1.y > .9 then wait 10ms // elseif Joystick1.y > .9 then midi.Control22 = 1 //Volume up endif //Left Stick Left if Joystick1.z > .5 and Joystick1.x < -.9 then wait 10ms // elseif Joystick1.z < -.5 and Joystick1.x < -.9 then wait 10ms // elseif Joystick1.x < -.9 then wait 10ms // endif //Left Stick Right if Joystick1.z > .5 and Joystick1.x > .9 then wait 10ms // elseif Joystick1.z < -.5 and Joystick1.x > .9 then wait 10ms // elseif Joystick1.x > .9 then wait 10ms // endif //Right Stick Up if Joystick1.z > .5 and Joystick1.yrot < -.9 then wait 10ms // elseif Joystick1.z < -.5 and Joystick1.yrot < -.9 then wait 10ms // elseif Joystick1.yrot < -.9 then wait 10ms // endif //Right Stick Down if Joystick1.z > .5 and Joystick1.yrot > .9 then wait 10ms // elseif Joystick1.z < -.5 and Joystick1.yrot > .9 then wait 10ms // elseif Joystick1.yrot > .9 then wait 10ms // endif //Right Stick Left if Joystick1.z > .5 and Joystick1.xrot < -.9 then wait 10ms // elseif Joystick1.z < -.5 and Joystick1.xrot < -.9 then midi.Control90 = 1 //Scrub Left Unquantized elseif Joystick1.xrot < -.9 then midi.f7 = True wait 100ms //Scrub Left Quantized endif //Right Stick Right if Joystick1.z > .5 and Joystick1.xrot > .9 then wait 10ms // elseif Joystick1.z < -.5 and Joystick1.xrot > .9 then midi.Control90 = .01 //Scrub Right Unquantized elseif Joystick1.xrot > .9 then midi.fsharp7 = True wait 100ms //Scrub Right Quantized endif