On Sun, 29 Apr 2007 16:33:39 +0200 "ronny vanden bempt" ronny.vandenbempt@gmail.com wrote:
Hey,
In several patches I had the following problem: I make a patch that I'm going to use in another patch. To make it possible to use several of these subpatches in the main patch, I add a dollarsign where needed. But when I apply this to arrays, I cannot make it work. For example a block that applies a window. It's nothing more than a tabread block. But I have four files with a window in. So I call the array to read: $1-window. But when I want to read it with a message: $1-window read gaussBig.txt, it doesn't load. Probably this is because of the ambiguity between dollarsigns in a message and elsewhere, or maybe due to the dollarsign not being replaced in the name of an array. Anyone any idea how to deal with this?
Put it in an abstraction. There is currently no real local scope in Pd. That's something I would like to see change, but for now you must create abstractions. The $1 is expanded to a random UID that is per patch, so two or more $1-things will not actually be unique within the same patch.
I refer also to the documentation of this block on our website: http://idafx.blogspot.com/2007/04/mapwindow-pdf-in-this-document-one-can.htm...
Another small problem: can you leave a graph visible in a subpatch (thus with graph on parent selected) without seeing it in the mainpatch where this subpatch is used in? Because when i select graph on parent for the graph, the graph also appears in the parent patch at the same place, being next to the block from the subpatch.
This has varied with different Pd versions. In the past you could just place it off the GOP area and not see it. I believe that changed > 0.4. You can make a subpatch to hide your arrays in and still have them easy to see if you need to.
-- Ronny Vanden Bempt (0486)510841 www.ropefly.com www.hetdepot.be [home]riddersstraat 226, 3000 Leuven [dom]verbindingslaan 36, 3001 Heverlee