[PD-dev] i can has svn commit access?

Tim Blechmann tim at klingt.org
Tue Dec 2 11:38:22 CET 2008


hi damien,

> i would like to
> implement multithreaded [soundfiler] read, 

did you have a look at my sndfile external? a threaded soundfiler has to 
face two issues:
- read the file in a separate thread
- synchronize the buffers

while the first issue is trivial, the second one requires some changes to 
the public api of pd in order to avoid a recompilation of the dsp 
chain ... 
if you just deal with the first issue like sndfiler, you will have audio 
dropouts when you patches get bigger ... sndfiler used to work without 
dropouts in the help patches, but not in the rather complex performance 
patch, i was using those days ...

i'd suggest to search the archive of the pd-dev list, iirc i posted a 
more detailed analysis of the problem a few years ago ...


> and i'd like to in the longer
> term make a stab at multithreaded the entire DSP engine, or at least
> investigating whether this project is a feasible one.

i would like to hear your approach for that, since this is a very 
interesting issue ... the design of a real-time, multi-threaded dsp 
engine is actually the topic of my master thesis :)

there are two interesting publications about multi-threaded dsp engines, 
avoiding pipelining techniques:
- U. Reiter and A. Partzsch. Multi Core / Multi Thread Processing in 
Object Based Real Time Audio Rendering: Approaches and Solutions for an 
Optimization Problem.
- S. Letz, Y. Orlarey, D. Fober. Jack audio server for multi-processor 
machines

while the approach of the `letz' paper, as it is implemented in jackdmp 
is only feasible for graphs with a small number of nodes, the `reiter/
partzsch' paper describes an interesting algorithm for clustering big 
graphs.

unfortunately, implementing the `reiter/partzsch' approach for a pd/max/
nova graph is not that simple ... while the signal flow is explicitly 
defined in the pd/max/nova graph, the order of accessing shared resources 
(buffers, busses, ...) is done implicitly ...
i had a multi-threaded implementation of the nova engine, only taking the 
explicit ordering of the signal graph into account. i did not implement 
the implicit ordering, since the implementation would be quite complex 
and i didn't have the feeling that pd/max/nova graphs are feasible to 
represent a multi-threaded dsp engine, because the lack of expressive 
power concerning resource use ...

so, i'd be curious to hear your approach for implementing a multi-
threaded dsp engine for pd ...

cheers, tim

-- 
tim at klingt.org
http://tim.klingt.org

The most wonderful opportunity which life offers is to be human.
  Henry Miller





More information about the Pd-dev mailing list