[PD] Segmented patch chords?

federico xaero at inwind.it
Fri Mar 11 02:12:27 CET 2005

>>then this path can be rendered with lines, bezier, exp, various 
>>f(n)'s.... and you don't have to store those segments information in the 
>>patch, because they are computed by a kinda of AI :)
>>what do you think about it?
>Yes, it's a good idea, and I was thinking about that last year when I was
>about to implement the feature for real. I had decided that wires would
>have three possible drawing-modes:
> * non-segmented
> * auto-segmented
> * manually-segmented
>Those three modes are per-wire, so a same patcher could contain a mix of
>the three modes of wires.
>I haven't really tried any auto-segmentation, but I predict that users
>will want to do some manual segmentation too.
i wanted to test some auto-segmentation algorithm.
i built up this piece of code (attached) in about a hour.
this demonstrates basilar working of this feature.
i am open to any suggestions. for now it very very simple. it still miss 
some magnetic control to avoid crosing objects, and some more anchor 
point to allow loop outlet->inlet of the same object.

the code is intended only to show this method. the interesting code is 
in the zap() function.
i'm not able to program in tcl/tk.. otherwise maybe i would sent 
directly a patch to pd.. hehe :)
you need fltk-1.1 to build it.
you can build it so:
$ g++ sc.cpp `fltk-config --cxxflags` `fltk-config --ldflags`

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sc.cpp
Type: text/x-c++src
Size: 3995 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20050311/8e71f58f/attachment.cpp>

More information about the Pd-list mailing list