<br><br><div><span class="gmail_quote">On 12/11/07, <b class="gmail_sendername">Andy Farnell</b> &lt;<a href="mailto:padawan12@obiwannabe.co.uk">padawan12@obiwannabe.co.uk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>Perhaps what&#39;s useful then is a better version of &quot;tidy&quot;<br>already on the menu. Some kind of magnetic grid so that<br>all connections are straight up-down or at 45 degrees.</blockquote><div><br class="webkit-block-placeholder">
</div><div><br class="webkit-block-placeholder"></div><div>Yes, something more than Tidy. &nbsp;</div><br><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">Even that is harder than it seems. For instance if you change
<br>a [select do re me] to [sel doh ray mee] then all the outlet<br>positions change.</blockquote><div><br class="webkit-block-placeholder"></div><div>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.
</div><div>&nbsp;</div><br><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">I guess each time the algorithm should pass down the graph<br>then up the graph to identify and align everything that is
<br>constrained first, so terminal nodes which have the greatest<br>freedom of placement happen last (does that make sense?)</blockquote><div><br class="webkit-block-placeholder"></div><div>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.
</div><div><br class="webkit-block-placeholder"></div><div>I really don&#39;t intend this to take a messy patch, and have it produce a beautiful layout, just something that aligns the connections and the flow.</div><div>&nbsp;
</div><br><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">It would be a very welcome addition Mike,<br><br>I print a lot of Pd diagrams for teaching and publications
<br>and spend a fair amount of time tidying patches by hand.</blockquote><div><br class="webkit-block-placeholder"></div><div>Yup, and that is the goal.</div><div><br class="webkit-block-placeholder"></div><div>Thanks.</div>
<div>&nbsp;</div><br><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 11 Dec 2007 18:45:00 -0600<br>&quot;Mike McGonagle&quot; &lt;<a href="mailto:mjmogo@gmail.com">
mjmogo@gmail.com</a>&gt; wrote:<br><br>&gt; On 12/11/07, Andy Farnell &lt;<a href="mailto:padawan12@obiwannabe.co.uk">padawan12@obiwannabe.co.uk</a>&gt; wrote:<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;
<br>&gt; &gt; It&#39;s impossible to prescribe any certain way to patch, it&#39;s a bit of an<br>&gt; &gt; art<br>&gt; &gt; and very personal, but I have established a kind of pattern that I seem to<br>&gt; &gt; follow and always try to tidy up patches into this form. This is mainly
<br>&gt; &gt; for<br>&gt; &gt; DSP, synthesis and effects...<br>&gt;<br>&gt;<br>&gt;<br>&gt; Yes, I know this. My idea is not to create a tool that will force a user to<br>&gt; lay things out in a specific way, but more a tool that will clean things up,
<br>&gt; and then the user can accept those changes and start with that patch. it<br>&gt; would not overwrite the original patch, that would be left for the user to<br>&gt; do.<br>&gt;<br>&gt;<br>&gt; &gt; How you can parse the file and identify any of this is a damn hard problem
<br>&gt; &gt; imho.<br>&gt;<br>&gt;<br>&gt; My idea stems from not worrying about the functionality of these objects,<br>&gt; but in how they are connected. Basically, when I build my patches, I try to<br>&gt; stack all those things that are connected directly in a line. While this
<br>&gt; doesn&#39;t always work out, I think that something like this could be<br>&gt; programmed to help people clean up some of the mazes of patch cords.<br>&gt;<br>&gt; I am not claiming that this would fix any problems, just an attempt to make
<br>&gt; the flow of objects and their placements in the patch cleaner.<br>&gt;<br>&gt; Mike<br>&gt;<br>&gt;<br>&gt;<br>&gt; On Tue, 11 Dec 2007 17:34:49 -0600<br>&gt; &gt; &quot;Mike McGonagle&quot; &lt;<a href="mailto:mjmogo@gmail.com">
mjmogo@gmail.com</a>&gt; wrote:<br>&gt; &gt;<br>&gt; &gt; &gt; Hey,<br>&gt; &gt; &gt; I was contemplating the idea of what it would take to write a program<br>&gt; &gt; that<br>&gt; &gt; &gt; reads a PD abstration and produces something that &quot;TRIES&quot; to clean up
<br>&gt; &gt; the<br>&gt; &gt; &gt; appearance of the patch. From the discussion of segmented lines, and<br>&gt; &gt; from<br>&gt; &gt; &gt; seeing some other people&#39;s patches, it made me wonder if anyone else has<br>
&gt; &gt; &gt; tried to write a program that will attempt to clean up the tangled mess<br>&gt; &gt; that<br>&gt; &gt; &gt; some patches come to...<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; I have some ideas about how to do this, but wanted to first check out to
<br>&gt; &gt; see<br>&gt; &gt; &gt; if others have already attempted this sort of thing, and if they found<br>&gt; &gt; it to<br>&gt; &gt; &gt; be fruitful.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Thanks,<br>&gt; &gt; &gt;<br>
&gt; &gt; &gt; Mike<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; --<br>&gt; &gt; &gt; Peace may sound simple_one beautiful word_ but it requires everything we<br>&gt; &gt; &gt; have, every quality, every strength, every dream, every high ideal.
<br>&gt; &gt; &gt; _Yehudi Menuhin (1916_1999), musician<br>&gt; &gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; --<br>&gt; &gt; Use the source<br>&gt; &gt;<br>&gt; &gt; _______________________________________________<br>
&gt; &gt; <a href="mailto:PD-list@iem.at">PD-list@iem.at</a> mailing list<br>&gt; &gt; UNSUBSCRIBE and account-management -&gt;<br>&gt; &gt; <a href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list
</a><br>&gt; &gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Peace may sound simple_one beautiful word_ but it requires everything we<br>&gt; have, every quality, every strength, every dream, every high ideal.<br>&gt; _Yehudi Menuhin (1916_1999), musician
<br>&gt;<br><br><br>--<br>Use the source<br></blockquote></div><br><br clear="all"><br>-- <br>Peace may sound simple—one beautiful word— but it requires everything we have, every quality, every strength, every dream, every high ideal.
<br>—Yehudi Menuhin (1916–1999), musician