preset / sequencer problems

Apr 19, 2009 at 2:52pm

preset / sequencer problems

Hey guys,
i am trying to build a sequencer/preset manager, and i am a bit uncertain if i am on the right track here. I basically need something to change presets, that contain different patches.
In other words some sort of a sequencer that switches between patches. I am a little bit in a doubt of where to start actually, and of course started out with the preset patch as you can see below.
I am not sure if this is the way to do it? I have seen from the preset example that its possible to store patches in the presetbox (by the read message), but i can not figure out how to display these patches. The presetter basically works on the sliders, remembering the postion of each slider. I have tried with a simple example as the jit.qt.movie reader and the presetter, but i cant even make this work. The point of it, remembering which video files are read for each preset.

Check out the attached file.

Help is much appreciated!

#43438
Apr 19, 2009 at 5:31pm

the preset object only does one thing, store and recall the state of gui objects that have state (eg. messages and buttons to not have state, and are not affected by preset).

there is no object that loads and stores patches. perhaps you are thinking of patcher scripting (thispatcher and js objects).
[correction - pcontrol will load patches. see response below]

if you want the preset to control reading of movies, you can place the movie names in a umenu, which is a gui object that has state and will be affected by preset.

#155853
Apr 19, 2009 at 7:19pm

if i want to build a multiple patch loader, any thoughts to what i could do? I am pretty clueless here if there is no object that performs reading on patches. Or can i read the patches from a umenu and store them in the preset object? just like with the movies?
i just want to be able to switch between patches.

#155854
Apr 19, 2009 at 8:25pm

dvwood wrote on Sun, 19 April 2009 14:19if i want to build a multiple patch loader, any thoughts to what i could do? I am pretty clueless here if there is no object that performs reading on patches. Or can i read the patches from a umenu and store them in the preset object? just like with the movies?
i just want to be able to switch between patches.

[pcontrol] will do what you want. You can open/close patches or subpatches using it, you just need at least one “dummy” inlet to send the command (though nothing actually goes “into” the subpatch from pcontrol). Also you can get a .maxpat file name and have it load them for you. I got that tidbit from the Extras–ExamplesOverview–Max–Launcher. very cool. So you can then use a umenu and preset, just like the movies.

Here’s a patch which will populate a umenu for movies/images and another one for patches. There’s comments regarding the file filtering, which is handy if there are files different than these formats in your folders and you don’t want them cluttering up your umenus (and not able to be opened anyway). Plus I added the listing from max-fileformats.txt, which shows the codes for adding these file filters.

Note that if you change the listings of your umenus, the preset doesn’t know this (in remembers indices, not content), so choosing a preset from a past listing will still open the same one (which number it is in the list, starting at 0). So it’s also possible that a preset from a longer list will now do nothing with a shorter one, just keep it in mind.

Instead of browsing there’s also “dropfile” which works for folders too. There’s an example in the patch of this, which can be quicker than browsing for a folder…looks like the browsing always starts at the computer’s top level, which can take some time to dig around.

– Pasted Max Patch, click to expand. –
#155855
Apr 19, 2009 at 9:08pm

Wow… thank you so much!! You just solved my problem! Smile
In the inspector it says JSON for filetype, but i didnt see that in the file formats patcher… but anyways pcontrol it is!! Smile
thanks once again!

#155856
Apr 20, 2009 at 8:50pm

you could have a look at poly~ and bpatcher too.

#155857

You must be logged in to reply to this topic.