Button Press Query [Max MSP]

  • Happy New Year everyone!

    I've nearly finished my first app for the monome, a randomisation step sequencer type thing.

    I have a query:
    What is the best way to ignore button presses from a specific row/column/whatever?

    Row 0 on my patch is the page select buttons, working perfectly. The problem is the page for tempo, I want every column to work the same, minus col 0 for pages, the way it works at the moment, when you navigate away from the tempo page it changes the tempo, not what I want.

    Is there any way of easily selecting which buttons I want my patch to listen to? I'm thinking in the style of LED control, i.e." /led_row 0 255" Can you do this for presses as well?

    Basically I'm not too keen on wiring up 56 separate [match] objects for each button.. just to ignore the 8 buttons at the top..

    If anyone has any solutions to this it'd be groovy to hear from you, if you fancy having a look at what I've done so far, or seeing specifically what thte problem is with my patch check out the .zip. The problem area is to be found in [p page7]. Cheers!!

  • something like this?


    ----------begin_max5_patcher----------
    332.3ocwSFrSCCCCF9b5SQTNWPMgpMF234.MgxZ81BpMopwC5XZu6j3txFv.
    FCj3Rhxucs+8WS1jvDybcfWvugeGmw1jvXjTTfs6LSTq6JpzdJMQM385EfHs
    OFBcHoWY7H2XGzm6rnUWCTraaM5pgHtUXEf35FnusBAe5tPlRJc2rGtHOaH+
    FMVrzXWbeKTf8exnQStLKkq52t553pLr9Zghc2adl5fTEB2KaWUarglSShZu
    XukHUYTbaRRbI8WhD3QncMF8NG5JfFjO2zFnTgq5uBSp7u.SikRhOJZSlm+O
    yIK7Tvye.SsgxB7ryAIoeBVjiOgaOSHdLhfiJ6GRE4Qoh5.pPkK7rv992Wjk
    h5uEUd2p1hgIa3I.euqJAOZrZz3rGjTbROHoklxRfhO35ZSYiyXwclfO8n+3
    NUOQsS9MdJdo7r8T3v1jWXFzQHC
    -----------end_max5_patcher-----------

  • I had tried using a [route] object, but it didn't give me what I wanted, however, I've just read looked at your patch, combined it with a [zl rot] and the problem is solved! Thanks Maersk, much obliged :)

  • ah sorry thought you were trying to ignore the column not the row, glad you figured it out :)

  • have a peek at the mlr tutorial too...

  • you can also use [if] objects

    a couple of examples

    ----------begin_max5_patcher----------
    495.3oc0WFsaBCBEF951mBBwKcKEZsUWhKYOGKKKnEUVZAWAyzY7ceTncS2b
    lpxb0afvgSO7mu1C+oq88fiDKoRH3Nvi.Ou09ddlPkA7pV6AyIKGmQjlzf4T
    ojLkB6Z2SQWpLwEKTfIhB.IKCnlQAB8PgrNM9hbFOipL0.WEbhfqjr2okwP3
    aC9JWcwpSFUE0FRsZN0pVHD7T0VyKnRJWQTLA+4B5XkMinAQ5ZBPC5WNETM7
    4SUd5bRtobvGJXjrZwNmnFOiwmtSs5YqkcBkXl5uU4XoVLL5kaPgvxXa78KG
    55.vxl.VAnutfjIAuSKD+mXMLxcXMLZWrhNHVibIVyXRMW4s.Rl3NPlXFC6e
    PL16TvHm9l9g+AE0eX1ggA2CBJa545EHSfNrv8R1PGS1SpINzNEY9ZCG7KXJ
    18XZ3vqBNU2UVyo9GjSIt9xt1kKB1TS8D576RQwGiKB9OvEYYawEINvR0XGP
    0iwCAcs5gbBHoQtAAt9ZNzUhaPcyXibCvtmRWIlAniwKXaJYRP2hv+9+WXNj
    x36hNoXQw3ZwV4.quU3yyIkJULt4djsSJbmjlwRSol8qoSNKctfwUUh.7zde
    Q1XM0qIZJ9xpojlnonVHmRtnZB2DIgurXpIRBcYkTPCzDt8IoygR5Ea7+.fJ
    m.ee
    -----------end_max5_patcher-----------

  • [if] is a life saver ;) always feel wrong using it though.

  • i feel wrong using the bog brush

  • and yet i have to brush it so often.

  • on a similar note, would if statements be the way to go if you wanted to perform a certain action when holding down a button and then pressing another?

    i've been scratching my head about that the last few days...

  • i use a gate type method, where a press of one button will route other presses to a separate patch while it is held down...

  • "when holding down a button and then pressing another"

    i guess it didn't get much notice, perhaps that's my fault, but my mnmna object does that:
    http://docs.monome.org/doku.php?id=app:monomahna

    perhaps i should've announced them separately from the app, but ah well.
    if you download the 'SOURCE' link, in that folder is an extensive helpfile on mnmna which can easily get you started.
    from the helpfile "1st 2 arguments are the locations of the 1st button to be pressed, last 3 arguments are the location and state of the 2nd button to be pressed."
    check 'em out! check out mnamnaa, too(entire rows, selectively paged)

    or if you prefer a full max standard object way:

    ----------begin_max5_patcher----------
    338.3ocyT9sZBCCEF+5zmhPt1IIo1Nb2smigLRayzHsIklTVmhu6y7mhSgIA
    rJRgFx24jy4q+5grOAfJTCbMB9F7CH.rOA.bRVAPXO.0vFJqYZWZHI+aUwVz
    LeHCev3jURdAStdT+KkznE631XD5bbPV12Hj0biqTzfXKyTtQHW+YGuz3sBI
    O63YfTL1tj8peybLbU3LhJeWK19RN5TwU8lKqt0IRViyIn26Dr5w78Ia9ok6
    aJx+ADVgqrYcHIw9Z1sAGMuFRlHzPwoVZPxcnIM+ZnIaxQySKVHXZzXYwyMV
    1UCKUMsrNNjd7YpGbRI1kkKuFgnSFgtmzIcBoy37SLzgbGoiqenZg7xakcd1
    peNxzp9txwxEFtgmbcEWaDRlQnj+Im7yxYinph6BOBsFQUqRHMAK7O+9h0QY
    Q5HxCyQzHbT1CkQjHbzhavQG2bH4WPR2QOA
    -----------end_max5_patcher-----------

  • that sounds like a good way to do it.

    i want to have a velocity select button that when i hold it down in conjunction with a "step" button on a sequencer lane i can use tilt to set the velocity/note duration etc etc...

  • thanks Str8!

  • you can also use my [monomepage] to do 'this button does this if this other button is held down'.

  • spoilt for choice then :)