<?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[maths on [array], in the signal domain, possibly]]></title><description><![CDATA[<p>Hi there,</p>
<p>I'd need to apply some math function (of the index) to every element of a given (4096 points long) array.  My PD skills are a bit rusty, so I thought it would be a good advice to ask for pointers here.</p>
<p>Of course I could set up a pointer structure using a [metro 1], it would cost me around 4 seconds to perform it.  Or maybe should I not  use a [metro 1] and &quot;drive&quot; the counter structure using a [bang] every time the mathematical operation has just been performed on the current index, in order to speed up things, I would call this &quot;freewheeling&quot;.  It would be fast enough for me.  Or maybe this would be &quot;too fast&quot; and lead to some kind of error or pd freeze because it is nearly as connecting a [float] output directly to its input.  I can definitely test that.</p>
<p>But I'm curious about the possibility to perform this in the signal domain, possibly &quot;overclocking&quot; it in a subpatch,</p>
<p>This leads me to my question:  is there a &quot;classic&quot;, &quot;neat&quot;  way of doing this that would guarantee that each and every sample (index) will be processed?  I mean, if I choose to use a [line~] whose output is to be multiplied by the length of the array to &quot;drive&quot; a [tabread] / [tabwrite] pair, won't there be the risk for rounding problems leading to &quot;skipped&quot; or &quot;read twice&quot; indexes in the array?</p>
<p>Of course there is probably another way of doing this, I'd be glad to hear it from you.</p>
<p>Thank you very much,</p>
<p>Nau</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15956/maths-on-array-in-the-signal-domain-possibly</link><generator>RSS for Node</generator><lastBuildDate>Sun, 06 Dec 2026 13:04:37 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/15956.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 04 Dec 2026 09:20:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to maths on [array], in the signal domain, possibly on Fri, 04 Dec 2026 09:22:04 GMT]]></title><description><![CDATA[<p>Hi there,</p>
<p>I'd need to apply some math function (of the index) to every element of a given (4096 points long) array.  My PD skills are a bit rusty, so I thought it would be a good advice to ask for pointers here.</p>
<p>Of course I could set up a pointer structure using a [metro 1], it would cost me around 4 seconds to perform it.  Or maybe should I not  use a [metro 1] and &quot;drive&quot; the counter structure using a [bang] every time the mathematical operation has just been performed on the current index, in order to speed up things, I would call this &quot;freewheeling&quot;.  It would be fast enough for me.  Or maybe this would be &quot;too fast&quot; and lead to some kind of error or pd freeze because it is nearly as connecting a [float] output directly to its input.  I can definitely test that.</p>
<p>But I'm curious about the possibility to perform this in the signal domain, possibly &quot;overclocking&quot; it in a subpatch,</p>
<p>This leads me to my question:  is there a &quot;classic&quot;, &quot;neat&quot;  way of doing this that would guarantee that each and every sample (index) will be processed?  I mean, if I choose to use a [line~] whose output is to be multiplied by the length of the array to &quot;drive&quot; a [tabread] / [tabwrite] pair, won't there be the risk for rounding problems leading to &quot;skipped&quot; or &quot;read twice&quot; indexes in the array?</p>
<p>Of course there is probably another way of doing this, I'd be glad to hear it from you.</p>
<p>Thank you very much,</p>
<p>Nau</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15956/maths-on-array-in-the-signal-domain-possibly</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15956/maths-on-array-in-the-signal-domain-possibly</guid><dc:creator><![CDATA[nau]]></dc:creator><pubDate>Fri, 04 Dec 2026 09:22:04 GMT</pubDate></item><item><title><![CDATA[Reply to maths on [array], in the signal domain, possibly on Fri, 04 Dec 2026 15:54:04 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/nau">@nau</a> Maybe you could process the array as fast as possible in control domain using [until]?<br />
<a href="/uploads/files/1796399584946-process-4096.pd">process 4096.pd</a><br />
<img src="/uploads/files/1796399604522-screenshot-2026-12-04-105140.png" alt="Screenshot 2026-12-04 105140.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15956/maths-on-array-in-the-signal-domain-possibly/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15956/maths-on-array-in-the-signal-domain-possibly/2</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Fri, 04 Dec 2026 15:54:04 GMT</pubDate></item><item><title><![CDATA[Reply to maths on [array], in the signal domain, possibly on Fri, 04 Dec 2026 21:38:30 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/nau">@nau</a> jmmmp did this in 2011 (or before) so Pd extended, but not much has changed since (see screenshot).........<br />
<a href="/uploads/files/1796417571356-array-edit.pd">array-edit.pd</a></p>
<p>I am not certain that it fits your specification but also I am not sure that there is a better solution<br />
The function writer gets the samplerate and arraysize and fits the wave to the array.<br />
There are new objects for that in Vanilla.<br />
It could be written faster than real time (maybe..?)..... <a href="https://forum.pdpatchrepo.info/topic/13125/batch-processing-audio-faster-than-realtime" rel="nofollow">https://forum.pdpatchrepo.info/topic/13125/batch-processing-audio-faster-than-realtime</a><br />
.... but audio rate (100ms) might be fast enough...</p>
<p><img src="/uploads/files/1796418772128-capture2.jpg" alt="Capture2.JPG" class="img-responsive img-markdown" /><br />
<img src="/uploads/files/1796418829348-capture1.jpg" alt="Capture1.JPG" class="img-responsive img-markdown" /><br />
David.</p>
<p><img src="/uploads/files/1796417887672-capture.jpg" alt="Capture.JPG" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15956/maths-on-array-in-the-signal-domain-possibly/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15956/maths-on-array-in-the-signal-domain-possibly/3</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Fri, 04 Dec 2026 21:38:30 GMT</pubDate></item><item><title><![CDATA[Reply to maths on [array], in the signal domain, possibly on Sun, 06 Dec 2026 00:14:28 GMT]]></title><description><![CDATA[<p>Thank you <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> and <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/whale-av">@whale-av</a>!<br />
I had forgotten that [until] does exist, it seems to be a good choice indeed.<br />
I will check <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jmmmp">@jmmmp</a>'s solution as well, seems promising too.<br />
Nau</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15956/maths-on-array-in-the-signal-domain-possibly/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15956/maths-on-array-in-the-signal-domain-possibly/4</guid><dc:creator><![CDATA[nau]]></dc:creator><pubDate>Sun, 06 Dec 2026 00:14:28 GMT</pubDate></item><item><title><![CDATA[Reply to maths on [array], in the signal domain, possibly on Sun, 06 Dec 2026 01:54:48 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/nau">@nau</a> If the math you want to perform is more easily expressed in audio objects than in control objects (e.g. any of the audio filters) then check out the help for [switch~] and open the subpatch [pd switch-bang]. Banging switch~ runs a block's worth of audio processing as fast as possible.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15956/maths-on-array-in-the-signal-domain-possibly/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15956/maths-on-array-in-the-signal-domain-possibly/5</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Sun, 06 Dec 2026 01:54:48 GMT</pubDate></item></channel></rss>