> (Hi Hans! Hi Dan!)
> It's been a while since I was here. I just quit my job and intend to spend some
time making music boxes. Pd is in my future.
> There's a couple of things I'd like to spend some time on:
> 1. I'd like to elminate the clicking that you get when making live edits to a patch.
These typically come from three sources:
1) rebuilding the dsp graph when you make a change to it
2) walking the list of objects in a glist
3) sending too much data to the GUI over the socket
#1 currently the dsp graph is just a big, flat array of function&argument
pointers. It would require substantial changes to only rebuild subsections
of it.
#2 every time you move the mouse (plus some other events like clicking)
Pd walks the list of canvas objects, either until it finds an object under the
mouse or hits the end. Run Pd with the "-d 3" flag and you will see how
often Pd does this when editing a patch.
The list of objects is a linked list which, as Bjarne Stroustrup has said,
"optimizes for cache misses". But more importantly, all that work happens
in the same process as the audio engine instead of inside the GUI toolkit
where it should be.
Moving this work to the GUI is not trivial, especially because Pd has no
formal specification.
#3 The current graphical processing code in the g_*.c files is very chatty
and unoptimized. When you move a selection of 100 objects by one pixel,
all 100 objects send a message to the GUI to move the corresponding
tagged tk canvas items by 1 pixel. In Vanilla I believe garrays are still
redrawn every time you move them which makes things even worse.
Also, every time you paste text into a box each character is sent separately
to the audio process, concatenated, then sent back to the GUI to display.
So you get exponential explosion there. There are probably other places
where this happens...
-Jonathan
2. I'd like to get as much of the DSP chain as possible into a threadsafe state.
Are there any plans around these? Design docs or discussions? Is this on anyone's radar?
Thanks
Damian
--
damian stewart . digitaler fuzzi . vienna, austria
http://damianstewart.com . twitter @damian0815
_______________________________________________
Pd-dev mailing list
Pd-dev@lists.iem.athttps://lists.puredata.info/listinfo/pd-dev