// VJamm PS2 script by Jeff Mission – http://beatfix.com
// keymap joystick (or PS2 controller) to control VJamm demo version
// change “Joystick2″ to your joystick # as needed
// optimised for Naki DDR handheld pad
debug=Joystick2.x
if (!Joystick2.Button9) && (!Joystick2.Button10) then {
Key.LeftBracket=Joystick2.Button7
Key.RightBracket=Joystick2.Button5
Key.Backspace=Joystick2.Button7+Joystick2.Button5
key.left=Joystick2.Button6
key.right=Joystick2.Button8
}
if (Joystick2.Button10) {
Key.2=Joystick2.Button7
Key.4=Joystick2.Button5
key.6=Joystick2.Button6
key.8=Joystick2.Button8
key.0=Joystick2.Button9
}
key.P=doubleclicked(Joystick2.Button10)
if (Joystick2.Button9) {
if Joystick2.Button7 then var.mode=0
if Joystick2.Button5 then var.mode=1
key.C=Joystick2.Button6
key.L=Joystick2.Button8
}
key.X=doubleclicked(Joystick2.Button9)
if (var.mode=0) {
Key.Q=Joystick2.Button3
Key.W = (Joystick2.y=-1)
Key.E=Joystick2.Button2
Key.R = (Joystick2.x=-1)
Key.T = (Joystick2.x=1)
Key.Y=Joystick2.Button1
Key.U = (Joystick2.y=1)
Key.I=Joystick2.Button4
}
if (var.mode=1) {
Key.A=Joystick2.Button3
Key.S = (Joystick2.y=-1)
Key.D=Joystick2.Button2
Key.F = (Joystick2.x=-1)
Key.G = (Joystick2.x=1)
Key.H=Joystick2.Button1
Key.J = (Joystick2.y=1)
Key.K=Joystick2.Button4
}
if (var.mode=2) {
Key.LeftBracket=Joystick2.Button3
Key.Backspace = (Joystick2.y=-1)
Key.RightBracket=Joystick2.Button2
Key.left = (Joystick2.x=-1)
Key.right = (Joystick2.x=1)
Key.2=Joystick2.Button1
Key.0 = (Joystick2.y=1)
Key.7=Joystick2.Button4
}
/* — Fractice – Wiimote — */
var.x = (Wiimote.gx + 1) / 2
var.y = (Wiimote.gy + 1) / 2
var.z = (Wiimote.gz + 1) / 2
midi.ByteControl4 = 1
midi.ByteControl11 = 1
midi.ByteControl3 = var.z // color cycling rate A
midi.ByteControl17 = 1-var.y // lissajous speed A
midi.ByteControl22 = 1
midi.ByteControl29 = 1
midi.ByteControl21 = var.z // color cycling rate B
midi.ByteControl35 = 1-var.y // lissajous speed B
var.damping = .9 // ranges from 0 (infinite) to 1 (none)
var.delta = var.x – (1-midi.ByteControl37) // calculate delta from input
var.x = var.x – (var.delta * var.damping) // apply damping and update position
midi.ByteControl37 = 1-var.x // xfader position
debug=var.x
midi.ByteControl42 = .1
/* — Fractice – Buttons — */
if clicked(wiimote.A) then {
if midi.ByteControl41<.5 then midi.ByteControl41=1 else midi.ByteControl41=0
} // mirror
if (var.x>.5)+clicked(wiimote.Plus) then midi.ByteControl5=midi.ByteControl5+1 // zoom in A
if (var.x>.5)+clicked(wiimote.Minus) then midi.ByteControl6=midi.ByteControl6+1 // zoom out A
if (var.x>.5)+clicked(wiimote.up) then midi.ByteControl7=midi.ByteControl7+1 // scroll up A
if (var.x>.5)+clicked(wiimote.down) then midi.ByteControl8=midi.ByteControl8+1 // scroll down A
if (var.x>.5)+clicked(wiimote.left) then midi.ByteControl9=midi.ByteControl9+1 // scroll left A
if (var.x>.5)+clicked(wiimote.right) then midi.ByteControl10=midi.ByteControl10+1 // scroll right A
if (var.x<.5)+clicked(wiimote.Plus) then midi.ByteControl23=midi.ByteControl23+1 // zoom in B
if (var.x<.5)+clicked(wiimote.Minus) then midi.ByteControl24=midi.ByteControl24+1 // zoom out B
if (var.x<.5)+clicked(wiimote.up) then midi.ByteControl25=midi.ByteControl25+1 // scroll up B
if (var.x<.5)+clicked(wiimote.down) then midi.ByteControl26=midi.ByteControl26+1 // scroll down B
if (var.x<.5)+clicked(wiimote.left) then midi.ByteControl27=midi.ByteControl27+1 // scroll left B
if (var.x<.5)+clicked(wiimote.right) then midi.ByteControl28=midi.ByteControl28+1 // scroll right B
// ParticleView by Jeff Matson
// Uses WiiMouse 0.1 by WiiScript.co.nr (sbraidley@yahoo.co.uk)
wiimote.Leds=0
Shift=Equals = wiimote.Up
minus = wiimote.Down
Left = wiimote.Left
Right = wiimote.Right
Mouse.LeftButton = Wiimote.minus
Mouse.RightButton = Wiimote.plus
Mouse.LeftButton= Wiimote.A
//D = wiimote.home
E = wiimote.Two
if doubleclicked(wiimote.A) then {
if var.latch!=1 then var.latch=1 else var.latch=0
}
//(var.latch=1) = Mouse.LeftButton
//(var.latch=0) = Release(Mouse.LeftButton)
//if (var.latch=1) then Mouse.LeftButton=1 else Mouse.LeftButton=0
// Key.B = KeepDown(Mouse.LeftButton = )
if (Wiimote.B || Wiimote.A || var.latch==1) { // begin mouse conditional
var.trimx = 6
var.trimy = -31
var.trimz = 6
var.x = Wiimote.RawForceX + var.trimx
var.y = Wiimote.RawForceY + var.trimy
var.z = Wiimote.RawForceZ + var.trimz
var.sense0 = 1000
var.thresh0x = 2
var.thresh0y = 1
var.sense = 300
var.threshx = 10
var.threshy = 5
var.sense2 = 100
var.thresh2x = 15
var.thresh2y = 8
var.sense3 = 50
var.thresh3x = 20
var.thresh3y = 12
if var.x > var.thresh0x then mouse.x = mouse.x – 1/var.sense0
if var.x < -var.thresh0x then mouse.x = mouse.x + 1/var.sense0
if var.z > var.thresh0y then mouse.y = mouse.y – 1/var.sense0
if var.z < -var.thresh0y then mouse.y = mouse.y + 1/var.sense0
if var.x > var.threshx then mouse.x = mouse.x – 1/var.sense
if var.x < -var.threshx then mouse.x = mouse.x + 1/var.sense
if var.z > var.threshy then mouse.y = mouse.y – 1/var.sense
if var.z < -var.threshy then mouse.y = mouse.y + 1/var.sense
if var.x > var.thresh2x then mouse.x = mouse.x – 1/var.sense2
if var.x < -var.thresh2x then mouse.x = mouse.x + 1/var.sense2
//yaxis
if var.z > var.thresh2y then mouse.y = mouse.y – 1/var.sense2
if var.z < -var.thresh2y then mouse.y = mouse.y + 1/var.sense2
if var.x > var.thresh3x then mouse.x = mouse.x – 1/var.sense3
if var.x < -var.thresh3x then mouse.x = mouse.x + 1/var.sense3
if var.z > var.thresh3y then mouse.y = mouse.y – 1/var.sense3
if var.z < -var.thresh3y then mouse.y = mouse.y + 1/var.sense3
}
end if
debug = var.x + ” ” + var.y + ” ” + var.z
midi.DeviceOut = midi.yoke1.DeviceOut
debug=wiimote.gx
wiimote.leds=0
/* — WiiWhorld – Buttons — */
f6 = Wiimote.Down // fill
f7 = Wiimote.Up // outline
backspace = Wiimote.Left // reverse
backslash =Wiimote.Right // convex
f8 = doubleclicked(wiimote.Up) // xray
f5 = doubleclicked(wiimote.Down) // mirror
delete = wiimote.A // clear
esc = wiimote.home + wiimote.A // panic
f3 = Wiimote.One // rotate hue
f2 = doubleclicked(Wiimote.One) // loop hue
f4 = Wiimote.Two // invert color
if (Wiimote.plus) then midi.ByteControl22=midi.ByteControl22+.01 // zoom in
if (Wiimote.minus) then midi.ByteControl22=midi.ByteControl22-.01 // zoom out
if (doubleclicked(wiimote.plus)) then midi.ByteControl22=.8
if (doubleclicked(wiimote.minus)) then midi.ByteControl22=.2
if (doubleclicked(wiimote.home)) then midi.ByteControl25=.2
/* — WiiWhorld – Wiimote — */
var.x = (Wiimote.gx + 1) / 2
var.y = (Wiimote.gy + 1) / 2
var.z = (Wiimote.gz + 1) / 2
if (wiimote.b) then {
midi.ByteControl66 = var.x // global rotate
midi.ByteControl22 = var.z // zoom
} else {
midi.ByteControl5 = var.x // rotate speed
midi.ByteControl13 = var.z // saturation
} end if
/* — WiiWhorld – Nunchuk — */
if (Wiimote.HasNunchuk) {
var.nx = (Wiimote.Nunchuk.gx + 1) / 2
var.ny = (Wiimote.Nunchuk.gy + 1) / 2
var.nz = (Wiimote.Nunchuk.gz + 1) / 2
var.jx = (Wiimote.Nunchuk.JoyX + 1) / 2
var.jy = (Wiimote.Nunchuk.JoyY + 1) / 2
//midi.playback.firstnote = var.jx * 127 // musical joystick
//midi.playback.secondnote = var.jy * 127
if Wiimote.Nunchuk.ZButton {
midi.ByteControl23=.3 // damping
midi.ByteControl24=.8 // trail
midi.ByteControl31 = var.jx // origin x
midi.ByteControl32 = var.jy // origin y
midi.ByteControl9 = var.nx // star factor
midi.ByteControl10 = var.nz // pinwheel
} else if Wiimote.Nunchuk.CButton {
midi.ByteControl72 = var.jx // global even curve
midi.ByteControl73 = var.jy // global odd curve
midi.ByteControl31 = 1-var.nx // origin x
midi.ByteControl32 = 1-var.nz // origin y
} else {
midi.ByteControl70 = var.jx // global star factor
midi.ByteControl71 = var.jy // global pinwheel
midi.ByteControl11 = var.nx
midi.ByteControl21 = var.nz
} end if
} end if
// Speech Commands (requires http://www.ics.forth.gr/uachess/downloads/IE-speech_add-in_v1.zip)
// to activate – hold home button, say “voice” – wait for computer to confirm
if (wiimote.home and said(”voice”)) {
wait 100ms
if var.voice=0 {
say(”voice on”)
var.voice=1
} else {
say(”voice off”)
var.voice=0
}
}
if var.voice==1 {
//right=said(’next’)
backspace=said(’back’)
delete=said(’clear’)
esc=said(’panic’)
spacebar=said(’stop’)
spacebar=said(’go’)
f5=said(’mirror’)
f6=said(’fill’)
f7=said(’outline’)
f8=said(’xray’)
f9=said(’phase’)
f10=said(’new’)
ctrl+f11=said(’vj’)
shift+r=said(’random’)
shift+c=said(’center’)
shift+d=said(’drag’)
ctrl+a=said(’auto’)
backslash=said(’convex’)
alt+f=said(’file’)
ctrl+o=said(’load patch’)
ctrl+shift+o=said(’load playlist’)
ctrl+r=said(’record’)
up=said(’up’)
down=said(’down’)
//left=said(’left’)
//right=said(’right’)
enter=said(’enter’)
} end if
//debug = midi.OutDevName
A GlovePIE script for DJ mixing in the software djDecks.
// djDecks script by Jeff Mission – http://beatfix.com
// Make sure numlock is ON
if wiimote.leds=240 then wiimote.leds=0 // fix led bug
Numpad2=wiimote.one+wiimote.up or wiimote.two+wiimote.up // xfader step left
Numpad4=wiimote.a+wiimote.up // xfader left
Numpad8=wiimote.one+wiimote.down or wiimote.two+wiimote.down // xfader step right
Numpad6=wiimote.a+wiimote.down // xfader right
Numpad5=wiimote.a+wiimote.left // xfader center
ctrl+down=wiimote.home+wiimote.left // playlist scroll down
ctrl+up=wiimote.home+wiimote.right // playlist scroll up
ctrl+left=wiimote.one+wiimote.home // load track Deck A
ctrl+right=wiimote.two+wiimote.home // load track Deck B
A = wiimote.one+wiimote.right // bass up Deck A
Z = wiimote.one+wiimote.left // bass down Deck A
F = wiimote.two+wiimote.right // bass up Deck B
V = wiimote.two+wiimote.left // bass down Deck B
I = wiimote.one+wiimote.Plus // pitch bend up Deck A
U = wiimote.one+wiimote.Minus // pitch bend down Deck A
P = wiimote.two+wiimote.Plus // pitch bend up Deck B
O = wiimote.two+wiimote.Minus // pitch bend down Deck B
ctrl+f10 = wiimote.one+doubleclicked(wiimote.Plus) // pitch up Deck A
ctrl+f9 = wiimote.one+doubleclicked(wiimote.Minus) // pitch down Deck A
ctrl+f12 = wiimote.two+doubleclicked(wiimote.Plus) // pitch up Deck B
ctrl+f11 = wiimote.two+doubleclicked(wiimote.Minus) // pitch down Deck B
f2=wiimote.one+wiimote.A+wiimote.B // play / pause Deck A
f6=wiimote.two+wiimote.A+wiimote.B // play / pause Deck B
f3=wiimote.one+doubleclicked(wiimote.b) // cue Deck A
f7=wiimote.two+doubleclicked(wiimote.b) // cue Deck B
f4=wiimote.one+doubleclicked(wiimote.a) // loop Deck A
f8=wiimote.two+doubleclicked(wiimote.a) // loop Deck B
pageup = wiimote.home+doubleclicked(wiimote.plus) // master volume up
pagedown = wiimote.home+doubleclicked(wiimote.minus) // master volume down
// The following require custom keyboard bindings in djDecks
key.equals = doubleclicked(wiimote.home) // tempo sync (Auto button)
//key.8 = wiimote.home+wiimote.one // cue on/off Deck A
//key.9 = wiimote.home+wiimote.two // cue on/off Deck B