storing numbers in an abstraction

Mar 18, 2006 at 10:32am

storing numbers in an abstraction

#24950
Mar 18, 2006 at 10:41pm

I can’t think of one, but it’s a problem I’ve run into from time to time
as well, and probably worth a think-through, for a solution in the future.

jb

#72838
Mar 19, 2006 at 12:13am

it is not the idea of abstractions to store
stuff inside them.
do not forget that a patch could call two
instances of the abstraction patcher.

what might be the right solution for you is
adding arguments to your abstractions.
that means use [#1 i] and [#2 f] instead of
numboxes and connect a loadbang to them.

later when called as abstraction the
arguments can be initialized from inside,
or by giving the abstraction object box s
arguments, and can be set by inlets.

when you want to store “last use values”
you can now that from outside much easier
than with numboxes.

#72839
Mar 19, 2006 at 12:39am

The solution, actually, is to store the values at the level above: you
would need to get the values somehow (pattrstorage?), and then you’d
restore them when the patcher loads.

Any built in solution would have to do more or less the same thing, but
transparently.

jb

#72840

You must be logged in to reply to this topic.