<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Updating table in real-time]]></title><description><![CDATA[<p>Hi all!</p>
<p>I'm trying to implement a real-time synthesis algorithm which produces waveforms sample by sample. My approach is to calculate a block of samples, store them in a table, wait for those samples to be reproduced (using phasor~ and tabread~) and calculate another block. For example, if there are 8820 samples in a block, the reading frequnecy is set to 5 Hz, whilst the waiting between calculating two successive blocks is 200 ms (I use METRO 200).</p>
<p>And it works fine. However, in every reading cycle there is a hearable click. The click is not caused by the synthesis algorithm because the updateded table smoothly continues from the old values. So, I guess that the problem is updating the table while reading it.</p>
<p>I spent a lot of time trying different apporaches (such as tabosc~ and even direct usage of sig~), but have not found a solution. Also, searching for an idea on the Internet did not help. As I am quite new to Pure Data, maybe there is a different approach or an obvious solution which I don't see. I would appreciate every suggestion.</p>
<p>Cheers!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 21:28:31 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/6781.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 11 Nov 2012 16:33:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Updating table in real-time on Sun, 11 Nov 2012 16:33:00 GMT]]></title><description><![CDATA[<p>Hi all!</p>
<p>I'm trying to implement a real-time synthesis algorithm which produces waveforms sample by sample. My approach is to calculate a block of samples, store them in a table, wait for those samples to be reproduced (using phasor~ and tabread~) and calculate another block. For example, if there are 8820 samples in a block, the reading frequnecy is set to 5 Hz, whilst the waiting between calculating two successive blocks is 200 ms (I use METRO 200).</p>
<p>And it works fine. However, in every reading cycle there is a hearable click. The click is not caused by the synthesis algorithm because the updateded table smoothly continues from the old values. So, I guess that the problem is updating the table while reading it.</p>
<p>I spent a lot of time trying different apporaches (such as tabosc~ and even direct usage of sig~), but have not found a solution. Also, searching for an idea on the Internet did not help. As I am quite new to Pure Data, maybe there is a different approach or an obvious solution which I don't see. I would appreciate every suggestion.</p>
<p>Cheers!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time</guid><dc:creator><![CDATA[Krex]]></dc:creator><pubDate>Sun, 11 Nov 2012 16:33:00 GMT</pubDate></item><item><title><![CDATA[Reply to Updating table in real-time on Sun, 11 Nov 2012 17:04:08 GMT]]></title><description><![CDATA[<p>Could you attach your patch ?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/2</guid><dc:creator><![CDATA[baptiste_c]]></dc:creator><pubDate>Sun, 11 Nov 2012 17:04:08 GMT</pubDate></item><item><title><![CDATA[Reply to Updating table in real-time on Sun, 11 Nov 2012 19:11:52 GMT]]></title><description><![CDATA[<p>Please, find attached the patch. This should be a dynamic stochastic synthesizer, but it is not finished yet.</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/GenDyn6.pd" rel="nofollow">http://www.pdpatchrepo.info/hurleur/GenDyn6.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/3</guid><dc:creator><![CDATA[Krex]]></dc:creator><pubDate>Sun, 11 Nov 2012 19:11:52 GMT</pubDate></item><item><title><![CDATA[Reply to Updating table in real-time on Sun, 11 Nov 2012 19:22:31 GMT]]></title><description><![CDATA[<p>Generally, reading and writing tables simultaneously causes clicking. Maybe try adding a table, writing the next block on the unused table and then crossfading onto that table. You can pingpong the fade back and forth between the two table and produce the desired continuous waveform.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/4</guid><dc:creator><![CDATA[sunji]]></dc:creator><pubDate>Sun, 11 Nov 2012 19:22:31 GMT</pubDate></item><item><title><![CDATA[Reply to Updating table in real-time on Sun, 11 Nov 2012 21:58:38 GMT]]></title><description><![CDATA[<p>Sunji, thanks for the advice. It seems a little bit tricky to implement. Do you maybe have some example patches?</p>
<p>Meanwhile, I tried a different approach. Instead of being written into a table, calculated samples are now converted directly into audio using sig~. The algorithm processes block by block (triggered by bang~). However, the results are even worse, the sound is distorsed. Maybe I did not set appropriate values for block size and overlapping. Please find attached the new patch.</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/GenDyn7.pd" rel="nofollow">http://www.pdpatchrepo.info/hurleur/GenDyn7.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/5</guid><dc:creator><![CDATA[Krex]]></dc:creator><pubDate>Sun, 11 Nov 2012 21:58:38 GMT</pubDate></item><item><title><![CDATA[Reply to Updating table in real-time on Mon, 12 Nov 2012 20:40:21 GMT]]></title><description><![CDATA[<p>I've tried two more soultions, but clicks are still there. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/frowning.png" title=":(" alt=":(" /></p>
<p>GenDyn8 uses two tables as sunji suggested.<br />
GenDyn11 uses one table and tabplay which triggers the computation.</p>
<p>Is it possible to change the title of this thread to &quot;Converting stream of floats into audio&quot;, because the soultion doesn't need to employ tables at all. I believe that there is a simple way to do this with sig~ and bang~ (as shown in GenDyn7).</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/GenDyn8.pd" rel="nofollow">http://www.pdpatchrepo.info/hurleur/GenDyn8.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/6</guid><dc:creator><![CDATA[Krex]]></dc:creator><pubDate>Mon, 12 Nov 2012 20:40:21 GMT</pubDate></item><item><title><![CDATA[Reply to Updating table in real-time on Mon, 12 Nov 2012 20:42:45 GMT]]></title><description><![CDATA[<p>And here is GenDyn11 (based on tabplay).</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/GenDyn11.pd" rel="nofollow">http://www.pdpatchrepo.info/hurleur/GenDyn11.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/7</guid><dc:creator><![CDATA[Krex]]></dc:creator><pubDate>Mon, 12 Nov 2012 20:42:45 GMT</pubDate></item><item><title><![CDATA[Reply to Updating table in real-time on Tue, 13 Nov 2012 05:30:38 GMT]]></title><description><![CDATA[<p>I haven't had the time to really dig into your patch, so I don't know if this will work. But maybe try writing to the table at audio rate instead of message rate. Then you could ensure that the table is written before it is read by forcing the order with subpatches (see G05.execution.order.pd).</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/8</guid><dc:creator><![CDATA[Maelstorm]]></dc:creator><pubDate>Tue, 13 Nov 2012 05:30:38 GMT</pubDate></item><item><title><![CDATA[Reply to Updating table in real-time on Tue, 13 Nov 2012 07:01:51 GMT]]></title><description><![CDATA[<p>Thank you, Maelstorm!</p>
<p>I found on this forum a way to get bangs at audio rate. So, I've adapted patch to calculate sample by sample and send them to:</p>
<p>[serialize 64]<br />
|<br />
[unpack~]</p>
<p>This way, tables are avoided. It works fine!</p>
<p>Also, another way is to calculate a block of 64 samples at each bang~ as I did in GenDyn7. However, the problem was sig~. Now with serialize 64 and unpack~ it also works fine. If you are interested in this version, you can find it attached.</p>
<p>Thank you for help!</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/GenDyn7a.pd" rel="nofollow">http://www.pdpatchrepo.info/hurleur/GenDyn7a.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/6781/updating-table-in-real-time/9</guid><dc:creator><![CDATA[Krex]]></dc:creator><pubDate>Tue, 13 Nov 2012 07:01:51 GMT</pubDate></item></channel></rss>