Forums > Max For Live

Force M4L Ableton live to recall the preset 1 after loading a preset file

January 29, 2013 | 8:20 am

Dear all,
I have created a M4L patch where you can save parameters into a file.
I have a sort of little table of with 12 slots (1 .. 2 … 12 ) -> preset module

If I save my preset on the hard disk, it works fine.
If I load the preset file previously saved, the preset are read, no problem :-)

The issue is that once the M4L patche has read the file, the user MUST RECLICK on the presets PAD (number 1) to make appear the preset!

** How can I force M4L to RECALL the preset 1 (slot1) when M4L Ableton Live has finished to read the preset file from the hard disk?
Cheers!


January 29, 2013 | 10:32 am

Haven’t had that problem specifically, but I do sometimes struggle with saving the preset files in M4L. It’s probably worth asking if your .maxpresets files are in your Max search path? Also, what if you give the preset object a message of "loadmess 1". Or try putting a delay of 250ms between the the loadbang/loadmess and the preset object. Maybe there is a problem with the order of operations.


January 29, 2013 | 10:42 am

You could try [live.thisdevice]. It sends a bang if the device is completely initialized.



pid
January 29, 2013 | 11:10 am

use pattrstorage. period.

– Pasted Max Patch, click to expand. –

(from memory, untested)


January 29, 2013 | 11:43 am

If you put pattrstorage in parameter mode, you won’t have to go through the trouble of saving a separate file…it will be stored with the preset in your live set. That doesn’t prevent you from adding read/write buttons to the GUI to manually save the same data to your own location for safe keeping, but I find it generally easier to not have the hassle of doing something that’s already built into the object via live parameters.


January 29, 2013 | 12:01 pm

I am going to check now what you are mentiong (all of you)
I will make after a feedback to keep you inform :-)


January 29, 2013 | 12:28 pm

Hello,
I don’t know how i missed this, but I found in pattrstorage the famous "parameter mode" … and so I put it to "Enable"… and now it works fine, no need to save and "relaod" the presets :-)

I will try later the patch included in this thread as some info are nice for my patch ;-)

Big thanks!


January 30, 2013 | 1:57 am

Thanks for the live.thisdevice tip, Broc. And the patterstorage example, Pid. It makes me laugh how "clunkily" I will build something, before realizing there is a more elegant way.
I have heard that patterstorage is much better than the preset object. My issue is I build patches with multiple independant presets in them. For example, one preset would be for a synth, and the other for a sequecer. Preset object seems simpler when I want to make sure the right value is being controlled by the right preset.. Should I consider doing the same with pattrstorage?


January 30, 2013 | 4:31 am

You can do the same thing with pattrstorage, it’s a little more involved. I curse pattrstorage on a regular basis, but it’s an indispensable tool. Unfortunately, mixing it up with parameters in m4l (and in as of Max6, many more objects have a parameter mode) can be less than straightforward. Still, I couldn’t code without it anymore, and it solves more problems than it creates for me. There is just a lot of functionality to take in. I’d recommend doing some experimentation to see what works best for you, but I’d definitely recommend trying it out. Then put it down before you become violent…and try again tomorrow.


January 30, 2013 | 10:00 am

@Mike Fonte
are you aware of this [js] preset manager for [pattrstorage] ? I’m not sure who made it originally, but if you’re really attached to the UI of [preset] then this will a lot to ease your transition!

put the pattr_ui.js file in your max search path and open this patch.

– Pasted Max Patch, click to expand. –
Attachments:
  1. pattrui.js

January 30, 2013 | 10:28 pm

Amounra, thanks for the advice/encouragement, in regards to pattrstorage. I’ll remember your words, "try again tomorrow", next time I become frustrated with Max. Sometimes it’s best to just take a walk.

Mbryo, thanks for hippin’ me to the pattr_ui. I just tried it (I had to rename the js patch). Should be pretty helpful. Looks like it was made by Charlie DeTar. http://tirl.org/software/pattr_ui/


January 31, 2013 | 2:37 pm

Note that you can also use the preset object to control pattrstorage. Look at the interface tab in the pattrstorage’s help file to see an example.


Viewing 12 posts - 1 through 12 (of 12 total)