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
Federico