<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-text-html" lang="x-unicode">
      <div class="moz-cite-prefix">On 16/01/2015 19:33, IOhannes m
        zmölnig wrote:<br>
      </div>
      <blockquote cite="mid:54B95971.6050502@iem.at" type="cite">
        <pre wrap="">On 01/16/2015 12:23 PM, Alessio Degani wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">Hi list,
</pre>
        </blockquote>
        <pre wrap="">[...]

</pre>
        <blockquote type="cite">
          <pre wrap="">When you want to write a PD external that process audio stream, the
scenario is:
1- PD passes chunked audio stream to the inlet of the external and read
an audio chunk from the outlet of that external.
Each input and output chunk is of fixed length of, say, Nc samples. Each
chunk is a NON-overlapped adjacent chunk of the audiostream to be
processed.
</pre>
        </blockquote>
        <pre wrap="">i hope you are aware that this is a simplification on your side, and not
how Pd handles audio streams (when it comes to overlapping)</pre>
      </blockquote>
      <br>
      Humm... I didn't know that there are different way to handle audio
      stream in PD. Can PD directly manage overlapp and stuff like that?<br>
      Where I can read something about that? (I've already read your
      very useful guide: HOWTO write an External for Pure Data)<br>
      <br>
      <blockquote cite="mid:54B95971.6050502@iem.at" type="cite">
        <blockquote type="cite">
          <pre wrap="">My question is:
There is a standard way, a "design pattern", to manage this kind of
processing?
</pre>
        </blockquote>
        <pre wrap="">i don't know of a standard "design pattern" but there are two ways that
come to my mind:

- implement a ring-buffer where you put the sample chunks delivered by
Pd, and read/use them whenever you have collected enough data.
overlapping is very simple to implement (as long as you don't overwrite
the data :-))</pre>
      </blockquote>
      <br>
      Yes... I think that [out/in] ring-buffer is a good practice!<br>
      <br>
      <blockquote cite="mid:54B95971.6050502@iem.at" type="cite">
        <pre wrap="">- let Pd do the partitioning and overlapping.
this should be the preferred way, but obviously only works if you can
live with Pd's constraints regarding overlap (overlap-factor mus be a
power-of-two).
[CUT]</pre>
      </blockquote>
      <br>
      Ok... as I said before, I would like to learn more about this! :)<br>
      It seems a useful facility!<br>
      <br>
      Thank you<br>
      <blockquote cite="mid:54B95971.6050502@iem.at" type="cite">
        <pre wrap="">

gfmdar
IOhannes

</pre>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a>
</pre>
      </blockquote>
      <br>
      <br>
      <pre class="moz-signature" cols="72">-- 
a.</pre>
    </div>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
a.</pre>
  </body>
</html>