how to maximize gamepad buttons !!
how to maximize gamepad buttons !! Posted on: 03.06.2011 by Jacqualine Arroyos hello,i had a problem with glovepie, you can see the developments here with help, i was able to solve the problem but realised that the hat-switch code only has 4 directions, so the diagonals where not working, for example instead of up/left directions there is up and left directions press simultaneously. so there is a need to have more code to cancel individual directions when both directions are pressed. so i've realize that in glovepie there is the possibility of controlling button combinations, this can be very useful by itself, for combos, shift keys, etc... but there is also the possibility of expanding the number of buttons of a gamepad. a ps2 usb type gamepad will have +/- 12 buttons and 4 directions there is a big number of possible combinations for just this buttons there is also the possibility of using a button matrix, for instance, in my project i have 30 buttons and two gamepads, with a matrix i could have only one gamepad, because i would only need 11 contacts maybe i will work on my layout so i can have extra encoders... that's it :-) | |
Chasidy Heckenbach 06.06.2011 |
Originally Posted by fbonito
in glovepie we only know at any instant what buttons are pressed (real buttons/contacts). in that example you pasted they have a real advantage over that... since they can just send a signal to A and then check 1,2,3,4 etc, then do the same with B,C and D. repeating this very fast every second... so yep - then diodes will help as then that helps stops the signal flowing where it shouldn't be. in glovepie we arent only sampling 1,2,3,4 when the signal is high on only one of A,B,C,D ofc - that's the big difference. *but* that web page was really interesting - i didn't know how that worked before whether that method could be ported to a gamepad type solution with or without custom glovepie type code though? i have no clue... |
Chasidy Heckenbach 06.06.2011 |
Originally Posted by fbonito
|
Jacqualine Arroyos 06.06.2011 |
Originally Posted by zestoi
:-) |
Chasidy Heckenbach 06.06.2011 |
Originally Posted by fbonito
for multiple buttons pressed at the same time the system would have to rely on buttons being pressed sequentially - even if you *believe* you press them at the same time the chances are they're not *quite* being pressed at exactly the same time. the code would then just have to compare what it knew was pressed before with what it being pressed now and hopefully only one new combo button has been pressed or released and then it *can* work out what the change is. though maybe wiring up a second gamecontroller is all in all less work - who knows.... |
Jacqualine Arroyos 06.06.2011 |
Originally Posted by zestoi
|
Chasidy Heckenbach 05.06.2011 |
Originally Posted by fbonito
Originally Posted by fbonito
for example if you took this 4x4 grid where the * indicated button presses, these two combinations would register the same: Code:
A B C D W * X Y Z * A B C D W * X Y Z * so it could be a great idea but only if just one button from the grid was to be used at one time? or am i still missing something? it is a cool way of converting 8 buttons into 16 though - or even 16 into 64... the glovepie code wouldnt be too much of a pain tho ofc pressing multiple buttons manually would register at slightly different times, so if the code knew that first AZ was pressed and then real buttons B and W got triggered that most likely means that the combo button BW just got pressed - assuming that glovepie scans the button input faster then the interval between the different buttons being pressed. i saw somewhere it saying it runs the script approx 60 times a second or something? |
Jacqualine Arroyos 05.06.2011 |
Originally Posted by zestoi
the problem is that you may need a lot more code to cover all possible combinations that could compromise the buttons pressed already pressed... http://www.youtube.com/watch?v=bMwaf...layer_embedded this is the example, any button pressed will always be a combination of two contacts, from a row and a column, the difference is that the decoding would be made in glovepie |
Chasidy Heckenbach 05.06.2011 |
Originally Posted by derschaich
|
Chasidy Heckenbach 03.06.2011 |
Originally Posted by fbonito
if can wire a button to the contact so you know it will always *press* the other two buttons at the exact same time then yep - cool idea. just needs to be laid out in some way so you know pressing A or B isn't going to do anything while you're pressing C ofc. |
Jacqualine Arroyos 03.06.2011 |
Originally Posted by zestoi
on a simple matrix .....A....B.....C.....D 1...A1...B1...C1...D1 2...A2...B2...C2...D2 3...A3...B3...C3...D3 4...A4...B4...C4...D4 you only press the combination of two contacts, so there is no problem for what contact is pressed first |
Jacqualine Arroyos 03.06.2011 | hello, i had a problem with glovepie, you can see the developments here with help, i was able to solve the problem but realised that the hat-switch code only has 4 directions, so the diagonals where not working, for example instead of up/left directions there is up and left directions press simultaneously. so there is a need to have more code to cancel individual directions when both directions are pressed. so i've realize that in glovepie there is the possibility of controlling button combinations, this can be very useful by itself, for combos, shift keys, etc... but there is also the possibility of expanding the number of buttons of a gamepad. a ps2 usb type gamepad will have +/- 12 buttons and 4 directions there is a big number of possible combinations for just this buttons there is also the possibility of using a button matrix, for instance, in my project i have 30 buttons and two gamepads, with a matrix i could have only one gamepad, because i would only need 11 contacts maybe i will work on my layout so i can have extra encoders... that's it :-) |
Chasidy Heckenbach 06.06.2011 |
Originally Posted by fbonito
in glovepie we only know at any instant what buttons are pressed (real buttons/contacts). in that example you pasted they have a real advantage over that... since they can just send a signal to A and then check 1,2,3,4 etc, then do the same with B,C and D. repeating this very fast every second... so yep - then diodes will help as then that helps stops the signal flowing where it shouldn't be. in glovepie we arent only sampling 1,2,3,4 when the signal is high on only one of A,B,C,D ofc - that's the big difference. *but* that web page was really interesting - i didn't know how that worked before whether that method could be ported to a gamepad type solution with or without custom glovepie type code though? i have no clue... |
Jacqualine Arroyos 06.06.2011 | zestoi, look here... the problem and the solution (with diodes has i mentioned) ;-) http://pcbheaven.com/wikipages/How_Key_Matrices_Works/ it's the same principle |
Chasidy Heckenbach 06.06.2011 |
Originally Posted by fbonito
|
Jacqualine Arroyos 06.06.2011 |
Originally Posted by zestoi
:-) |
Chasidy Heckenbach 06.06.2011 |
Originally Posted by fbonito
for multiple buttons pressed at the same time the system would have to rely on buttons being pressed sequentially - even if you *believe* you press them at the same time the chances are they're not *quite* being pressed at exactly the same time. the code would then just have to compare what it knew was pressed before with what it being pressed now and hopefully only one new combo button has been pressed or released and then it *can* work out what the change is. though maybe wiring up a second gamecontroller is all in all less work - who knows.... |
Jacqualine Arroyos 06.06.2011 |
Originally Posted by zestoi
|
Chasidy Heckenbach 05.06.2011 |
Originally Posted by fbonito
Originally Posted by fbonito
for example if you took this 4x4 grid where the * indicated button presses, these two combinations would register the same: Code:
A B C D W * X Y Z * A B C D W * X Y Z * so it could be a great idea but only if just one button from the grid was to be used at one time? or am i still missing something? it is a cool way of converting 8 buttons into 16 though - or even 16 into 64... the glovepie code wouldnt be too much of a pain tho ofc pressing multiple buttons manually would register at slightly different times, so if the code knew that first AZ was pressed and then real buttons B and W got triggered that most likely means that the combo button BW just got pressed - assuming that glovepie scans the button input faster then the interval between the different buttons being pressed. i saw somewhere it saying it runs the script approx 60 times a second or something? |
Jacqualine Arroyos 05.06.2011 |
Originally Posted by zestoi
the problem is that you may need a lot more code to cover all possible combinations that could compromise the buttons pressed already pressed... http://www.youtube.com/watch?v=bMwaf...layer_embedded this is the example, any button pressed will always be a combination of two contacts, from a row and a column, the difference is that the decoding would be made in glovepie |
Chasidy Heckenbach 05.06.2011 |
Originally Posted by derschaich
|
Allene Manitta 05.06.2011 | what happens when you press more than one button on your matrix at a time? might cause trouble! |
Chasidy Heckenbach 03.06.2011 |
Originally Posted by fbonito
if can wire a button to the contact so you know it will always *press* the other two buttons at the exact same time then yep - cool idea. just needs to be laid out in some way so you know pressing A or B isn't going to do anything while you're pressing C ofc. |
Jacqualine Arroyos 03.06.2011 |
Originally Posted by zestoi
on a simple matrix .....A....B.....C.....D 1...A1...B1...C1...D1 2...A2...B2...C2...D2 3...A3...B3...C3...D3 4...A4...B4...C4...D4 you only press the combination of two contacts, so there is no problem for what contact is pressed first |
Chasidy Heckenbach 03.06.2011 | i guess you're referring to my code to send out a 3rd value and not the original two when two buttons are held down? it might be useful for other things - the only issue is what i always mentioned on the other thread. if you press down buttons A+B together and you want midi(C) to be send out and not midi(A) or midi(B) i suspect that you will won't be able to press buttons A+B at exactly the same time so whichever button gets pressed first will end up sending out an ON message followed by an OFF very soon afterwards. this may or may not be an issue depending on what buttons A+B are setup individually to send out/affect in traktor etc. i agree it could open up some interesting possibilities though as well as sending out A+B+C at the same time for a more midifighter type combo. |
Shonda Soulier 03.06.2011 | Wow this sounds great! How many possible combinations? Do you have to wire the buttons differently? I've never heard of this feature in Glovepie... is this a breakthrough that these community s were unaware of and you just discovered? |
<< Back to Reviews of DJ equipment Reply