<br><br><div class="gmail_quote">On Tue, Apr 5, 2011 at 2:33 PM, Seth Nickell <span dir="ltr">&lt;<a href="mailto:seth@meatscience.net">seth@meatscience.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Mathieu,<br>
<br>
Thanks, I assumed (without checking :-P) that the dsp call happened<br>
every time, didn&#39;t realize it was a setup/patching call that registers<br>
my &quot;_perform&quot; function with a call graph. Exactly what I need.<br>
<br>
I think the difference in approach comes from the needs of the<br>
external. fiddle~ probably needs much larger blocks than typical to<br>
discriminate between low frequencies. In my case, I can run at 64<br>
sample sizes, but I&#39;ll take your whole CPU to do it. It might be smart<br>
to default to some internal buffering (say 512), and let people order<br>
the external to do really really low latency if they need it and are<br>
willing to pay in CPU.<br></blockquote><div><br>Here&#39;s where your users&#39; choice of block sizes comes in--if your user puts a partitioned convolution external into a canvas with block size 64, it means to be low-latency.  If the user puts it in with [block~ 1024], then the buffering is defined.<br>
<br>Pd means to be ~user~programmable and modular.  The more you try to monolith your externals, the worse they work (I&#39;ve done this).  I know I&#39;m not expressing it well, but I hope the point comes through.<br> </div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
That said, Peter reminded me of an optimization that I hadn&#39;t<br>
implemented yet. AudioUnits are rarely asked to run below 128 sample<br>
block sizes, so it didn&#39;t make sense for the AU, and I forgot that it<br>
was on the TODO list from 2 years ago. ;-) By convolving very small<br>
blocks in the time domain, and switching to frequency domain for<br>
larger blocks, I think we can get excellent CPU usage at very small<br>
block sizes too.<br></blockquote><div><br>It sounds like you&#39;d have a bit of a problem without first profiling the system or having known profiles for different hardware.  Can you tell me more about your partitioning method (just the math)?<br>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<font color="#888888"><br>
-Seth<br>
</font><div><div></div><div class="h5"><br>
On Tue, Apr 5, 2011 at 8:49 AM, Mathieu Bouchard &lt;<a href="mailto:matju@artengine.ca">matju@artengine.ca</a>&gt; wrote:<br>
&gt; On Mon, 4 Apr 2011, Seth Nickell wrote:<br>
&gt;<br>
&gt;&gt; Are the DSP calls liable to vary t_signal-&gt;s_n (block size) without<br>
&gt;&gt; notification? 64 samples, apparently the default on pd-extended, is<br>
&gt;&gt; doable without buffering for partitioned convolution on a modern<br>
&gt;&gt; computer, but it exacts a pretty high CPU toll, and if I have to<br>
&gt;&gt; handle random blocksize changes, it gets more expensive.<br>
&gt;&gt;<br>
&gt;&gt; Also, since convolution is much more efficient around block sizes of 256<br>
&gt;&gt; or 512, perhaps I should default to one of these, buffer a little, and have<br>
&gt;&gt; a &quot;runatpdblocksize&quot; message or somesuch?<br>
&gt;<br>
&gt; There&#39;s always a notification. Any change of s_n will result in a new call<br>
&gt; to the dsp-function.<br>
&gt;<br>
&gt; Note that it&#39;s best to make sure that the dsp-function is fairly fast most<br>
&gt; of the times, because any patching may retrigger the dsp-function in order<br>
&gt; to recompile the graph.<br>
&gt;<br>
&gt; dsp objects working with some kind of blocks don&#39;t have to be using s_n as a<br>
&gt; setting. I mean that you can accumulate several dsp-blocks in order to make<br>
&gt; your own kind of bigger block. This is what [fiddle~] and [env~] do, for<br>
&gt; example.<br>
&gt;<br>
&gt; But some other object classes use s_n as a setting. For example, [fft~]<br>
&gt; does. I don&#39;t know why this is not consistent across all of pd. (I&#39;m not<br>
&gt; saying either approach is better than the other.)<br>
&gt;<br>
&gt;  _______________________________________________________________________<br>
&gt; | Mathieu Bouchard ---- tél: <a href="tel:%2B1.514.383.3801">+1.514.383.3801</a> ---- Villeray, Montréal, QC<br>
<br>
</div></div><div><div></div><div class="h5">_______________________________________________<br>
<a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
</div></div></blockquote></div><br>