<div dir="ltr"><div>&gt; <span style="font-size:12.800000190734863px;font-family:arial,sans-serif">hope this clears things a bit.</span><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I can&#39;t see how it could be any clear :D</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">thanks so much for the detailed explanation, really appreciate it</div><div class="gmail_extra"><br></div><div class="gmail_extra">I finally know how overlapping is actually done behind the scenes now, cool</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">And yeah, objects like [osc~] should totally be aware of this matter and do it correctly</div><div class="gmail_extra"><br></div><div class="gmail_extra">On the other hand, I&#39;m getting really nice and distorted wicked sounds from this error, and I&#39;m gonna use it! haha </div>
<div class="gmail_extra"><br></div><div class="gmail_extra">All the best<br><br><div class="gmail_quote">2013/11/26 IOhannes m zmölnig <span dir="ltr">&lt;<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 2013-11-26 19:37, Alexandre Torres Porres wrote:<br>
&gt;&gt;  [1] <a href="https://sourceforge.net/p/pure-data/feature-requests/16/" target="_blank">https://sourceforge.net/p/pure-data/feature-requests/16/</a><br>
&gt;<br>
&gt; Not sure if I got what the request was requesting.<br>
&gt;<br>
&gt; &quot;the parameter s-&gt;s_sr isn&#39;t defined properly, as<br>
&gt; s-&gt;s_sr=(fs*overlap) has nothing to do with the actual sampling<br>
&gt; interval applied to the audio data.&quot;<br>
<br>
</div>the question is how you define samplerate.<br>
a simplisitic approach simply takes the number of samples processed<br>
within e.g. 1 second.<br>
if you do overlap by 2, you process each incoming sample twice, so the<br>
number of samples that passes through the object is doubled, and thus<br>
the sample rate is doubled as well.<br>
<br>
this however doesn&#39;t really make sense, if you use that samplerate to<br>
calculate the period of a periodic signal, like [osc~] does.<br>
<br>
e.g. an [osc~ 689.062] will have a period length of 64 samples (@44.1kHz).<br>
<br>
when we do upsampling, the internal samplerate is 88.2kHz, thus the<br>
period length is 128 samples.<br>
when going back to the original samplesize, you need to do downsampling,<br>
which basically means to only take every second sample (in the most<br>
simple form), so you end up with half of the samples discarded and the<br>
period size of 64 again.<br>
<br>
however, with overlapping things are not as simple. the internal<br>
samplerate is again 88.2kHz, the period length 128 samples.<br>
but this gives us two problems:<br>
- imagine that the blocksize was still 64 samples (both in the parent<br>
canvas and in the reblocked (overlapped) sub-canvas). but [osc~] will<br>
create a &quot;continuous&quot; signal between two calls, as it doesn&#39;t know<br>
anything about overlapping. this is plain wrong for overlapping signals,<br>
where the odd frames should be considered continous, and the even frames<br>
are continuous, but not both together.<br>
- when going back to the non-overlapping parent canvas, we again have to<br>
reduce the number of samples by a factor-of-two. but this time the<br>
algorithm used is to align the half-blocks and &quot;sum&quot; the up.<br>
but this means, that you still have a period size of 128 samples. which<br>
will make ~344Hz in the parent patch...(and the odd artifacts you get<br>
from the problem #1)<br>
<br>
hope this clears things a bit.<br>
<br>
the statement in the feature-request/bugtracker kind of addresses this:<br>
in Pd the signal-block&#39;s &quot;sample rate&quot; is not the inverse of the &quot;actual<br>
sampling interval&quot; (think nyquist and the like) but &quot;the number of<br>
samples processed in a given time&quot; - which simply isn&#39;t the same if you<br>
do overlapping....<br>
<br>
<br>
fmdsar<br>
<span class="HOEnZb"><font color="#888888">IOhannes<br>
<br>
</font></span><br>_______________________________________________<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>
<br></blockquote></div><br></div></div>