dovemouse
Joined: 28 Jul 2008 Posts: 2
Digg It |
Posted: Mon Jul 28, 2008 1:02 pm Post subject: Random MIDI controls sent in Live :s |
|
|
I'm having serious problems with a script switch code and i feel i have tried everything!
I am building a USB HID device for use with live.
This is the code im using, i want to be able to have a number of latching switch to change what the rest of my momentary switches send to Live.
(sorry if the code looks a bit wierd but i took a hacksaw to a Wii remote one)
| Code: | if !var.Initialize
var.TotalScripts = 4
var.CurrentScript = 1
var.Initialize = true
endif
var.SwitchScript = true
if (joystick1.button1)
var.CurrentScript = 1
elseif (joystick1.button2)
var.CurrentScript = 2
elseif (joystick1.button3)
var.CurrentScript = 3
else
var.CurrentScript = 4
endif
if var.CurrentScript = 1
midi.control1 = joystick2.button1
midi.control2 = joystick2.button2
midi.control3 = joystick2.button3
elseif var.CurrentScript = 2
//insert script 2
elseif var.CurrentScript = 3
//insert script 3
elseif var.CurrentScript = 4
midi.control11 = joystick2.button1
midi.control12 = joystick2.button2
midi.control13 = joystick2.button3
endif
endif
debug = var.SwitchScript + " " + var.CurrentScript |
It looks like it works but whenever i try to assign stuff into Live it shows up as though its recieving other midi signals from somewhere. For exampleholding down joystick button 1 and pressing key a should give Live a cc1 but it comes up with 63 or something stupid. Any ideas what i should do, i might try using an older version as i hear there are some problems with the newest one. But still, any suggestion would be great!
I have recntly changed the script to send key presses which works fine but i'll be sharing a laptop with another person and if they need keys then they're gonna be looping my samples....problem!
Thanks for any suggestions
Steve.[/code] |
|