<?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[Using array (to store time of events)]]></title><description><![CDATA[<p>Hi,</p>
<p>I need to detect and store time between user input (and probably the input value as well). I would like to be able to store say the last 10 events.</p>
<p>I figure I should use an array that I can then shift the values in, pushing the oldest ones out when new ones come in.</p>
<p>Could someone please show me a good and simple way on how to start experimenting with this?</p>
<p>The purpose is to detect simple patterns in user input and use it as a trigger for things.</p>
<p><img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
<p>Thanks!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events</link><generator>RSS for Node</generator><lastBuildDate>Tue, 19 May 2026 18:37:27 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/12166.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 14 Jul 2019 16:12:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using array (to store time of events) on Sun, 14 Jul 2019 16:12:35 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>I need to detect and store time between user input (and probably the input value as well). I would like to be able to store say the last 10 events.</p>
<p>I figure I should use an array that I can then shift the values in, pushing the oldest ones out when new ones come in.</p>
<p>Could someone please show me a good and simple way on how to start experimenting with this?</p>
<p>The purpose is to detect simple patterns in user input and use it as a trigger for things.</p>
<p><img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
<p>Thanks!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events</guid><dc:creator><![CDATA[cfry]]></dc:creator><pubDate>Sun, 14 Jul 2019 16:12:35 GMT</pubDate></item><item><title><![CDATA[Reply to Using array (to store time of events) on Sun, 14 Jul 2019 16:32:48 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/cfry">@cfry</a> As far as I know there is no easy way to shift the whole array so it might be easier to just build a list:<img src="/uploads/files/1563121887445-screenshot-2019-07-14-at-18.29.51.png" alt="Screenshot 2019-07-14 at 18.29.51.png" class="img-responsive img-markdown" /></p>
<p><a href="/uploads/files/1563121912732-list_building.pd">list_building.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/2</guid><dc:creator><![CDATA[weightless]]></dc:creator><pubDate>Sun, 14 Jul 2019 16:32:48 GMT</pubDate></item><item><title><![CDATA[Reply to Using array (to store time of events) on Mon, 15 Jul 2019 02:04:36 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/cfry">@cfry</a> why do you need to shift the array? just use it as a circular buffer, have a cyclical counter (using <code>[mod]</code> or <code>[% ]</code>) to keep track of the current position (last input) and for each input increment the modulo counter and store the input there</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/3</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Mon, 15 Jul 2019 02:04:36 GMT</pubDate></item><item><title><![CDATA[Reply to Using array (to store time of events) on Tue, 16 Jul 2019 15:17:38 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/cfry">@cfry</a> I made this queue abstraction that can possibly do what you want to achieve: <a href="https://forum.pdpatchrepo.info/topic/12170/queue-a-universal-first-in-first-out-fifo-queue-that-takes-symbols-floats-and-lists-vanilla" rel="nofollow">https://forum.pdpatchrepo.info/topic/12170/queue-a-universal-first-in-first-out-fifo-queue-that-takes-symbols-floats-and-lists-vanilla</a> <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/4</guid><dc:creator><![CDATA[ingox]]></dc:creator><pubDate>Tue, 16 Jul 2019 15:17:38 GMT</pubDate></item><item><title><![CDATA[Reply to Using array (to store time of events) on Wed, 17 Jul 2019 10:46:38 GMT]]></title><description><![CDATA[<p>Hey, thanks for the input! Still have not got hold of my computer to test all of this out. Hopefully in a few days.</p>
<p>Slightly off topic: what would be a good (online) text recourse for understanding lists and arrays in puredata, apart from the Floss manual?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/5</guid><dc:creator><![CDATA[cfry]]></dc:creator><pubDate>Wed, 17 Jul 2019 10:46:38 GMT</pubDate></item><item><title><![CDATA[Reply to Using array (to store time of events) on Thu, 18 Jul 2019 10:49:22 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/cfry">@cfry</a> I'm not aware of any other that explains it as well as the FLOSS manual. Once you have the basics from that, I suggest you look at the help files for [list] and [array] to get to know all the new objects and what they do. The List-abs library also has lots of helpful abstractions to do operations on lists.</p>
<p>Sorry, you probably know all this already. Is there something in particular you don't understand that the manual doesn't cover?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/6</guid><dc:creator><![CDATA[weightless]]></dc:creator><pubDate>Thu, 18 Jul 2019 10:49:22 GMT</pubDate></item><item><title><![CDATA[Reply to Using array (to store time of events) on Fri, 19 Jul 2019 17:15:12 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/weightless">@weightless</a> I ask mainly because I would prefer to be able to read from my android phone while on the move, and because the &quot;math&quot; entry in the Floss manual return an error message only. But I am sure the best way to learn is to use the help files in pd, if you have access to it.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/7</guid><dc:creator><![CDATA[cfry]]></dc:creator><pubDate>Fri, 19 Jul 2019 17:15:12 GMT</pubDate></item><item><title><![CDATA[Reply to Using array (to store time of events) on Fri, 19 Jul 2019 19:38:12 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/cfry">@cfry</a> The math section of the FLOSS manual was broken for some time, this seems to work: <a href="https://en.flossmanuals.net/pure-data/_full/#math_1" rel="nofollow">https://en.flossmanuals.net/pure-data/_full/#math_1</a>. Note that this information is very old and newer objects are not covert. Here are the help files the only good source i know.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/8</guid><dc:creator><![CDATA[ingox]]></dc:creator><pubDate>Fri, 19 Jul 2019 19:38:12 GMT</pubDate></item><item><title><![CDATA[Reply to Using array (to store time of events) on Thu, 01 Aug 2019 14:05:33 GMT]]></title><description><![CDATA[<p>Hey! Back online. Now I have looked at <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/weightless">@weightless</a> list_building.pd, the <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ingox">@ingox</a> fifo patch and also tried to build an array version myself as per the suggestion of <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/seb-harmonik-ar">@seb-harmonik.ar</a> (but it got quite &quot;bloaty&quot;). Thanks!</p>
<p>I suspect that the list_building.pd patch could be the best way to go since I really only need to store  a few values (six entries in total). I do not need any graphical representation so using (Pd) arrays may be a waste of resources. It is also very good to make it simple and from scratch so I have total understanding on what is happening inside.</p>
<p>I edited the list_building.pd patch as such:</p>
<p><img src="/uploads/files/1564667856322-ska-rmavbild-2019-08-01-kl.15.54.51.png" alt="Skärmavbild 2019-08-01 kl. 15.54.51.png" class="img-responsive img-markdown" /></p>
<p><a href="/uploads/files/1564667891229-syzygy_list_test.pd">syzygy_list_test.pd</a></p>
<p>How do I access the entries in the list individually, &quot;index style&quot;?</p>
<p>I am really thankful for your help and patience with noob questions! <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/9</guid><dc:creator><![CDATA[cfry]]></dc:creator><pubDate>Thu, 01 Aug 2019 14:05:33 GMT</pubDate></item><item><title><![CDATA[Reply to Using array (to store time of events) on Thu, 01 Aug 2019 19:42:34 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/cfry">@cfry</a> <a href="/uploads/files/1564670254805-list-seek.zip">list-seek.zip</a><br />
Although in vanilla you could use [list store]</p>
<p><img src="/uploads/files/1564688550246-capture.jpg" alt="Capture.JPG" class="img-responsive img-markdown" /><br />
David.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/10</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/10</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Thu, 01 Aug 2019 19:42:34 GMT</pubDate></item><item><title><![CDATA[Reply to Using array (to store time of events) on Wed, 07 Aug 2019 09:57:50 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/whale-av">@whale-av</a> Thanks a lot David, that sent me in the right direction. I used [unpack f f f] then it eventually worked.</p>
<p>This is going live, as a part of a bigger patch, in a few days. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
<p>Best regards,</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/11</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12166/using-array-to-store-time-of-events/11</guid><dc:creator><![CDATA[cfry]]></dc:creator><pubDate>Wed, 07 Aug 2019 09:57:50 GMT</pubDate></item></channel></rss>