HELP: Analog Joystick + GlovePIE
HELP: Analog Joystick + GlovePIE Posted on: 10.01.2009 by Joesph Vincze I'm trying to get GlovePIE working with some analog joysticks on a gamepad.How can I get the value to return to 63 after I move the joystick? i.e. How can I get the knob to return to the middle position after I have moved it? Code:
//ANALOG STICKS midi.Channel2.Control1=Joystick2.x/250 | |
Kathlyn Herrada 23.06.2010 |
Originally Posted by kaleaf
|
Kathlyn Herrada 22.06.2010 |
Originally Posted by extraclassic
SAME thing extraclassic ... ... so this only means that the code does the same thing but writen in another way ... and implicitly i believe overal the code works ... picks-up de signal sent by the joystick and converts it to MIDI signal ... the weird thing is that in Windows XP when pressing the joystick/"controller" - there was NO sound in a desktop environment and while in Traktor OR Ableton midi "lights" were signaling MIDI input ... also when assigning a button to a MIDI signal everything went perfect ... NOW in Windows 7 ... i hear the classic piano sound - on notes even - everyjoystick/"controller" button is a piano note ... the thing is thow that no MIDI software can pick-up MIDI signal ... nothing ... absolutelly nothing ... piano sound everytime - BUT NO MIDI signal in midi apps. hope i gave a better description this time and hopefully at least one person encountered the same issue with Windows 7 -> and has a solution . thanks. |
Kathlyn Herrada 20.06.2010 |
Originally Posted by extraclassic
|
Kathlyn Herrada 20.06.2010 |
Originally Posted by kaleaf
actually here it it - http://www.benryves.com/products/vistamidi and http://www.softpedia.com/get/Multime...I-Picker.shtml ... thanks for tha tip - i'll try that asap and come back with details. |
Joan Kollmorgen 19.06.2010 |
Originally Posted by alequ
Anyway found this script by Cheft over at the glove pie community . //DUEL ACTION GAMEPAD TO MIDI //WRITTEN FOR MIDI CHAN 1 ON JOYSTICK #1 midi.DefaultChannel=1 //BUTTONS midi.C1=joystick1.Button1 midi.D1=joystick1.Button2 midi.E1=joystick1.Button3 midi.F1=joystick1.Button4 //TOP BUTTONS midi.G1=joystick1.Button5 midi.A1=joystick1.Button6 midi.B1=joystick1.Button7 midi.C2=joystick1.Button8 //SELECT/START BUTTONS midi.D2=joystick1.Button9 midi.E2=joystick1.Button10 //STICK BUTTONS midi.F2=joystick1.Button11 midi.G2=joystick1.Button12 //POV midi.A2=joystick1.Pov1Up midi.B2=joystick1.Pov1Down midi.C3=joystick1.Pov1Left midi.D3=joystick1.Pov1Right //midi.E3=joystick1.Pov1Center //ANALOG STICKS midi.Control1=(joystick1.x/261)+64 midi.Control2=(joystick1.y/261)+64 midi.Control3=(joystick1.z/261)+64 midi.Control4=(joystick1.roll/261)+64 Not sure if its what your after but it helped me figure things out Thanks to Cheft |
Kathlyn Herrada 19.06.2010 | here a pic of the "device" ... everything's fine but the codes ... _DSC0002.jpg this is what i comed up with in GP: " //BUTTONS midi.Channel.C1=joystick1.Button1 midi.Channel.D1=joystick1.Button2 midi.Channel.E1=joystick1.Button3 midi.Channel.F1=joystick1.Button4 //TOP BUTTONS midi.Channel.G1=joystick1.Button5 midi.Channel.A1=joystick1.Button6 midi.Channel.B1=joystick1.Button7 midi.Channel.C2=joystick1.Button8 //SELECT/START BUTTONS midi.Channel.D2=joystick1.Button9 midi.Channel.E2=joystick1.Button10 //STICK BUTTONS midi.Channel.F2=joystick1.Button11 midi.Channel.G2=joystick1.Button12 //POV midi.Channel.A2=joystick1.Pov1Up midi.Channel.B2=joystick1.Pov1Down midi.Channel.C3=joystick1.Pov1Left midi.Channel.D3=joystick1.Pov1Right //ANALOG STICKS midi.channel1.Slider1Fine=MapRange(Joystick1.x, -1,1, 0,1) midi.channel1.Slider2Fine=MapRange(Joystick1.z, -1,1, 0,1) midi.channel1.Slider3Fine=MapRange(Joystick1.y, -1,1, 0,1) midi.channel1.Slider4Fine=MapRange(Joystick1.roll, -1,1, 0,1) " what this does in WIN7 x64 is ... plays a piano sound when pressing diferent buttons on the "controller" ... also .. trktor for example does not detect as midi input wher learn function is on ... ableton also ... in XP worked OK ... any advices ? pointers ? |
Joan Kollmorgen 23.06.2010 | Glad you got it sorted in the end. |
Kathlyn Herrada 23.06.2010 |
Originally Posted by kaleaf
|
Latia Pfleider 22.06.2010 | alequ, I believe whats happening is you sending you midi to windows default midi in,, like windows was a keyboard and you were pluged into "in". I believe your missing the part where you need to be on a "in" that a program can use. You could run a midi cord out of your midi out port then back to the in port then traktor can use it or you can use loopbe. also remember when you do that to manually set device number ... midi2.channel1.... midi3.channel1 ect and... if you want to shoot me a pm of what you want mapped I can make a script and test it for you. |
Kathlyn Herrada 22.06.2010 |
Originally Posted by extraclassic
SAME thing extraclassic ... ... so this only means that the code does the same thing but writen in another way ... and implicitly i believe overal the code works ... picks-up de signal sent by the joystick and converts it to MIDI signal ... the weird thing is that in Windows XP when pressing the joystick/"controller" - there was NO sound in a desktop environment and while in Traktor OR Ableton midi "lights" were signaling MIDI input ... also when assigning a button to a MIDI signal everything went perfect ... NOW in Windows 7 ... i hear the classic piano sound - on notes even - everyjoystick/"controller" button is a piano note ... the thing is thow that no MIDI software can pick-up MIDI signal ... nothing ... absolutelly nothing ... piano sound everytime - BUT NO MIDI signal in midi apps. hope i gave a better description this time and hopefully at least one person encountered the same issue with Windows 7 -> and has a solution . thanks. |
Kathlyn Herrada 20.06.2010 |
Originally Posted by extraclassic
|
Kathlyn Herrada 20.06.2010 |
Originally Posted by kaleaf
actually here it it - http://www.benryves.com/products/vistamidi and http://www.softpedia.com/get/Multime...I-Picker.shtml ... thanks for tha tip - i'll try that asap and come back with details. |
Latia Pfleider 20.06.2010 | try changing the midi.channel1 to midi2.channel1, midi3.channel1, ... ect I have win7 64 also and it seems in the gui tab i select midi device but code is always just midi. If in the pull down tab your midi device is 3rd down then try midi3.channel1. Problem is I can not find how to set default midi device in windows. |
Joan Kollmorgen 19.06.2010 |
Originally Posted by alequ
Anyway found this script by Cheft over at the glove pie community . //DUEL ACTION GAMEPAD TO MIDI //WRITTEN FOR MIDI CHAN 1 ON JOYSTICK #1 midi.DefaultChannel=1 //BUTTONS midi.C1=joystick1.Button1 midi.D1=joystick1.Button2 midi.E1=joystick1.Button3 midi.F1=joystick1.Button4 //TOP BUTTONS midi.G1=joystick1.Button5 midi.A1=joystick1.Button6 midi.B1=joystick1.Button7 midi.C2=joystick1.Button8 //SELECT/START BUTTONS midi.D2=joystick1.Button9 midi.E2=joystick1.Button10 //STICK BUTTONS midi.F2=joystick1.Button11 midi.G2=joystick1.Button12 //POV midi.A2=joystick1.Pov1Up midi.B2=joystick1.Pov1Down midi.C3=joystick1.Pov1Left midi.D3=joystick1.Pov1Right //midi.E3=joystick1.Pov1Center //ANALOG STICKS midi.Control1=(joystick1.x/261)+64 midi.Control2=(joystick1.y/261)+64 midi.Control3=(joystick1.z/261)+64 midi.Control4=(joystick1.roll/261)+64 Not sure if its what your after but it helped me figure things out Thanks to Cheft |
Kathlyn Herrada 19.06.2010 | here a pic of the "device" ... everything's fine but the codes ... _DSC0002.jpg this is what i comed up with in GP: " //BUTTONS midi.Channel.C1=joystick1.Button1 midi.Channel.D1=joystick1.Button2 midi.Channel.E1=joystick1.Button3 midi.Channel.F1=joystick1.Button4 //TOP BUTTONS midi.Channel.G1=joystick1.Button5 midi.Channel.A1=joystick1.Button6 midi.Channel.B1=joystick1.Button7 midi.Channel.C2=joystick1.Button8 //SELECT/START BUTTONS midi.Channel.D2=joystick1.Button9 midi.Channel.E2=joystick1.Button10 //STICK BUTTONS midi.Channel.F2=joystick1.Button11 midi.Channel.G2=joystick1.Button12 //POV midi.Channel.A2=joystick1.Pov1Up midi.Channel.B2=joystick1.Pov1Down midi.Channel.C3=joystick1.Pov1Left midi.Channel.D3=joystick1.Pov1Right //ANALOG STICKS midi.channel1.Slider1Fine=MapRange(Joystick1.x, -1,1, 0,1) midi.channel1.Slider2Fine=MapRange(Joystick1.z, -1,1, 0,1) midi.channel1.Slider3Fine=MapRange(Joystick1.y, -1,1, 0,1) midi.channel1.Slider4Fine=MapRange(Joystick1.roll, -1,1, 0,1) " what this does in WIN7 x64 is ... plays a piano sound when pressing diferent buttons on the "controller" ... also .. trktor for example does not detect as midi input wher learn function is on ... ableton also ... in XP worked OK ... any advices ? pointers ? |
Kathlyn Herrada 19.06.2010 | hi guys, do any of you have cheft's ZIP archive with the .PIE config for the joystick, i made a JOYSTICK2MIDI controller and i'm having issues in Windows 7 ... wanted to confrunt the GP codes ... thanks |
Latia Pfleider 14.06.2010 | bump, did you try that code cheft? did not want this to go to page 2 incase he did not get the msg |
Latia Pfleider 10.06.2010 | sup g this is what im using on my x-fade midi2.channel1.ByteControl20 = MapRange(Joystick1.x, -1,1, 0,1) check these settings -if your midi is not the default system device your going to have to try midi2.channel then midi3.channel unless you know your midi out device -check calibration in windows for your device -are you useing a midi cable out and back in to your pc or are you useing software loopback if software I use loobe1 free edition http://nerds.de/en/download.html try and get your buttons going first if you have not also im not 100 percent sure that my code is the right way to do it but it works for me. |
Vincenza Flierl 09.06.2010 | have you tried setting the range as an odd number? i.e. min = 0, max = 126 (127 units total) this way you can use 64 as a middle point. |
Joesph Vincze 13.01.2009 | I tried using maprange before, but it never worked just right. Trial and error gave the results I am using. Bento: I believe Moldover uses like a flight joystick no? I'm just playing around with PS3 type controllers with two analog joysticks. It is interesting using them on FX, but I believe at the end of the day I prefer the control knobs have. Any ideas about adding in a potentiometer w/o soldering out the joystick? Or will this just chain them together? |
gilbert hatem 13.01.2009 | Hm, what bento said might work for the centering issue. You may want to go on traktor and right click the knobs you are having issues with and select fine, I believe that might help. One of my controllers can't get exactly 50% either. Just 49 and 51 . On you script it seems like you need to use maprange. Let me pull up glovepie first before I give you a definite answer. |
Xavier Emanuels 13.01.2009 | I help with this.... if GlovePie didnt crash so god damn much on me >_< - I gave up on GlovePie after becoming sick of the crashs Joysticks are useful for different things than knobs are - take a look at moldovers setup for a really good way of using joysticks. Its all about what you have it assigned to. Anyway back to the original question. I spose that you could use an if statement that checked to see if the joystick was centered and if it is send a 63 message instead of a 64. |
Xavier Emanuels 13.01.2009 | I help with this.... if GlovePie didnt crash so god damn much on me >_< - I gave up on GlovePie after becoming sick of the crashs Joysticks are useful for different things than knobs are - take a look at moldovers setup for a really good way of using joysticks. Its all about what you have it assigned to. Anyway back to the original question. I spose that you could use an if statement that checked to see if the joystick was centered and if it is send a 63 message instead of a 64. |
Joesph Vincze 13.01.2009 | The script was attached to my last post. I'm pretty sure that's about as good as I can make it. I believe I was having an error because I was writing the code in notepad then changing to CUE file. When I wrote the script in GlovePIE, it seemed to take. I believe the knobs ending up off center is a Traktor thing, because when I used my BCD3000 I noticed the same behavior. Please take a look and give me any pointers. Yes, each joystick had two sets of 3 soldered connections. Do you believe I need to solder out these joysticks, OR can I just connect potentiometers to the proper spots, thereby closing that circuit? I would then hide the controller board with the joysticks still attached inside my enclosure. Then I wouldn't have to use my poor desoldering skills, because these things look like a bitch to get out. There is also a switch underneath the joystick, but I'm sure I can close that with a new button easily. I like the joysticks, but believe at the end of the day I prefer knobs. |
gilbert hatem 12.01.2009 | I am pretty good at some GP scripts. I have made 2 controllers on the cheap, so I know what you are going through. I have never did anything with analog joysticks but I am almost sure all it is just 2 potentiometers. Put together. Are there 6 pins? Let me look at your script and I'll try and come up with something. |
Joesph Vincze 12.01.2009 | Sorry if I can off jerkish. I figure there are other broke DJ's like me looking to mod controllers on the cheap. So I will keep posting my stuff. I know I make mere toys to some of the work that goes on here. Here is a GlovePIE script for a 12 button gamepad. I used a Logitech Duel Action. The analog joysticks are quite good for controlling more than one FX at a time. The rest work best as buttons. Map them to your program as you see fit. I plan on modding two gamepads to make one big custom FX controller. |
Roberto Viccione 11.01.2009 | Just so you know, we do care, just sometimes people don't have answers. If anything keep chronicling your progress and you might get to a point where someone does have an idea. And it'll keep it toward the top for people who do know to help. But we do care ;-) |
Joesph Vincze 11.01.2009 | Some progress. If anybody cares. The knobs will now go to their max/min, but I can't get them to return just quite to center. I believe it's because midi has 127 notes. Anyone know how to use a fraction in GlovePIE? If I add 63.5, the knobs all screwy. At 64 it's off to the right just a little (0.09)
midi.Channel2.Control1=(Joystick2.x/261)+64
|
<< Back to Reviews of DJ equipment Reply