WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Random MIDI controls sent in Live :s

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie
View previous topic :: View next topic  
Author Message
dovemouse



Joined: 28 Jul 2008
Posts: 2

Digg It
PostPosted: 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 Smile

Steve.[/code]
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group