Here is a script for 2 Gamepads that I’ve just made for Glovepie. This script will translate your button, thumbstick and POV into midi.
I’m hoping this might help some of you get your gamepads communicating with your DJ software.
Please note that I use Windows XP although I have been told Glovepie works fine with Windows 7 too. You also need to have Midiyoke or the equivilant installed first.
This script will give you per Gamepad.
Buttons = 12
POV = Left, Right, Up, Down
Analogs = 4 (x, y, z, z roll)
here’s another one - just one joypad but it has different ‘scenes’ so it might help other people with glovepie programming:
[quote]I wrote a govePIE-script which converts the data of a USB-Joypad into MIDIdata. So you can fire patterns in your sequencer-software by pressing the buttons and squirl filters and effekts with the 2 analog sticks.
All you need is glovepie (a freeware programmable input emulator), direct x8 (or higher) and a programm to route the midisignal inside your computer (e.g. midiox). Then run the script….
Here is a short describtion:
ALL DATA send on midichannel 3
40 BUTTONS (4 Scenes a 10 Buttons)
buttons send a single midinote when pressed* -ideal for fire patterns in Ableton LIVE
scene selection: press and hold button 5 / 6 / 5+6 / none (left front)
buttons: 1-4 (right top), 7-8 (right front), cooliehat (left top)
*(read scene comments for details)
ANALOG STICKS got 2 modes (independent from the button scene selection):
button 9 (left stick) or 10 (right stick) pressed*:
x-axis (left-right) 0-127 (CC 99 / CC 20)
y-axis (bottom-top) 0-127 (CC 100 / CC 21)
if you release the button,the value holds the last position until pressed again
normal (no button pressed):
x-axis (left-right) 0-127 (CC 96 / CC 22)
y-axis (middle-top) 0-127 * (CC 97 / CC 23)
y-axis (middle-bottom) 0-127 * ** (CC 98 / CC 24)
(done that way to get a defined zero at middle position)
**(this value tends to stuck… move stick slowely or even dont use it! damn bug)
This script might be quite complex, to get a huge output from the few buttons and analog sticks, but it is really easy to handle and ergonomic…. i played it the whole weekend and had so much fun, i even couldn´t stop it
And - if you want to make some changes - the script is easily to edit…. [/quote]
A newbie here, I want to use glove pie and loopmidi for my gamepad controller but I don’t know how this two will help me, I alreasy installed loopmidi and use your glovepie scripts but I have a bad time in mapping it in traktor. thank you for your reply in advance
before mapping in traktor u need to check/confirm that the script is converting the right button presses etc into midi. the variables tab will show u any variables that change value, tho dont remember if the script actually uses any.
if the midi activity light in trakor lights up when ever u press any button u might be good to go anyway though.
something like midiox (for windows) is handy to check that midi data is being sent for each button press. make sure you’re not trying to run traktor attached to the loopmidi port at the same time tho.
Thanks zestoi, Actually this the are things I done for the last couple of hours, I installed midi yoke in windows 7, then I downloaded glovepie and Extra Classic Script, when I ran the script I hear some tone when I press each button, I realize it was a good indication so I went mapping it with traktor pro, but at this point I dont know how to do it. and maybe I am missing something, I also tried to use rejoice but nothing happens, hope you will help me. thanks again
not sure what/where the sounds are that you’re hearing - but in traktor make sure you create a new generic midi device in the controller manager and then select the loopMIDI input port for it.
from there you just add>in whatever u want to try - going for something easy like ‘play’ first or something i guess - then click ‘learn’ and press the button u want. also select the deck u want it to control, or u can make the whole config/tsi deck focussed by selecting a global default - i’ve never done that tho.
i think the sounds come from some sort of internal MIDI converter from Windows, which turns the notes from your script into sounds (as MIDI notes were supposed to).
add the following line:
midi.DeviceOut = 2
the default setting is 1, which is the windows midi device mentioned above.
depending on you configuration you might have to choose device 3, just see what works for you.
Thanks zestoi and derschaich, I have managed to use midi yoke and rejoice and mapped some buttons in traktor pro using my gamepad, but i never tried to control the it with my analogs, I would like to use it for volume and effects, do you think it would be possible using rejoice?
the trick i always use is to add this to your config:
debug = midi.OutDevName
then the name of the output device will be shown in a small debug text box near the top of glovepie. i always have it in my configs as i often change midi devices so always need to confirm that the right one is selected.
alternatively you can use this bit of code i wrote that then lets you select the port by name and not id. personally i don’t use it as i think it’s overkill and only takes a couple of tweaks and restarts to get the right device selected by id:
var.DevName = "test"
if (var.Init == 0) then
for var.Count = 0 to 20 do
midi.DeviceOut = var.Count
if (midi.OutDevName ~= var.DevName) then
debug = "Selected: " + midi.OutDevName + " at id=" + floor(var.Count)
var.Count = 21 // end the loop
end if
end for
var.init = 1
endif
that code only gets run the very first time (due to the var.Init stuff) and then displays your selected device in the same debug area i mentioned before.
debug textbox is in the top right corner of glovePIE, ,make sure you start the script before searching the debug-box
analogues are easy to incorporate into the scrips, as the analogues of your gamepad register as the x,y,z axis of a joystick as in the end of my script:
thanks for this, I got it working thanks to you guys, now I am thinking about the mapping, can you suggest some reminders in mapping your gamepad midi controller because I cant decide the functions of each button because I want it to be useful as I expected..thank you in advance ;D