Storing custom chords for playback on a single note in M4L


    Feb 19 2018 | 10:10 pm
    Hi, Last year I made the chord droid https://www.youtube.com/watch?v=atN53bnEicQ
    Which stores 8 custom chords using the preset object.
    I'd love to know how I can store these chords in the max 4 live device, and save them for different tracks - without having to load a text file.
    I've got more and more confused reading about using coll & pattr to do this in Max4Live, some people have also recommended dict - but I've not had any joy using them.
    Any help is appreciated.
    midierror

    • Feb 20 2018 | 6:41 am
      Yeah, the pattr system documentation gets a little bit dense. You might be surprised how simply it can be patched, though.
      'pattrstorage' is what's used to actually store, recall, and save presets.
      'pattr' links objects into the pattrstorage,
      and 'autopattr' can automatically round up all of the UI objects for presetting.
      In max for live, make sure that the 'Parameter Mode Enable' of the pattrstorage is set to 1. @savemode 0 will stop the save file dialogue from popping up, still saves all of the pattrstorage internal data with the live set.
      This ought to get you going, note how the number boxes triggering the pattrstorage are excluded from any presetting by the autopattr:
      Max Patcher
      In Max, select New From Clipboard.
    • Feb 20 2018 | 1:34 pm
      Morgan i didn't check your patch yet but if i recall correctly, the pattrstorage PME (as you suggested) plus the Initial Enable plus the Auto-Update Initial Enable all have to be set to 1 in order for the presets to be stored within the Live Set. @savemode is irrelevant in this case, since it gets greyed out when you set the aforementioned parameters to 1.
    • Feb 20 2018 | 4:22 pm
      Hey Mark. The pasted patch above actually is working without Initial Enable or Auto-Update. I seem to recall using them in earlier versions of M4L . . . . Ah, just found this really clear tutorial, those arguments make presetting work across both editing the patch and running it:
      https://cycling74.com/tutorials/max-for-live-tutorial-adding-pattr-presets-to-your-live-session
      midierror, I just realized you mentioned you were using a preset device. You can link to a named pattrstorage with the @pattrstorage argument.
    • Feb 21 2018 | 5:45 pm
      Thanks for the patch. I don't see why there are float numbers above the store / recall messages. Shouldn't these be ints to assign a slot in pattrstorage?
      I seem to only be able to store the current number in pattrstorage - I'd like to store 50+ chords if possible..I can easily convert and strip played chords down to midi note with a generic (variable) velocity, as seen in the video - but how would i store multiple chords?
      I did read that document and it looks like what I need but I found it very difficult to follow with much of the text unnessesary and waffly. I know hes covering a few bases, but I did what he said and got even more confused at the end.
      Your help is appreciated!
    • Feb 21 2018 | 6:39 pm
      Yep, those floats should be ints, sloppiness on my behalf.
      Storing more variables. . You might need to reinstantiate the autopattr to serialize the new numbers? You have multiple numboxes or some other ui objects that are changed by the preset object right? Can you post a patch?
    • Feb 26 2018 | 7:36 pm
      I appreciate the help, i don't want to be using an autopattr, but just out of interest how would I reinstate it to serialize new numbers?
      Hitting the preset button sends a particular chord out of the patch. Its pretty straighforward, I just need to be able to store chords in a reliable way.
    • Feb 26 2018 | 8:27 pm
      To reinstantiate an object, you can edit the text in its box. Like, delete the last letter and retype it. When you click away, a new object is made. There might be a more proper way to do it, but this does the trick.