Use anything as a MIDI/OSC controller with GlovePIE

Share your favorite Ableton Live tips, tricks, and techniques.
forge
Posts: 17422
Joined: Wed Apr 21, 2004 9:47 am
Location: Queensland, AU
Contact:

Post by forge » Thu Apr 03, 2008 11:58 am

are you trying this in a blank set? MIDI Control 37 isn't mapped somewhere is it?

are any of the things in the troubleshooter menu - or anywhere else ticked?

maybe you should try re-installing Glove PIE

I jsut cant understand this

rutgermuller
Posts: 290
Joined: Thu May 31, 2007 11:27 pm

Post by rutgermuller » Thu Apr 03, 2008 12:01 pm

forge wrote:okay I'm pretty stumped here now

if you enter MIDI map mode and select a knob and press minus and move the Wiimote does it map a CC?
No, the command midi1.Control37= (EnsureMapRange(var.zRot, -13,13, 0,1)) just isn't working for me I think :). No CC is coming through to live.

I posted it up here http://www.wiili.org/forum/problem-with ... html#18683
don't know if i formulated the problem very well, else you can ask me to edit.

rutgermuller
Posts: 290
Joined: Thu May 31, 2007 11:27 pm

Post by rutgermuller » Thu Apr 03, 2008 12:04 pm

forge wrote:are you trying this in a blank set? MIDI Control 37 isn't mapped somewhere is it?

are any of the things in the troubleshooter menu - or anywhere else ticked?

maybe you should try re-installing Glove PIE

I jsut cant understand this
Blank set, like in the video. But do you really think the problem is with live? As the LED should light up outside of Live?

I'm using glovepie 0.3 , you?

Maybe there's something wrong with my MidiYoke...?

rutgermuller
Posts: 290
Joined: Thu May 31, 2007 11:27 pm

Post by rutgermuller » Thu Apr 03, 2008 12:11 pm

HOLY SHIT I just tried glovepie 0.25 and it works!

Reinstalled 0.30 now : doesn't work.

Do you have to upgrade Forge?

forge
Posts: 17422
Joined: Wed Apr 21, 2004 9:47 am
Location: Queensland, AU
Contact:

Post by forge » Thu Apr 03, 2008 12:18 pm

rutgermuller wrote:
forge wrote:are you trying this in a blank set? MIDI Control 37 isn't mapped somewhere is it?

are any of the things in the troubleshooter menu - or anywhere else ticked?

maybe you should try re-installing Glove PIE

I jsut cant understand this
Blank set, like in the video. But do you really think the problem is with live? As the LED should light up outside of Live?

I'm using glovepie 0.3 , you?

Maybe there's something wrong with my MidiYoke...?
are you entering MIDI map mode at all? just wondering if maybe it's getting mapped somewhere accidentally

maybe trying a reinstall of Glove PIE and MIDI yoke might help, I just dont understand why this isnt working

well if Control 37 was mapped then maybe automap wouldnt work

just trying to rule out every link in the chain - if you can map a MIDI control in Live from the Wiimote then it could be the UserConfig.txt side of it...etc

I dont see why that line would work for me and not for you unless there was something up with either midi1 or control37 because they are what relies on some other component (i.e. MIDI yoke and Live) the rest of that line works for me so it should work for you

so it feels like it must be something to do with MIDI yoke

forge
Posts: 17422
Joined: Wed Apr 21, 2004 9:47 am
Location: Queensland, AU
Contact:

Post by forge » Thu Apr 03, 2008 12:19 pm

8O 8O 8O

I have 0.3!!!!

this makes me wonder - is something on by default in 0.3 that isnt on in 0.25 - maybe something is ticked somewhere that maybe I unticked somewhere along the line??

forge
Posts: 17422
Joined: Wed Apr 21, 2004 9:47 am
Location: Queensland, AU
Contact:

Post by forge » Thu Apr 03, 2008 12:32 pm

okay...I'm going to sleep - can you live with 0.25?

let me know how you get on!

rutgermuller
Posts: 290
Joined: Thu May 31, 2007 11:27 pm

Post by rutgermuller » Thu Apr 03, 2008 1:39 pm

forge wrote:okay...I'm going to sleep - can you live with 0.25?

let me know how you get on!
hey forge.. works with 0.29 too. Tried 0.30 again, nothing.
Must be something different indeed. Sleep soundly.

rutgermuller
Posts: 290
Joined: Thu May 31, 2007 11:27 pm

Post by rutgermuller » Thu Apr 03, 2008 1:42 pm

"MapRange functions not working in GlovePie 0.30 ???"
http://www.wiili.org/forum/maprange-fun ... t3786.html

rutgermuller
Posts: 290
Joined: Thu May 31, 2007 11:27 pm

Post by rutgermuller » Thu Apr 03, 2008 1:54 pm

I read the topic and used their tips. It works now like this:

Code: Select all

midi1.Control30= EnsureMapRange(var.zRot, -13.0, 13.0, 0.0, 1.0)
added space next to the comma's (the comma turned from green to blue i believe, so glovepie was happy). And I added .0 to the numbers, I think that was the one that really fixed it.


Complete script.

Code: Select all

//Forge's Ableton script to control Macros with instant mapping
//thanks to Chris Vine

//pressing A triggers C0
midi1.channel3.C0 = Wiimote1.B

//these variables are created to help smooth the controls
//I'm exploring how to make it smoother
var.xRot = smooth((Wiimote1.gx * 30), 15)
var.yRot = smooth((Wiimote1.gy * 30), 15)
var.zRot = smooth((Wiimote1.gz * 30), 15)


//press keys to Map MIDI controls in Live - Wii changes too much to map
//easily - control30 uses A just because I added it later
//this is not case sensitive, a different command is probably needed to
// select case - I will explore better key commands with modifiers later

midi.Control30 = Keyboard.a

midi.Control31 = Keyboard.Q

midi.Control32 = Keyboard.W

midi.Control33 = Keyboard.E

midi.Control34 = Keyboard.R

midi.Control35 = Keyboard.T

midi.Control36 = Keyboard.Y

midi.Control37 = Keyboard.U

midi.Control38 = Keyboard.I

midi.Control39 = Keyboard.O

midi.Control41 = Keyboard.P

midi.Control42 = Keyboard.k

midi.Control43 = Keyboard.l


/* if A is pressed these controls are active
pointing the Wiimote upwards turns the knobs to 100%
*/

if Wiimote1.A = true {
midi1.Control30= EnsureMapRange(var.zRot, -13.0, 13.0, 0.0, 1.0)
midi1.Control31= EnsureMapRange(var.xRot, -13.0, 13.0, 0.0, 1.0)
midi1.Control32= EnsureMapRange(var.yRot, -13.0, 13.0, 0.0, 1.0)
}


//with Left D-pad button held, Wiimote pitch controls Macro 1 and
//LED 1 lights up
if Wiimote1.Left = true {
midi3.Control33 = EnsureMapRange(var.zRot, -13.0, 13.0, 0.0,1.0)
Wiimote1.Led1 = true
else
Wiimote1.Led1 = false
}

//with Up D-pad button held, Wiimote pitch controls Macro 2 and
//LED 2 lights up
if Wiimote1.up = true {
midi3.Control34 = EnsureMapRange(var.zRot, -13.0, 13.0, 0.0,1.0)
Wiimote1.Led2 = true
else
Wiimote1.Led2 = false
}

//with Right D-pad button held, Wiimote pitch controls Macro 3 and
//LED 3 lights up
if Wiimote1.Right = true {
midi3.Control35= EnsureMapRange(var.zRot, -13.0, 13.0, 0.0,1.0)
Wiimote1.Led3 = true
else
Wiimote1.Led3 = false
}

//with Down D-pad button held, Wiimote pitch controls Macro 4 and
//LED 4 lights up
if Wiimote1.Down = true {
midi3.Control36= EnsureMapRange(var.zRot, -13.0, 13.0, 0.0,1.0)
Wiimote1.Led4 = true
else
Wiimote1.Led4 = false
}

//with minus button held, Wiimote pitch controls Macro 5 and
//LED 1 lights up
if Wiimote1.Minus = true {
//midi1.Control33= (EnsureMapRange(var.zRot, -13,13, 0,1))
midi3.Control37= EnsureMapRange(var.zRot, -13.0, 13.0, 0.0,1.0)
Wiimote1.Led1 = true
else
Wiimote1.Led1 = false
}

//with plus button held, Wiimote pitch controls Macro 6 and
//LED 2 lights up
if Wiimote1.Plus = true {
midi3.Control38= EnsureMapRange(var.zRot, -13.0, 13.0, 0.0,1.0)
Wiimote1.Led2 = true
else
Wiimote1.Led2 = false
}

////with the '1' button held, Wiimote pitch controls Macro 7 and
//LED 3 lights up
if Wiimote1.one = true {
midi3.Control39= EnsureMapRange(var.zRot, -13.0, 13.0, 0.0,1.0)
Wiimote1.Led3 = true
else
Wiimote1.Led3 = false
}

//with the '2' button held, Wiimote pitch controls Macro 8 and
//LED 4 lights up
if Wiimote1.two = true {
midi3.Control40= EnsureMapRange(var.zRot, -13.0, 13.0, 0.0,1.0)
Wiimote1.Led4 = true
else
Wiimote1.Led4 = false
}

// if home is pressed, these controls are active - I use them like this:
//41: Grain delay dry/wet or send; 42: GDelay Pitch,
//43: GDly feedback - this is all still being worked out
if Wiimote1.Home = true {
midi1.Control41= EnsureMapRange(var.xRot, 13.0, -13.0, 0.0,1.0)
midi1.Control42= EnsureMapRange(var.yRot, 13.0, -13.0, 0.0,1.0)
midi1.Control43= EnsureMapRange(var.zRot, 13.0, -13.0, 0.0,1.0)
}

rutgermuller
Posts: 290
Joined: Thu May 31, 2007 11:27 pm

Post by rutgermuller » Thu Apr 03, 2008 6:48 pm

Works real smooth too. Thanks!

But I still have to midi map myself. No problem...but isn't that what the instant mapping is about. I just don't get principle? Kid Qualuudes script doesn't use instan mapping for example and works too. What's the difference in functionality? What does the blue hand do. I thought i cuold click another macro rack too now and the blue hand would appear there... but no.

Thanks

forge
Posts: 17422
Joined: Wed Apr 21, 2004 9:47 am
Location: Queensland, AU
Contact:

Post by forge » Thu Apr 03, 2008 9:57 pm

rutgermuller wrote:Works real smooth too. Thanks!

But I still have to midi map myself. No problem...but isn't that what the instant mapping is about. I just don't get principle? Kid Qualuudes script doesn't use instan mapping for example and works too. What's the difference in functionality? What does the blue hand do. I thought i cuold click another macro rack too now and the blue hand would appear there... but no.

Thanks
no you shouldnt have to map anything - you should selecte the device, hold a button on the Wiimote and the knobs turn when you tilt it

you dont have 'lock to control surface' ticked on the device do you?

rutgermuller
Posts: 290
Joined: Thu May 31, 2007 11:27 pm

Post by rutgermuller » Thu Apr 03, 2008 10:10 pm

Yeah that was ticked, thanks. So now the blue hand moves from device to device...

but controlling doesn't work without me mapping. And if I map the mapping doesn't follow the blue hand around
You say no midi mapping is needed so why does your project have midi mappings?

forge
Posts: 17422
Joined: Wed Apr 21, 2004 9:47 am
Location: Queensland, AU
Contact:

Post by forge » Thu Apr 03, 2008 10:14 pm

rutgermuller wrote:Yeah that was ticked, thanks. So now the blue hand moves from device to device...

but controlling doesn't work without me mapping. And if I map the mapping doesn't follow the blue hand around
You say no midi mapping is needed so why does your project have midi mappings?
my project only has mappings for the sends etc - you use a different button

so now instant mapping's not working? FFS this really doesnt want to work for you

didnt you say that at one point pressing the keys made the controls jump?

actually - I think by adding the 0,0 you have made the range 0,0 so it has nowhere to turn

it should be 0,1

forge
Posts: 17422
Joined: Wed Apr 21, 2004 9:47 am
Location: Queensland, AU
Contact:

Post by forge » Thu Apr 03, 2008 10:15 pm

in that thread you linked:
for me, the solution I foudn is never using an integer, if the number doesn't have any decimal cases, add .0 to it
for example:
Code:
var.Test = MapRange (Wiimote.Pitch, -90.0 degrees,90.0 degrees, 0.0,1.0)

Post Reply