the max/msp dev for monome thread

  • Alright, i'm just gonna start this one up - i'm not sure how deep it's been discussed before, but max devs, lets get a discussion going on how you're patching for monome devices.

    I'm curious - do you use a lot of abstractions? are you obsessed with matrixctrl? what do you think is the most efficient way to implement paging in a patch?

    So come, brag about your favorite patch and why it's so bitchin, or ask those questions about monome development in max that you've always wanted to ask!

    I've been building a lot of abstractions mostly, as of late - to speed things up in the future. simple stuff with the prefix "M." - so like, M.gridout, M.devicedata, etc. the latter patch tosses all the device data into a coll to be accessible for whatever i need. I'm not sure if it's the most efficient way of doing things, but it's pretty dope for now.

    here's my (possibly dumb) question - sending messages without the message box? i've been using sprintf lately if i need to - since someone mentioned that message boxes are UI objects and they'll take up a tiny bit more processor speed if you're using a ton of them - even if they're hidden.

    so who's down for this?

  • I'm down. Cool thread.

    I've taken a bit of a break after I burned myself out working on the mono sequencer controller patch, but I have since got rolling again.

    I think matrixctrl is so helpful (especially in the beggining stages of getting my head around patching for the monome) because it allows you to instantly visualize what's going on the grid plus the format of messages matrixcntrl expects are the exact format serialosc uses. If you need a UI element representing a grid, it's a 100% no brainer.

    Abstractions are a great idea. Would you mind sharing the one's you've made? It would be really cool if we could get organized and actually come up with a Package that could be hosted on guthub and users could download and install in Max's /package directory to be available via right click to insert helpful abstractions.

  • i've been super obsessed with using javascript for handling grid i/o, even if the patch i'm working on requires some max or msp business. it's pretty much indispensable if you want to efficiently draw variable brightness commands at framerate. been meaning to post up some useful scripts for turning a float (or pair) into an anti-aliased point or range on either arc or grid.

    not directly max related, but the js object is a pretty elegant way of learning how to avoid patching dozens of cables to do a looping task. or you could use maxtoolbox.. ha!

    also - that was me on the crusade against UI objects unless absolutely necessary...

  • i've been using mxj to handle most grid stuff recently for similar reasons to galapagoose. my education in programming has been mainly java so its easy for me. js lets you compile on the fly though which is handy.

    id much rather look at a few hundred lines on code broken into methods/functions than look at a few hundred patch cords.

    using multi-dimensional arrays for grid stuff is very good.

    matrixctrl is pretty handy to get going though and for displaying your grid stuff on screen. can add a custom 15 level brightness skin to the cells as well if you want..

  • When I started programming I wasn't into abstractions as it became very difficult to troubleshoot on the fly without digging into oodles of files. Now that I've become better at the conceptual side of programming (ie 'abstracting') I use them tons. I'm trying to move into js more and more but that's a slow process.

    I do have some matrixctrl's in my patch, but I avoid them where possible (same goes for un-needed UI objects (float/num boxes etc...)).

    Stylistically I've really gotten into prepend/route combo for structuring subpatches/abstractions (ie using a single inlet for all control data with a bunch of prepend's above it, and a route (or more) below it). Really helps legibility and gives a consistent patching style everywhere.

    @galapagoose/stevie
    Do you ever run into priority problems doing so much with js in Max? A while back I used a js-based replacement to OSC-route and it ran like shit since it was stuck in the low priority thread.

  • i recently started to dev with maxforlive and i´m very at the beginning with it, from this point of view i find it hard to get in it, it´s very easy to use serialosc butit´s not that easy to go from there. for example, creating sliders for the monome and such. this obviously is becasue i´m a newbie, but some sort of building blocks would be so nice to have, not only to use them but also to learn from it and get into using abstractions, i´m looking at a lot of patches but most of the times there is so much going on, that it is hard to understand what does what.

  • I found that to be the case when I started too (finding big patches overwhelming). Just focus in on tiny parts of patches and pull out what's useful. And build from there. If you're on M4L take a look at BEAP : https://www.ableton.com/en/blog/beap-powerful-modules-max-live/

    stretta built a bunch of oldschool monome apps, and with BEAP being modular, it should be easy to pick bits out you find useful/interesting.

  • thanks rodrigo, will look into it!

  • been away for a hot minute, but loving the responses!

    @Rodrigo I really like your prepend/route idea. I may have to steal that from you!

    @emergencyofstate I'd be happy to share what i've made. I really like the idea of a consistent library of abstractions that can get people up and running faster in max. perhaps we could incorporate Rodrigo's prepend/route style into them? Since i'm going to straight steal it and all... ;)

    I've been digging into JS more and more - it seems way more efficient than patching objects together (and easier on your wrist!), my problem is i'm still in noob-mode with JS, so it's taking some time to learn before i start creating js objects in max. I'm gonna have to dig through some of Trent's code :)

    it seems like we'd all benefit from documenting our patches better - I know mine are a mess, and i've seen others where whoever made the patch couldn't even tell me what they did anymore! Hell, whenever I dive into old patches i've got to remember what headspace I was in when making it.

  • @misk regarding java scripting, i've been meaning to dig into this, have you found any good jumping off places for someone w/ a pretty good grasp on max, but a very loose grasp on scripting. Without underthinking the possiblities of a more broad introduction to JS. I guess i've been wondering if there exist basic tutorials/examples which teach it from a standpoint of use within max and/or for monome.