<?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[Dynamically creating arrays]]></title><description><![CDATA[<p>Is there a way to create arrays from within a patch?<br />
I am making a sampler and if I create the arrays I need in the simple way then I end up with a huge patch size.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays</link><generator>RSS for Node</generator><lastBuildDate>Wed, 10 Jun 2026 16:19:03 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/10266.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 08 Aug 2016 07:31:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dynamically creating arrays on Mon, 08 Aug 2016 07:31:25 GMT]]></title><description><![CDATA[<p>Is there a way to create arrays from within a patch?<br />
I am making a sampler and if I create the arrays I need in the simple way then I end up with a huge patch size.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays</guid><dc:creator><![CDATA[nuromantix]]></dc:creator><pubDate>Mon, 08 Aug 2016 07:31:25 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamically creating arrays on Mon, 08 Aug 2016 07:44:38 GMT]]></title><description><![CDATA[<p>You can dynamically create an array with the commands written here <a href="http://forum.pdpatchrepo.info/topic/9055/change-the-style-with-message-points-polygon-bezier-curve/12">here</a>. Just send the message to the canvas instead of to an existing array, ie. using [namecanvas] or [iemguts/sendcanvas].</p>
<p>But are you sure you want to do this? It will almost certainly lead to audio dropouts, and there might be a simpler way of limiting your patch, ie. with array resizing.</p>
<p>If you are sure that array creation is what you want, you should consider using the [table] object instead of the GUI array. This functions the same as an array, but doesn't plot out the points on the canvas, saving a lot of CPU.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/2</guid><dc:creator><![CDATA[LiamG]]></dc:creator><pubDate>Mon, 08 Aug 2016 07:44:38 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamically creating arrays on Mon, 08 Aug 2016 08:08:19 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/nuromantix">@nuromantix</a> as <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/liamg">@LiamG</a> says......... [table]<br />
<a href="/uploads/files/1470643673735-put_array.pd">put_array.pd</a><br />
David.<br />
<img src="/uploads/files/1470643697388-put-array.jpg" alt="put array.JPG" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/3</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Mon, 08 Aug 2016 08:08:19 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamically creating arrays on Mon, 08 Aug 2016 16:14:21 GMT]]></title><description><![CDATA[<p>The FLOSS manual seems to refer to tables &amp; arrays interchangably.<br />
Are you saying a table behaves the same but uses less CPU?</p>
<p>Please can you point to info about array/table re-sizing?<br />
That would be great because I know how many arrays I want to have, I just don't want them to be huge arrays of zeroes. Better if I can have them tiny originally and then resize them when I load in samples.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/4</guid><dc:creator><![CDATA[nuromantix]]></dc:creator><pubDate>Mon, 08 Aug 2016 16:14:21 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamically creating arrays on Mon, 08 Aug 2016 17:02:22 GMT]]></title><description><![CDATA[<p>Yes, array and table are basically the same. You can read them both with [tabread] objects, and If you click on table, you will see its array in a sub-window. But unless the window is open, the array won't be drawn, so this saves on CPU.<br />
To resize you can simply send a message to the array &quot;resize $1&quot;. where $1 is the number of samples.<br />
Note that in the newer Vanilla releases there is also the [array define] object, which seems to replace [table]. I'm not really sure what the difference or the advantages are, so maybe someone else here can fill us in.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/5</guid><dc:creator><![CDATA[LiamG]]></dc:creator><pubDate>Mon, 08 Aug 2016 17:02:22 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamically creating arrays on Tue, 09 Aug 2016 07:06:08 GMT]]></title><description><![CDATA[<p>My Pure Data has options to put an ARRAY or a GRAPH. Is that the distinction you mean? Sorry if i am being thick.</p>
<p>Thanks for the resize info, that'll work brilliantly.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/6</guid><dc:creator><![CDATA[nuromantix]]></dc:creator><pubDate>Tue, 09 Aug 2016 07:06:08 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamically creating arrays on Tue, 09 Aug 2016 08:34:20 GMT]]></title><description><![CDATA[<p>&quot;graph&quot; is just a [pd] sub-patch with the Graph on Parent option turned on. This is like an empty container where you can put an array into (using the &quot;put array into last graph&quot; option) or anything else you want.</p>
<p>As far as I know, there are three (plus one) option for storing arrays:</p>
<ul>
<li>
<p>&quot;Array&quot; from the put menu. This stores the data in a graph, which you can draw manually.</p>
</li>
<li>
<p>the &quot;table&quot; object, ie. [table sound1]. This is basically an array but in a closed sub-patch, saving on CPU power as discussed earlier.</p>
</li>
<li>
<p>the new &quot;array&quot; object in Vanilla 0.45 and higher, ie. [array define myarray], distinct from the &quot;array&quot; in the put menu. This functions more like [table], but has the additional functionality of [array get], [array set], [array random] etc. (see the helpfile for information on this). Like table, if you click on [array define], you'll see the graph, but you won't have access to the familiar options (points, polygon, etc).</p>
</li>
</ul>
<p>All three of these objects can be written to and read from using the same tabread and tabwrite objects, and there's no difference between them that I know of in terms of playback. I think that the put menu &quot;array&quot; is the only one that will allow you to save the contents in the patch, though.</p>
<p>It might seem strange that there are three versions of roughly the same thing, but the explanation is probably that they were created at different times. Instead of replacing and updating old and obsolete objects, which tends to render old patches as incompatible, Miller likes to make new objects and leave the old ones in place.</p>
<p>The &quot;plus one&quot; method is to store arrays in data structures, but this is pointless for what you're doing because a: it's very difficult and b: these arrays can't be read and written to by tabread/write objects.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/7</guid><dc:creator><![CDATA[LiamG]]></dc:creator><pubDate>Tue, 09 Aug 2016 08:34:20 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamically creating arrays on Mon, 21 May 2018 17:44:59 GMT]]></title><description><![CDATA[<p>Posted to say thank you (it was the only post I found on the net) ,since I would have to create 64 arrays manually and <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/whale-av">@whale-av</a> patch saved me!<br />
I made another one creating arrays with the &quot;array define&quot; way <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
<p><a href="/uploads/files/1526924635927-dynarraycreator.pd">dynArrayCreator.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/8</guid><dc:creator><![CDATA[korakios]]></dc:creator><pubDate>Mon, 21 May 2018 17:44:59 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamically creating arrays on Mon, 21 May 2018 18:08:38 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/korakios">@korakios</a> I am very pleased that it helped..!<br />
I should have mentioned that using [count] to increment the x and y coordinates for each object you can lay the arrays out in a grid in the sub-patch as the names come in.......<br />
A bit like this....... nearly..... <a href="/uploads/files/1526926092850-build_channel_panels.pd">build_channel_panels.pd</a><br />
David.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/9</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Mon, 21 May 2018 18:08:38 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamically creating arrays on Tue, 22 May 2018 01:41:34 GMT]]></title><description><![CDATA[<p>And as it was discussed on the mailing list just recently, here is a method to create arrays containing $0 without it getting resolved to an actual number, so you can save the patch and it will still work after reopening:</p>
<p><a href="/uploads/files/1526949951201-create-arrays9.pd">create-arrays9.pd</a></p>
<p><img src="/uploads/files/1526950285924-screenshot-from-2018-05-22-02-50-58.png" alt="Screenshot from 2018-05-22 02-50-58.png" class="img-responsive img-markdown" /></p>
<p>In the patch included is also a simple method to distribute the created arrays into columns:</p>
<p><img src="/uploads/files/1526950441240-screenshot-from-2018-05-22-02-53-28.png" alt="Screenshot from 2018-05-22 02-53-28.png" class="img-responsive img-markdown" /><br />
The number in [mod] and [div] is the number of columns created. The factor 200 in this example sets the column width, the factor 23 sets the row height.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/10</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10266/dynamically-creating-arrays/10</guid><dc:creator><![CDATA[ingox]]></dc:creator><pubDate>Tue, 22 May 2018 01:41:34 GMT</pubDate></item></channel></rss>