Welcome! Log In Create A New Profile

Advanced

Need help with ambitious project - DJ Hero Midi Control for windows.

Posted by Jezzick 
Re: Need help with ambitious project - DJ Hero Midi Control for windows.
July 21, 2012 02:22AM
Moz77, I am using your script for my dj hero deck and its working great thank you for your contribution it has been of great value to me.

lets say i want to use both decks... and both decks to have individual midi controls not share the same variables. How can I change the script to recognize two decks?
it looks like that script should already allow the left and right decks, with each deck having its own data and variables..
Re: Need help with ambitious project - DJ Hero Midi Control for windows.
July 22, 2012 02:43AM
really? i never tried it i just assumed that since it wasnt described as two decks that it would need to be altered. ill give that a shot thanks for your quick response i do appreciate it.
Re: Need help with ambitious project - DJ Hero Midi Control for windows.
July 22, 2012 03:23AM
ok yes, there are two sets of variables listed on the variables tab in glovepie once the script has been activated.

but, both sets of data were mapped to 1 wiimote. i can see that my other remote is indeed connected, i can open the properties of both remotes and see that i am getting a signal.. so not a pairing problem.

any advice on how i can get glovepie to split the data between the two remotes? if you'd rather not explain it, a link to a tutorial or simple statement to google will do... i dont mind doin the work to figure it out but if someone already knows well then... reinventing the wheel never got anyone anywhere :)

thanks to everyone here for their contributions you guys make my pointless hobbies possible and thats just great. any info on the topic would be greatly appreciated.
yeah, if i remember right, just change all the 'wiimote' to 'wiimote1' and 'wiimote2' for the second controller. it's been a while since i was messing around with that stuff, but that should work
pointless hobbies ftw!!

'Anti-spam software on this server has detected that your message might be spam. You are still allowed to post this message, but it will not be visible in the forums until a moderator approves it. You can now try to re-submit your posting.' O.o
Re: Need help with ambitious project - DJ Hero Midi Control for windows.
July 22, 2012 07:24AM
bout to test it out. got the balance board run'n midi through a script i found, another wiimote w. nunchuck in a differnt prog in VM sending midi over vlan, 3 oldish blackberry bluetoothd with different keymapping input apps, 2 ati old school wonder remotes mapped, but i do have at least have a real midi keyboard from radioshack lol. if i was a rich man, i'd go buy some gear to do all this... but im not so i gotta be creative.

basically, this script isnt just saving me time producing but its saving me $$$ cause i can use all these other perephrial devices to do the same thing expensive midi controllers do pretty much, i wouldnt call these things professional equipment by themselves but it can be done well if its done right. plus most of them are light, portable, cross platform, not going out of style ever, cheap, can do other stuff besides just be a $2000 keyboard, so many advantages to using scripting programs like Glovepie.

im loving glovepie, this loopbe, midiox midi yoke stuff, bluetooth'n up some random stuff in my house, turn'n them into FL studio and ableton midi controllers, traktor is actually fun to use now when before i hated it when someone insisted on me using it, and the ppjoy virtual joystick midi controllers, its like omg.

best forum thread, ever, official. thanks so much for this i can't tell you how much this has improved my daily life lol thats probably sad but i stand by it.
if you like glovepie scripting, you might check out virtual dj pro. it's got a scripting language that makes midi mapping and custom controls waaay easier. i considered switching over to traktor, but once i started mapping the midi, it really wasn't easy, if even possible, to do the same things.

haha, yeah. it took quite some time to even find a bit of info about doing this, and i'm not sure i can even find the original again.
but yeah, if you need any help with any of the scripting, feel free to ask.
Re: Need help with ambitious project - DJ Hero Midi Control for windows.
September 21, 2012 06:07PM
I have returned to publicly confess that I have totally been doing this all wrong. Only now did i realize that there is a cover on the side of the mixer that pops off allowing for two decks to connect with one remote. I have really gone out of my way rewriting the midi mappings for two remotes with two totally different sets of variables... all of the questions I had about why this script is written the way that it is were answered the moment I knocked my mixer off the table and the side covering popped off.

I've been a fool, a noob even, it's so obvious! I cannot believe I have had this stuff since Christmas and I JUST NOW noticed, and now the variables LTT and RTT finally make sense. I have written the MAC address of each wiimote on its assigned set of turntables, and on the wiimote, so I would not have to worry getting them mixed up. My logic was functional, but still incorrect, my perspective on this issue was just so wrong. I suppose the universe has it's own way of dealing out justice and I probably had it coming anyway.

On the other hand it forced me to learn how to script with Glovepie and I have used that knowledge to tackle several other issues I have had with controlling midi in a DAW or DJ program. Thanks for taking the time to post this topic and to help out a random stranger.

Ive been using these things almost every day for 9-10 months and just now noticed.... ridiculous, the shame!
Re: Need help with ambitious project - DJ Hero Midi Control for windows.
February 20, 2013 01:32PM
I stepped away from this project for a while after breaking down and spending money on a new Launchpad but once again have a need for the Wii DJ Hero Midi controller. I'm not sure how I messed things up but my script no longer works.

I was getting an error from MidiYoke saying that feedback was detected. I took that to mean I was sending to the same Midi channel twice. I'm in Windows XP Pro, in sound settings, my default Midi playback device was set to MidiYoke 1. I changed the option to my Tascam US-122. Microsoft GS Wavetable was the only other option. Well that and 16 MidiYoke channels.

So now I see the variables changing in Glovepie as they should, I am getting no feedback errors, but I am not sending Midi from my Wiimotes.

There is another script out, Wii2MIDIv1.4. It differs from this script in the following ways:
1.) It sends Midi notes rather than controls
2.) does not have a line giving a midi.DeviceOut and
3.) rather than saying generic Midi.ControlXX it has Midi.Yoke1.Channel1.C5 listing specific notes

The Wii2MIDI script works. With no deviceout and with the full name of the midi channel. So my thinking was, I will change the DJ Hero script to work the same way. It does not! I even tried taking out all variables except the ones listed in Wii2MIDI and it still doesn't work.

I am almost certain that my error is in the way I have Glovepie using 2 Wiimotes and 2 DJ Hero sets. In setting up 2 sets of variables and 2 Wiimotes I may have messed something up in the configs.

For example, for the crossfader there is a line: if(var.CS<0)var.CS++

That statement is ended at the bottom of the script. But having a CS and CS1, do I not need to have the same line of code with CS1? When I place an End If between the two sets of variables and include: if(var.CS1<0)var.CS1++ Glovepie locks up and my PC fans kick into overdrive.

I would be happy with either:1 Mixer with 2 turntables on right and left and the other mixer being just a mixer, or using a mixer and turntable together as 2 sets. What I REALLY want are the 2 mixers anyway, the turntables are mostly for looks and the 3 extra buttons. So if a 2 turntable 1 mixer on the same Wiimote is the easiest way, I would still like for there to be a way to use other mixer by itself.

Here is the script I have been trying to fix. Any advice would be great. It must be something simple that I'm just not seeing. Either that or I have a bad component in one of my mixers sending errors.

Quote

debug="<"+wiimote.Exists+"> "

if(wiimote.Exists) then
if(key.Space) then
debug+=" *** POKE!! ***"
var.space=true
var.ini=true
endif
if(!var.space) debug+=" Safe to connect. Press SPACE to poke"
else
debug+=" ..waiting to connect.."
wait 10ms
endif

if(var.ini) then
debug+=" Active :D"
if(!var.init) then
WiimotePoke(1, 0x4A400F0, 0x55) // Decrypt
wait 100ms
WiimotePoke(1, 0x4A400FB, 0) // Unknown
wait 100ms
WiimotePoke(1, 0x4A40040, 0)
wait 100ms
WiimoteSend(1, 0x17, 0x04, 0xA4, 0x00, 0xF0, 0, 16) // get type

midi.DeviceOut = 2
midi.DefaultChannel = 1

var.init = true
endif

var.SX = (wiimote2.Exp0 & 0x3F) - 31
var.SY = (wiimote2.Exp1 & 0x3F) - 31
var.BE = !(wiimote2.Exp5 & 0x10)
var.BM = !(wiimote2.Exp4 & 0x10)
var.BP = !(wiimote2.Exp4 & 0x04)
var.ED = ((wiimote2.Exp2 & 0x60) >> 2) + ((wiimote2.Exp3 & 0xE0) >> 5)
var.CS = ((wiimote2.Exp2 & 0x1E) >> 1) - 8
var.RTT =((wiimote2.Exp0 & 0xC0) >> 3) + ((wiimote2.Exp1 & 0xC0) >> 5) + ((wiimote2.Exp2 & 0x80) >> 7)
if (wiimote2.Exp2 & 0x01) var.RTT = var.RTT - 32
var.RBG =!(wiimote2.Exp5 & 0x20)
var.RBR =!(wiimote2.Exp4 & 0x02)
var.RBB =!(wiimote2.Exp5 & 0x04)
var.LTT = (wiimote2.Exp3 & 0x1F)
if (wiimote2.Exp4 & 0x01) var.LTT = var.LTT - 32
var.LBG =!(wiimote2.Exp5 & 0x08)
var.LBR =!(wiimote2.Exp4 & 0x20)
var.LBB =!(wiimote2.Exp5 & 0x80)
var.WONE = Wiimote2.One
var.WTWO = Wiimote2.Two
var.WA = Wiimote2.A
var.WDOWN = Wiimote2.Down
var.WUP = Wiimote2.Up
var.WHOME = Wiimote2.Home
var.WPLUS = Wiimote2.Plus
var.WMINUS = Wiimote2.Minus


var.SX1 = (wiimote1.Exp0 & 0x3F) - 31
var.SY1 = (wiimote1.Exp1 & 0x3F) - 31
var.BE1 = !(wiimote1.Exp5 & 0x10)
var.BM1 = !(wiimote1.Exp4 & 0x10)
var.BP1 = !(wiimote1.Exp4 & 0x04)
var.ED1 = ((wiimote1.Exp2 & 0x60) >> 2) + ((wiimote1.Exp3 & 0xE0) >> 5)
var.CS1 = ((wiimote1.Exp2 & 0x1E) >> 1) - 8
var.RTT1 =((wiimote1.Exp0 & 0xC0) >> 3) + ((wiimote1.Exp1 & 0xC0) >> 5) + ((wiimote1.Exp2 & 0x80) >> 7)
if (wiimote1.Exp2 & 0x01) var.RTT1 = var.RTT1 - 32
var.RBG1 =!(wiimote1.Exp5 & 0x20)
var.RBR1 =!(wiimote1.Exp4 & 0x02)
var.RBB1 =!(wiimote1.Exp5 & 0x04)
var.LTT1 = (wiimote1.Exp3 & 0x1F)
if (wiimote1.Exp4 & 0x01) var.LTT1 = var.LTT1 - 32
var.LBG1 =!(wiimote1.Exp5 & 0x08)
var.LBR1 =!(wiimote1.Exp4 & 0x20)
var.LBB1 =!(wiimote1.Exp5 & 0x80)
var.WONE1 = Wiimote1.One
var.WTWO1 = Wiimote1.Two
var.WA1 = Wiimote1.A
var.WDOWN1 = Wiimote1.Down
var.WUP1 = Wiimote1.Up
var.WHOME1 = Wiimote1.Home
var.WPLUS1 = Wiimote1.Plus
var.WMINUS1 = Wiimote1.Minus


if(var.CS<0)var.CS++
midi.Yoke1.channel1.C1 = var.BE
midi.Yoke1.channel1.C2 = var.BM
midi.Yoke1.channel1.C3 = var.BP
midi.Control3 = MapRange(var.ED,0,31,0,1)
midi.Yoke1.channel1.B1 = var.RBG
midi.Yoke1.channel1.B2 = var.RBB
midi.Yoke1.channel1.B3 = var.RBR
midi.Yoke1.channel1.B4 = var.LBG
midi.Yoke1.channel1.B5 = var.LBB
midi.Yoke1.channel1.B6 = var.LBR
midi.Control6 = MapRange(var.LTT,-30,30,0,1)
midi.Control7 = MapRange(var.RTT,-30,30,0,1)
midi.Control8 = MapRange(var.CS,-7,7,0,1)
midi.Yoke1.channel1.C4 = var.WONE
midi.Yoke1.channel1.C5 = var.WTWO
midi.Yoke1.channel1.C6 = var.WA
midi.Yoke1.channel1.C7 = var.WDOWN
midi.Yoke1.channel1.C8 = var.WUP
midi.Control14 = MapRange(var.SX,-31,32,0,1)
midi.Control15 = MapRange(var.SY,-31,32,0,1)
midi.Yoke1.channel1.Csharp1 = var.WHOME
midi.Yoke1.channel1.Csharp2 = var.WPLUS
midi.Yoke1.channel1.Csharp3 = var.WMINUS+
endif
if(var.CS1<0)var.CS1++
midi.Yoke1.channel1.Csharp4 = var.BE1
midi.Yoke1.channel1.Csharp5 = var.BM1
midi.Yoke1.channel1.Csharp6 = var.BP1
midi.Control22 = MapRange(var.ED1,0,31,0,1)
midi.Yoke1.channel1.A1 = var.RBG1
midi.Yoke1.channel1.A2 = var.RBB1
midi.Yoke1.channel1.A3 = var.RBR1
midi.Yoke1.channel1.A4 = var.LBG
midi.Yoke1.channel1.A5 = var.LBB
midi.Yoke1.channel1.A6 = var.LBR
midi.Control25 = MapRange(var.LTT,-30,30,0,1)
midi.Control26 = MapRange(var.RTT1,-30,30,0,1)
midi.Control28 = MapRange(var.CS1,-7,7,0,1)
midi.Yoke1.channel1.Csharp7 = var.WONE1
midi.Yoke1.channel1.Csharp8 = var.WTWO1
midi.Yoke1.channel1.E1 = var.WA1
midi.Yoke1.channel1.E2 = var.WDOWN1
midi.Yoke1.channel1.E3 = var.WUP1
midi.Control34 = MapRange(var.SX1,-31,32,0,1)
midi.Control35 = MapRange(var.SY1,-31,32,0,1)
midi.Yoke1.channel1.E4 = var.WHOME1
midi.Yoke1.channel1.E5 = var.WPLUS1
midi.Yoke1.channel1.E6 = var.WMINUS1
endif
Re: Need help with ambitious project - DJ Hero Midi Control for windows.
February 20, 2013 07:10PM
One thing for sure wrong with my script is I have LTT assigned twice. Since last post I have decided to just use the right turn table on each mixer to eliminate the need for the LTT variable.

I have managed to get my computer to recieve midi from the wiimote/djhero/glovepie/midiyoke configuration again. However, in the bottom corner of Deckadance (the software I am using) it displays incoming midi signals. It just cycles over and over let its getting constantly hit with midi notes. Must be some place in the script causing an infinate loop of midi notes or something like that.
Re: Need help with ambitious project - DJ Hero Midi Control for windows.
February 21, 2013 01:56AM
Ok sorry to be that guy posting his terrible code in the forum, but right now I'm that guy.

I went back to the original code. Right now I have two wiimotes working. One has a mixer and two turntables. The other has only the mixer. Everything works as it should except my wiimote2 only sends data from the remote. It is ignoring the mixer. The variables all read at their highest , CS at 7, SX and SY at 32, ED at 31.

Will a mixer work by itself or does it have to have at least 1 turntable to function? Here is what I have

Quote

/// Wii DJ Hero Midi Output
// Jezzick (Thanks to Facing Tomorrow and Guy from GlovePie.org)
// Traktor/Osculator changes by Moz

debug="<"+wiimote.Exists+"> "

if(wiimote.Exists) then
if(key.Space) then
debug+=" *** POKE!! ***"
var.space=true
var.ini=true
endif
if(!var.space) debug+=" Safe to connect. Press SPACE to poke"
else
debug+=" ..waiting to connect.."
wait 10ms
endif

if(var.ini) then
debug+=" Active :D"
if(!var.init) then
WiimotePoke(1, 0x4A400F0, 0x55) // Decrypt
wait 100ms
WiimotePoke(1, 0x4A400FB, 0) // Unknown
wait 100ms
WiimotePoke(1, 0x4A40040, 0)
wait 100ms
WiimoteSend(1, 0x17, 0x04, 0xA4, 0x00, 0xF0, 0, 16) // get type

midi.DeviceOut = 2
midi.DefaultChannel = 1

var.init = true
endif

var.SX = (wiimote1.Exp0 & 0x3F) - 31
var.SY = (wiimote1.Exp1 & 0x3F) - 31
var.BE = !(wiimote1.Exp5 & 0x10)
var.BM = !(wiimote1.Exp4 & 0x10)
var.BP = !(wiimote1.Exp4 & 0x04)
var.ED = ((wiimote1.Exp2 & 0x60) >> 2) + ((wiimote1.Exp3 & 0xE0) >> 5)
var.CS = ((wiimote1.Exp2 & 0x1E) >> 1) - 8
var.RTT =((wiimote1.Exp0 & 0xC0) >> 3) + ((wiimote1.Exp1 & 0xC0) >> 5) + ((wiimote1.Exp2 & 0x80) >> 7)
if (wiimote1.Exp2 & 0x01) var.RTT = var.RTT - 32
var.RBG =!(wiimote1.Exp5 & 0x20)
var.RBR =!(wiimote1.Exp4 & 0x02)
var.RBB =!(wiimote1.Exp5 & 0x04)
var.LTT = (wiimote1.Exp3 & 0x1F)
if (wiimote1.Exp4 & 0x01) var.LTT = var.LTT - 32
var.LBG =!(wiimote1.Exp5 & 0x08)
var.LBR =!(wiimote1.Exp4 & 0x20)
var.LBB =!(wiimote1.Exp5 & 0x80)

var.WONE = wiimote1.One
var.WTWO = wiimote1.Two
var.WA = wiimote1.A
var.WDOWN = wiimote1.Down
var.WUP = wiimote1.Up
var.WHOME = wiimote1.Home
var.WPLUS = wiimote1.Plus
var.WMINUS = wiimote1.Minus

var.SX2 = (wiimote2.Exp0 & 0x3F) - 31
var.SY2 = (wiimote2.Exp1 & 0x3F) - 31
var.BE2 = !(wiimote2.Exp5 & 0x10)
var.BM2 = !(wiimote2.Exp4 & 0x10)
var.BP2 = !(wiimote2.Exp4 & 0x04)
var.ED2 = ((wiimote2.Exp2 & 0x60) >> 2) + ((wiimote2.Exp3 & 0xE0) >> 5)
var.CS2 = ((wiimote2.Exp2 & 0x1E) >> 1) - 8

var.WONE2 = wiimote2.One
var.WTWO2 = wiimote2.Two
var.WA2 = wiimote2.A
var.WDOWN2 = wiimote2.Down
var.WUP2 = wiimote2.Up
var.WHOME2 = wiimote2.Home
var.WPLUS2 = wiimote2.Plus
var.WMINUS2 = wiimote2.Minus


if(var.CS<0)var.CS++

if not var.BE == var.BE1 then midi.Control0 = var.BE
if not var.BM == var.BM1 then midi.Control1 = var.BM
if not var.BP == var.BP1 then midi.Control2 = var.BP
if not var.ED == var.ED1 then midi.Control3 = MapRange(var.ED,0,31,0,1)
if not var.RBG == var.RBG1 then midi.Control4 = var.RBG
if not var.RBB == var.RBB1 then midi.Control5 = var.RBB
if not var.RBR == var.RBR1 then midi.Control6 = var.RBR
if not var.RTT == 0 then midi.Control7 = MapRange(var.RTT,-30,30,0,1)
if not var.CS == var.CS1 then midi.Control8 = MapRange(var.CS,-7,7,0,1)
if not var.WONE == var.WONE1 then midi.Control9 = var.WONE
if not var.WTWO == var.WTWO1 then midi.Control10 = var.WTWO
if not var.WA == var.WA1 then midi.Control11 = var.WA
if not var.WDOWN == var.WDOWN1 then midi.Control12 = var.WDOWN
if not var.WUP == var.WUP1 then midi.Control13 = var.WUP
if not var.SX == 0 then midi.Control14 = MapRange(var.SX,-31,32,0,1)
if not var.SY == 0 then midi.Control15 = MapRange(var.SY,-31,32,0,1)
if not var.WHOME == var.WHOME1 then midi.Control16 = var.WHOME
if not var.WPLUS == var.WPLUS1 then midi.Control17 = var.WPLUS
if not var.WMINUS == var.WMINUS1 then midi.Control18 = var.WMINUS

var.SX1 = var.SX
var.SY1 = var.SY
var.BE1 = var.BE
var.BM1 = var.BM
var.BP1 = var.BP
var.ED1 = var.ED
var.CS1 = var.CS
var.RTT1 = var.RTT
var.RBG1 = var.RBG
var.RBR1 = var.RBR
var.RBB1 = var.RBB
var.LTT1 = var.LTT
var.LBG1 = var.LBG
var.LBR1 = var.LBR
var.LBB1 = var.LBB
var.WONE1 = var.WONE
var.WTWO1 = var.WTWO
var.WA1 = var.WA
var.WDOWN1 = var.WDOWN
var.WUP1 = var.WUP
var.WHOME1 = var.WHOME
var.WPLUS1 = var.WPLUS
var.WMINUS1 = var.WMINUS
endif

if(var.CS2<0)var.CS2++

if not var.BE2 == var.BE12 then midi.Control50 = var.BE2
if not var.BM2 == var.BM12 then midi.Control51 = var.BM2
if not var.BP2 == var.BP12 then midi.Control52 = var.BP2
if not var.ED2 == var.ED12 then midi.Control53 = MapRange(var.ED2,0,31,0,1)
if not var.CS2 == var.CS12 then midi.Control58 = MapRange(var.CS2,-7,7,0,1)
if not var.WONE2 == var.WONE12 then midi.Control59 = var.WONE2
if not var.WTWO2 == var.WTWO12 then midi.Control60 = var.WTWO2
if not var.WA2 == var.WA12 then midi.Control61 = var.WA2
if not var.WDOWN2 == var.WDOWN12 then midi.Control62 = var.WDOWN2
if not var.WUP2 == var.WUP12 then midi.Control63 = var.WUP2
if not var.SX2 == 0 then midi.Control64 = MapRange(var.SX2,-31,32,0,1)
if not var.SY2 == 0 then midi.Control65 = MapRange(var.SY2,-31,32,0,1)
if not var.WHOME2 == var.WHOME12 then midi.Control66 = var.WHOME2
if not var.WPLUS2 == var.WPLUS12 then midi.Control67 = var.WPLUS2
if not var.WMINUS2 == var.WMINUS12 then midi.Control68 = var.WMINUS2

var.SX12 = var.SX2
var.SY12 = var.SY2
var.BE12 = var.BE2
var.BM12 = var.BM2
var.BP12 = var.BP2
var.ED12 = var.ED2
var.CS12 = var.CS2
var.WONE12 = var.WONE2
var.WTWO12 = var.WTWO2
var.WA12 = var.WA2
var.WDOWN12 = var.WDOWN2
var.WUP12 = var.WUP2
var.WHOME12 = var.WHOME2
var.WPLUS12 = var.WPLUS2
var.WMINUS12 = var.WMINUS2
endif
Re: Need help with ambitious project - DJ Hero Midi Control for windows.
July 27, 2013 12:22PM
HELP ME !!!!!!!!!!

The dj hero Controller ins connected Tor my PC's Bluetooth
And it works with glovepie's key mapping but MIDI dosn't work
Glovepie US connected to Thema wiimote with TT
Pole ins activate and IT says true
But i can't mapping IT in Traktor
Im using MIDI Yoke

WHATS WRONG ??????????????????
Sorry, only registered users may post in this forum.

Click here to login