Yes, I have a lot of questions these days.
I'm working on something that is going to be instantiating n (100 + )
patchers, each one of which could be handling 100+ variables
controlling 6-8 audio engines, and considering the wisdom of managing
it all in a pattrstorage, and coming across some problems:
To clarify: each patcher has to contain some variables which define
its own state (mostly UI stuff) and another, larger set of variables
controlling the audio engines. (most of these are not used in any one
patcher, but they all have to be available and writing scripts inside
those patchers to create or destroy the storage spots to the engines
would give me, and probably pattrsorage, a stroke.)The goal is to keep
the variables about itself consistent while changing the data sent out
with different presets.
I realize I could make each scripted patcher it's own preset, but then
in order to not change the state of the other scripted patchers, I
need to be perpetually storing only parts of a preset, not a whole one
at once, and this is an annoying amount of work, which certainly does
not make the best use of ps's sexiness.
I then thought to have one preset (say #9999) which stored the state
variables of each patcher, and using the active attribute to 'turn
off' those particular variables, so I could change presets without
changing the internal states. However, the grim reality seems to be
that setting active to 0 is actually identical to sending a setall
message to a variable, and writing all of that to the storage file.
If I have 100 buttons with 10 state variables each, I thus have 1000
entries in my storage file I essentially never use. Not only does
this offend my sense of elegance, but tests I have run are showing
that I'm having hangs while reading & writing a file with all those
entries, not conunting all the other kazillion variables. (Yes, it
needs to be in one file).
First of all, am I doing something wrong? Or is it expected behavior
that all that data gets written to the file?
Also, whenever I script in a new patcher, and a new slot to go with
it, whatever slots are currently filled transfer their data to the new
slot, if it needs it or not, meaning I have even more redundant
information in the file. I can't find it, but is there a way to
create an "empty" slot when scripting?
I hope this is clear, as it would take a while to extract my example
patch, but I will if my prose has let everyone who has bothered to red
to the end confused.
thanks as always,