Max MSP Help

  • Hello Everyone, I hope you've had a merry Christmas and are rounding off 2010 in style :)

    I've been working on a Max patch for the monome and as this is my first foray in to the world of max I've come up against lots of hurdles. I've spent the last couple of weeks trying to figure out a solution, but I'm going to bite the bullet and ask you lovely people some advice/explanation/help.

    Basically I'm making an adjustment to the app 'step', the difference being, instead of 'button press = play sample at that point in a measure' like a step sequencer, I want the button press to randomly make 'x number of hits'. For example, if you press button '1 1' column 1 will have one random hit in 8 measures, if you press button '2 1' column 1 will have two random hits in 8 measures, button '3 1' 3 random hits and so on.. It is basically gonna be a monome version of Audio Damage Tattoo http://www.audiodamage.com/instruments/product.php?pid=AD024 .

    So far I have been looking at the original 'step' patch [ http://docs.monome.org/doku.php?id=app:step ] and trying to take it apart for my needs, but I've hit a wall where I can't work out exactly what is doing what in step..

    If anyone can find the time to have a look at my patch and answer a couple of questions it'd make my new year :)

    1. How do I link each row to a sample and get it to play on the button press?
    2. At the moment as the step sequencer moves along the column it switches off any buttons I have pressed down, this is not what I want.. How do I make these button presses stay lit? Or will this problem be sorted out when I figure out how to answer question 1?
    3. Any advice on the randomization front?

    Thanks for reading this, hopefully someone'll have a look and point me in the right direction

    Cheers!

  • Wow! Thanks for your reply Str8, your video is intense to say the least :) Your patch was really interesting to pick apart, thanks for taking the time to have a look. I'm glad I helped you to procrastinate!

    I didn't check back to see your comment whilst I've been getting on with adjustments, and I've come up with a new idea for how to randomize the button presses. It's probably not the most elegant way of doing it, but it works well on a row by row basis, it's all I need for this project anyway :)

    However, I started to expand it to cover every row, and noticed I've done something wrong, I'm just not sure what!
    When you press a button it randomizes every row, no matter which column you press.. It's something to do with my arguments in splitting up the presses, i.e. how do you define 'route' to route "1 0" and not "1" and "0"?

    If you (or anyone else for that matter) fancy taking a look and giving me your two pence that would be greatly appreciated... In the mean time I'll keep on trying to figure it out...

    Thanks again for taking the time out to have a look and offer a helping hand!

  • hey, glad it's proving useful. i like your randomize solution! (why didn't i think of that? :p)

    i'm not sure what's happening when it randomizes every row(haven't found time to check it out thoroughly again on my monome), but going just by your post, you just need to distinguish between single values arriving at an object in sequence and lists which are sets of values arriving at an object at once in list-form and then learn the specific objects that apply in each situation. 'route' is great for matching up with a single message(number or word/symbol, not separated by spaces) and then outputting anything in a list that comes after that.... but if you want to match a list, you can use the 'match' object or 'zl compare', etc.
    you probably know all that, but just to make sure it's covered, you can always find reference info. on list processing here:
    http://cycling74.com/docs/max5/tutorials/max-tut/datachapter05.html

    just so you see a clear difference between lists and iterated values, take a quick look at this:

    ----------begin_max5_patcher----------
    565.3oc0V0zabBCD8L7qXDG5osHrA1cIpWxwJ0dJ8VUTkWX1fS.6UXSYShx+
    8ZLKsKMjlMJ6W8hAOdlQu2alwxO553sPtFUdvEv2AGmGccbrlZM3rYuiWIac
    ZASYcyKUVVhBs2jtyz3Zs09mtBQ3dYcE7U1ZngKxjMvRYEnyQHiubIVghTDV
    f5FDEfhKto.gexJpQEvDY.CJ3JsuuOTIq0HzHqtSYxjNenySfGJfbSDEl.aC
    Q0lTMV0ioBt.Sk0BKvB2XjmYgobwsejDz64RoPKXkn8nKq3rh9SD0kbQApsj
    l7GiFj0aMXqjn3OXSBg52adESmlav8OpvTcmBShBLGCzD6Zbb6mn49Av0sg7
    jqa6xjcrPThJE6F7YEhPXJ7aBtEqm+FIMcTRS92jtyS88qvNF64AW+x5wzVA
    fXWCmY+eeKFAPHPFQLlc9IFwcJPvdPMDXigjOSLVUwEZPJvOnajWp9xmu5ai
    HMwmngCJ0NOjz0TPCsyHA6YEfkdGDL53QzgqiH3c0QDO2dMQxgqivzMXtjVX
    ZLFQWBOU2URirsCVMHI4fzMzw97JbLhSOQDuqp2w6owGBdWK5mCFcRfrWHd3
    abRf29lhAed8QiP6kDyFezvFt8s.+06aroq09PkSYd6RZOZ1bifQg5AQFpzb
    ASykhs7IdfO47rLTrcYujmsRZHyFH7BUwcEQlJCPeEDQOpHZ1NnQjiJhle1g
    HxNfnviNhH+2gnnA9bNT0hdGZjYySt+BZW+IKB
    -----------end_max5_patcher-----------


    then, this might help you figure out your problem:


    ----------begin_max5_patcher----------
    1879.3oc0btsbihCDF9ZmmBJec1szYA6c6KwdyTakBaqjvNXvEFmY1Yp4ceA
    gbLLqQVgwfTWoJ6XN4t+T2+pkDlu+vp0aJ+p535n+H5SQqV88GVsRuo1Mrx7
    4Uq2m90s4oG0G15B0WJ27OqeraW0puVq27gniaqR2uIWQNuurc58zbz+FVvN
    u0mKKpKR2qz66OqxRyOumhS6yJxU05uG7kMVdp9m2Z6E4X12zWDL42QlM2cj
    0+6AUmGsdczea10gz5sulU7xSUps0c6EyQMmYDNV+lTz9Jo4+GdNpJCLLzn4
    KOKW8lp5XVYQOaZ05KWYlj2dwnRl9Jmn+DKgd4Z2P4WxK29YklQnyabm54O1
    Uo7fp3xYncjAuL7HyJNToNpJpSqMFe+u4zS40OccxNb+OmtUM5Ie011UqeoJ
    aWYQqQL3La274ut1VDcCBuucqOhhzCW4jqKKy2jV8V1wrl3tAsEMwvoEY6Sq
    U0Yc1CA894ks+PUVQ8fqkpHs4Z7ZSPbYd9fKU2dd6J6Ym5srspujsq9U805B
    sFjU0K1YP10fsaKKaXl191nxHYDo+d6mqQj82y3sIikyMdd2+O26hOaO+arb
    PNW2j2EoyYc4isM+mOqe7vCm+mGmKVJrvRAbXIyHj4UVxsvRNfXIJ.hKYVXI
    CNrjRCf3RpEVRgCKIgfdIwBKQvgk3j.fk3wYINAPrjL+436UGOl9h5pvDG0+
    OznHMdhHk3sRivldh5XpvSLEYgoR3vTSIRg.SQVYp.PLEEHwonavTNbXpojI
    eyTzMYJBNLkDB5onayTDENLE6e8TjSLk.HltD5o2rtTzn0klfAzv34dspTjS
    QmR.0Y+RzujkXyuk+9xLLBLEiGc9WppcoEoS.mjohyG+.8KIzukPzeH4NyzN
    SaDlQlPJK5FwIsdviQLLUupJ7yuN.FaK2uW0MO7qWeGcVs8OVWAi5qHmxllR
    JiNmoKyYgIgkTopFOQMdOl76+jOLqYQxNIIhTiYFYw05kQjwooXAqSl7KJwa
    H44vVoWHIdTRhgCIEBz7SxalhONJIvJE2fy4ME+WPwjCLbh8rhovlhIW.n7b
    rmULE1TL4R3PRtLnUL4wvJE2fyfUwDCLbR7rhI2phIAP44DOqXxspXRgCIMq
    nUvpXxfUJtAmgphISBLbR8rhIylhIKFP44TOqXxroXxRfCIoIgshIBVo3FbF
    pJlTfMOllUCveJlDqJl.ZdLMjzeJlDqJl.ZdLI3fVwjAr4wzfyfsFSJv5.h4
    YESpUESFfpLh4YESpUESNfHIJrULE.KEGE10XBrU9Q5YASjMASJfV3Gom0KQ
    1zKoRHoWFxxkzXnIWFzpk.aJgM2Xd9StDaUtDPqUggj9SuDaUuDPqel4maWv
    JXBrE10fyYVw7z9MppQPlkE14V21x2el09rwnAaaRKd4126Klo+0rftxY4tW
    1N5hgJ5P9FcVVc1vFcbr2QGGnniQ7N5D.EcTycLoGQGT6lvvLehNn1MAl5cz
    k.UstkfbiWk7ohCoa+b6i3iHZDKhGIhjQwi8CWCMCPN9WCxer2b8G5VhoUIw
    Z6wkm.b4YEi8vTS+szt+q2Pcr7T01y9z6OazhF9auZm5XcVw6OQ79TuGUH+z
    Q9Z1tcCeDzoiFx1cnrw+MlniAWeXK2U69JdnWs61mfZNRbIPIt.n1MOvhT3N
    GoDXDu8owliVNGnwJr.i3TmINBnDmFXDG4pkin.k3.MRo84DWHY2WwdFKRgD
    TVdhqHWByd7uh+4Syl4bs37IFgKRR9cd6iaAQ6aRL68O4cWRPtGtjPjL6tTr
    ysRSr1FAZfKQXAjKEeObItb1ak3NWAJehh.b7.WhxBHWhcObIV772J47HbXS
    brvLx.WhwBGWhitGtDMY1aktl17Xp3gUOpWqixwr7.qX2OPbTfU7E28dSBrI
    35CnvFXCoi67fi3g0PLvtWgHKvl.ZtyS..KrFPJ24YflMwvbZuZVa5hhO+85
    5tKItKtDZ9qMx4DC5DCuHz9tDQvBGWhQtKtDd9qMh4djWfMU2LmmxXVfMY2T
    mqpiEXU0wbtRZVXUIs6ERSmXXNuela77qE4tCEeGbH57qDQcttaZfU2M04w5
    PCrw5PcdDCzvZDCtOHM5DE+wr9w+X47mQ6tKguKtDYAxocdbczvZbcBWGbDO
    I7raoC1MSFd1svE6NN7ratKwIrvytYtX27vytotX2hvytItX2AXdI1E6Nvlc
    KpqiUOvlOQp.n1MAn1MEl1MCCT6FAT6lCT6lAT6NAn1cLLsaNP0A4.seGNPq
    OgCz5SD.s+RAP6uD6pN3Tuka3cq2GlQ6s5e5OMatjblcIycr1R5Rh41kvKdq
    DelcIJcwakPyrKQV7bIDclcI7hmKgHysKsz4Rx4VcXoyjbtHf65cSoYiMNvC
    clU5apcO070n1V+TZccU1lS0c+hn64.MV1yomxqep8248yoc9w4uZKOClFbd
    ibHujWtIMWSOU06GyUuBW4Qb05Qsn9G7CWnf9UMG9wC+GCgAkR.
    -----------end_max5_patcher-----------

    best of luck!

  • Thank you so much!!!!!!! The match object is exactly what I've been looking for :)

    I've just tested it out however, and there's a problem... 'match' doesn't seem to discriminate between the message "1 2" and "2 1" so there are still false messages when you press certain buttons... and with 7 rows the problem is going to get worse.... Hmmmm... I'm going to dig around the help and see if there's a way to sort this out...

    Thanks again for your help. You are an absolute legend!

  • actually, match does discriminate between those 2 ordered messages, but it gets confused with succeeding messages(it needs to be cleared everytime before receiving more input... and this is easily done by using a trigger object set with arguments 'l' and 'clear' like, [t l clear] which triggers a 'clear' message, and then sends the list it received).

    here's another small patch to show what i'm talking about and some extra stuff showing how to use [zl compare] if you prefer:

    ----------begin_max5_patcher----------
    566.3oc4W00aaBCE8Y3WgkelEgs4ivda+Nlplb.uTOAlHvQKqU8+9fqIIqQA
    pSSpGs8EGw0FeOmy0GeIO56gWUuSzhQeE8cjm2i9ddPn9.dCO6gq36xK4svx
    vq1p00JbfYJ01JopTng4HGCVuUeZTSH8e1HLoCuhqViQ2ML8FtN+doZ8OZD4
    ZyJnKiWDFfHgr9eng6GO7NxB.R0q90WHo39XO462ODXIYpDss70hyxF5kwli
    L4m0JshWASf+VijWhGmiLBomVY.4XI.eWNBESv+SFZkO.YfPWD9JXtR76t8b
    +FpE6.7f0nRTdof2bAEX5nRR.Ba1rWm1LT+iLiYSV9id60lpdDhHH5s3v+0I
    IovglD1jRR7MTRNwnbPSnHx+QyyfZ.x.itHdBuC6yl2ILyZuC8FpMtr8fgh1
    0dH78Y6AJKx11CYNvtO1keNRLLEbKr6oeR5FXDDa5Fj7guYPJEzhW9vQ7Gdi
    BK0RoH584M+F9sDFiOLdNBxv2NGeqn7hNfSmjeAWY00X2MsDFyzSe6uF7gtu
    4otZCuQftry7S9kOWkxDAMKWN827Xgx.uGtTpN8OHCYtO9ykq15sM46YwPRP
    GydgnUKUbsryjbbMzmsl6kEEBX5vgHUxhM0Rkd.Bn6NaoyVDEYAhHNEQwyND
    QrBRoyPL00iuyD5JLkZCjhbqLwlgXxJOWr6wDYlgIqpct85RHcujNk3dHENq
    fT57qvkXCjBmcPJyoWfayII1UnQcO7j+eEA3K1F
    -----------end_max5_patcher-----------

    glad to be of help.

  • cool app and cool vid. Thanks!

    I've just got runtime. I mainly use my monome as a midi instrument. Could you or someone write a version of this with midi-out assignment per voice, like Stretta's patches often have?

    That would be cool.

    Peace

  • Wow, so things have progressed a fair amount over the past couple of days!
    I've sorted out the randomization, I've sorted out the sample playback, and now I'm putting page selection together for volume, panning and tempo.

    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!!


    @ Tetramorph - It would be really interesting to put some MIDI assignment in to my patch when I've got it finished, I'll definitely give it a go :) Are there any specific Stretta patches that do this well? Which of his patches did you have in mind?

    @ Str8 - "He" :)

    Oh, and:
    Happy New Year everyone!