Forums > MaxMSP

Help with the dict family!

Jan 26 2012 | 10:33 am

hi guys,
im running into some confusion with the new dict objects. the problem is that the syntax isnt explained very well (or maybe i miss something? my english is ok but not the best…)
i ve got a pretty big synth patch. in each oscillator bpatcher ive got 2 multisliders with variable numbers of sliders. ive already set up an pattr system for the whole ui but i want to have my own presets for the multisliders (they are used to create wavetables), so i thought dict is the way to go!?
the preset should contain both multisliders and i want to give each preset a unique name in the moment of saving, for later recall. but it must be possible to recall the multislider presets seperatly from the rest of the ui. and finally when i recall a preset from pattrstorage i want to recall the multislider presets but not for the individual multisliders.
i thought it must be possible to create keys dynamiclly, but it seems like that they must be predefined? is that true?
as my first step i created a dict.pack for the 2 multisliders. but how can i name this packed lists in the moment of creation and how can is store loads of these.
when i load the data from the dict.pack into a dict it works fine, but when i want to add another preset it doesnt add it, it replaces the old preset!
or should i forget dict and find my way with pattrstorage (for me this seems to complicated because of the naming and seperation from the rest of the ui)

thanks in advance!
(i hope that wasn`t to confuse)


Jan 26 2012 | 12:38 pm

ok, its definitly not true that i cant set keys after creating the object :-)

Jan 26 2012 | 12:58 pm

more simple: how is it possible to set a key with 2 lists?

Jan 26 2012 | 3:57 pm
-- Pasted Max Patch, click to expand. --

Bit of a kludge as 1: i should be asleep and 2: I am only coming to terms with dict myself Also, it doesn’t use the hierarchical possibilities very well, – so there is plenty of scope for refinement. Using one entry (key value pair) for each multislider – rather than worrying about combining the two multislider value sets into one key…

Jan 26 2012 | 5:36 pm

nice! i never worked with sprintf, but i see it would be worth to do :-)
thank you very much! so now the only problem is to give the preset names like square32/square64 or something like that.

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

Forums > MaxMSP