On 12/11/07, Andy Farnell padawan12@obiwannabe.co.uk wrote:
Perhaps what's useful then is a better version of "tidy" already on the menu. Some kind of magnetic grid so that all connections are straight up-down or at 45 degrees.
Yes, something more than Tidy.
Even that is harder than it seems. For instance if you change
a [select do re me] to [sel doh ray mee] then all the outlet positions change.
Yes, true. This is just something that will hopefully arrange things so that the flow of control can be exposed. Once that is done, then the user can take the result patch and move things around a bit to their liking.
I guess each time the algorithm should pass down the graph
then up the graph to identify and align everything that is constrained first, so terminal nodes which have the greatest freedom of placement happen last (does that make sense?)
I was actually thinking about two different ways of doing it. One that would start with the inputs (or any object that is a source of some kind) and work down. The other way would be just the reverse. I was also looking at some Graph Theory, and it might be useful to implement a depth-first or a breath-first kind of algorithm.
I really don't intend this to take a messy patch, and have it produce a beautiful layout, just something that aligns the connections and the flow.
It would be a very welcome addition Mike,
I print a lot of Pd diagrams for teaching and publications and spend a fair amount of time tidying patches by hand.
Yup, and that is the goal.
Thanks.
On Tue, 11 Dec 2007 18:45:00 -0600
"Mike McGonagle" mjmogo@gmail.com wrote:
On 12/11/07, Andy Farnell padawan12@obiwannabe.co.uk wrote:
It's impossible to prescribe any certain way to patch, it's a bit of
an
art and very personal, but I have established a kind of pattern that I
seem to
follow and always try to tidy up patches into this form. This is
mainly
for DSP, synthesis and effects...
Yes, I know this. My idea is not to create a tool that will force a user
to
lay things out in a specific way, but more a tool that will clean things
up,
and then the user can accept those changes and start with that patch. it would not overwrite the original patch, that would be left for the user
to
do.
How you can parse the file and identify any of this is a damn hard
problem
imho.
My idea stems from not worrying about the functionality of these
objects,
but in how they are connected. Basically, when I build my patches, I try
to
stack all those things that are connected directly in a line. While this doesn't always work out, I think that something like this could be programmed to help people clean up some of the mazes of patch cords.
I am not claiming that this would fix any problems, just an attempt to
make
the flow of objects and their placements in the patch cleaner.
Mike
On Tue, 11 Dec 2007 17:34:49 -0600
"Mike McGonagle" mjmogo@gmail.com wrote:
Hey, I was contemplating the idea of what it would take to write a
program
that
reads a PD abstration and produces something that "TRIES" to clean
up
the
appearance of the patch. From the discussion of segmented lines, and
from
seeing some other people's patches, it made me wonder if anyone else
has
tried to write a program that will attempt to clean up the tangled
mess
that
some patches come to...
I have some ideas about how to do this, but wanted to first check
out to
see
if others have already attempted this sort of thing, and if they
found
it to
be fruitful.
Thanks,
Mike
-- Peace may sound simple_one beautiful word_ but it requires
everything we
have, every quality, every strength, every dream, every high ideal. _Yehudi Menuhin (1916_1999), musician
-- Use the source
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- Peace may sound simple_one beautiful word_ but it requires everything we have, every quality, every strength, every dream, every high ideal. _Yehudi Menuhin (1916_1999), musician
-- Use the source
On Tue, Dec 11, 2007 at 08:28:03PM -0600, Mike McGonagle wrote:
On 12/11/07, Andy Farnell padawan12@obiwannabe.co.uk wrote: It would be a very welcome addition Mike,
I print a lot of Pd diagrams for teaching and publications and spend a fair amount of time tidying patches by hand.
Yup, and that is the goal.
Aparently Max/MSP, and (I think) DesireData have key strokes that can do a lot of the hard work for you with regards to aligning and distributing boxes. There is a video of this kind of action floating around somewhere that's been posted to this list a couple of times. I feel that this might be more useful than a blunt patch tidying master algorithm since it gives the user more control over the layout.
I've always thought it would be cool to have a patching system that is a bit like a spreadsheet with margins between cells so that cells are arranged in a fixed and easy to read pattern and patch cords all run in the margins. This would make creating patches faster as you could use tabs and carriage returns between cells etc.
Best,
Chris.
On Tue, 11 Dec 2007, Mike McGonagle wrote:
I was actually thinking about two different ways of doing it. One that would start with the inputs (or any object that is a source of some kind) and work down. The other way would be just the reverse. I was also looking at some Graph Theory, and it might be useful to implement a depth-first or a breath-first kind of algorithm.
I don't think that either breadth-first or depth-first will provide you with a satisfying result. Both are top-down traversals. I believe that it's better to do bottom-up: start with individual objects, try to group them in sections, then align things tightly within sections, but then find the width of sections to figure out how you can place them in the patch so that they don't overlap.
Another kind of solution that I've thought about, is an incremental improvement, inspired by laws of physics. Invent laws of tidyness that are embodied by forces that pull and push objects in certain ways. This is much more CPU-expensive but it's surely much faster than a human. This kind of solution is more flexible because it can balance things between contradictory rules, so it's easier to complexify that kind of algorithm (add new rules that you think of), than with the bottom-up or top-down ways. It's also better in other ways, but it's too long to explain here.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada