how to maximize gamepad buttons !!
Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Tech Mentor fbonito's Avatar
    Join Date
    Nov 2010
    Location
    lisbon
    Posts
    220

    Default how to maximize gamepad buttons !!

    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

    :-)

  2. #2
    Tech Guru
    Join Date
    May 2009
    Location
    Cincinnati, USA
    Posts
    779

    Default

    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 forums were unaware of and you just discovered?

  3. #3
    Tech Guru zestoi's Avatar
    Join Date
    Mar 2011
    Location
    UK, Ukraine, Romania
    Posts
    2,836

    Default

    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.
    11mba / 13mbp / tsp2 / live9 / audio10 / 2x reloop rp7000gold / 2x xdj1000 / 2x d2
    maschine mk2 / x1 mk2 / z1 / f1 / midifighter / lpd8 / 2x launchpad / launchkontrol xl
    Quote Originally Posted by derschaich
    "wohoo, i'm touched, turn on the FX"

  4. #4
    Tech Mentor fbonito's Avatar
    Join Date
    Nov 2010
    Location
    lisbon
    Posts
    220

    Default

    Quote Originally Posted by zestoi View Post
    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.
    what i'm saying is in therms of a matrix, every button is always connected to 2 contacts

    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
    Last edited by fbonito; 06-03-2011 at 06:09 PM.

  5. #5
    Tech Guru zestoi's Avatar
    Join Date
    Mar 2011
    Location
    UK, Ukraine, Romania
    Posts
    2,836

    Default

    Quote Originally Posted by fbonito View Post
    what i'm saying is in therms of a matrix, every button is always connected to 2 contacts

    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
    ah.... cunning. i am no kind of hardware guy but i think i see what you mean.

    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.
    11mba / 13mbp / tsp2 / live9 / audio10 / 2x reloop rp7000gold / 2x xdj1000 / 2x d2
    maschine mk2 / x1 mk2 / z1 / f1 / midifighter / lpd8 / 2x launchpad / launchkontrol xl
    Quote Originally Posted by derschaich
    "wohoo, i'm touched, turn on the FX"

  6. #6
    Tech Mentor derschaich's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    412

    Default

    what happens when you press more than one button on your matrix at a time? might cause trouble!

  7. #7
    Tech Guru zestoi's Avatar
    Join Date
    Mar 2011
    Location
    UK, Ukraine, Romania
    Posts
    2,836

    Default

    Quote Originally Posted by derschaich View Post
    what happens when you press more than one button on your matrix at a time? might cause trouble!
    pressing more 'matrix' buttons should act as expected - the only issue i think is that if you press one of these matrix/combo buttons then you cant also press the individual ones - they wont work
    11mba / 13mbp / tsp2 / live9 / audio10 / 2x reloop rp7000gold / 2x xdj1000 / 2x d2
    maschine mk2 / x1 mk2 / z1 / f1 / midifighter / lpd8 / 2x launchpad / launchkontrol xl
    Quote Originally Posted by derschaich
    "wohoo, i'm touched, turn on the FX"

  8. #8
    Tech Mentor fbonito's Avatar
    Join Date
    Nov 2010
    Location
    lisbon
    Posts
    220

    Default

    Quote Originally Posted by zestoi View Post
    pressing more 'matrix' buttons should act as expected - the only issue i think is that if you press one of these matrix/combo buttons then you cant also press the individual ones - they wont work
    theoretical if you press more than one button it doesn't matter, since you don't have individual buttons, all the buttons are a combination of two contacts...

    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

  9. #9
    Tech Guru zestoi's Avatar
    Join Date
    Mar 2011
    Location
    UK, Ukraine, Romania
    Posts
    2,836

    Default

    Quote Originally Posted by fbonito View Post
    theoretical if you press more than one button it doesn't matter, since you don't have individual buttons, all the buttons are a combination of two contacts...
    ah... no individual buttons... that makes sense now. i am very skilled at being extremely dumb sometimes

    Quote Originally Posted by fbonito View Post
    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
    it is possible but there is a big problem surely.... you can't press more than one button at once - else the code can't know for sure which buttons have been pressed.

    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    *
    e.g: pressing AZ and BW can't be distinguised from AW and BZ or even pressing all 4 at the same time ofc.

    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?
    11mba / 13mbp / tsp2 / live9 / audio10 / 2x reloop rp7000gold / 2x xdj1000 / 2x d2
    maschine mk2 / x1 mk2 / z1 / f1 / midifighter / lpd8 / 2x launchpad / launchkontrol xl
    Quote Originally Posted by derschaich
    "wohoo, i'm touched, turn on the FX"

  10. #10
    Tech Mentor fbonito's Avatar
    Join Date
    Nov 2010
    Location
    lisbon
    Posts
    220

    Default

    Quote Originally Posted by zestoi View Post
    ah... no individual buttons... that makes sense now. i am very skilled at being extremely dumb sometimes



    it is possible but there is a big problem surely.... you can't press more than one button at once - else the code can't know for sure which buttons have been pressed.

    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    *
    e.g: pressing AZ and BW can't be distinguised from AW and BZ or even pressing all 4 at the same time ofc.

    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?
    and about the use of diodes? could it help?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •