<?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[how to limit DS array value range]]></title><description><![CDATA[<p>and once more a question on data structures... <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";-)" alt=";-)" /><br />
how can i limit the range of a field in an array? this here doesn't seem to work:<br />
<img src="/uploads/files/1582733923514-bildschirmfoto-vom-2020-02-26-16-40-01.png" alt="Bildschirmfoto vom 2020-02-26 16-40-01.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range</link><generator>RSS for Node</generator><lastBuildDate>Wed, 18 Nov 2026 07:38:15 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/12613.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Feb 2020 16:18:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to how to limit DS array value range on Wed, 26 Feb 2020 16:18:51 GMT]]></title><description><![CDATA[<p>and once more a question on data structures... <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";-)" alt=";-)" /><br />
how can i limit the range of a field in an array? this here doesn't seem to work:<br />
<img src="/uploads/files/1582733923514-bildschirmfoto-vom-2020-02-26-16-40-01.png" alt="Bildschirmfoto vom 2020-02-26 16-40-01.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range</guid><dc:creator><![CDATA[toxonic]]></dc:creator><pubDate>Wed, 26 Feb 2020 16:18:51 GMT</pubDate></item><item><title><![CDATA[Reply to how to limit DS array value range on Wed, 26 Feb 2020 18:01:34 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/toxonic">@toxonic</a> DS stuff : <a href="http://www.pd-tutorial.com/english/ch05s02.html" rel="nofollow">http://www.pd-tutorial.com/english/ch05s02.html</a> maybe it will help.</p>
<p><img src="/uploads/files/1582740091369-sm1.png" alt="SM1.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/2</guid><dc:creator><![CDATA[Boran Robert]]></dc:creator><pubDate>Wed, 26 Feb 2020 18:01:34 GMT</pubDate></item><item><title><![CDATA[Reply to how to limit DS array value range on Wed, 26 Feb 2020 18:48:08 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/boran-robert">@Boran-Robert</a> thanks, but unfortunately it doesn't! <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";-)" alt=";-)" /> i already checked that, there's not much about arrays...  indeed this was the first document i read regarding DS, because it's also pubished in my native language (german). anyway, thanks for your reply.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/3</guid><dc:creator><![CDATA[toxonic]]></dc:creator><pubDate>Wed, 26 Feb 2020 18:48:08 GMT</pubDate></item><item><title><![CDATA[Reply to how to limit DS array value range on Wed, 26 Feb 2020 19:53:38 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/toxonic">@toxonic</a> See this example by <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/balwyn">@Balwyn</a>: <a href="https://forum.pdpatchrepo.info/topic/10709/getting-the-output-from-a-struct-element-i-think-i-m-getting-close" rel="nofollow">https://forum.pdpatchrepo.info/topic/10709/getting-the-output-from-a-struct-element-i-think-i-m-getting-close</a></p>
<p>But a major drawback is that you cannot determine which field is modified by looking at the output of the structs. You can only get the pointer to the array, but also get some buggy results sometimes.</p>
<p>Here is another example that doesn't use array because of that: <a href="https://forum.pdpatchrepo.info/topic/10806/64-struct-sliders-no-mouse-external" rel="nofollow">https://forum.pdpatchrepo.info/topic/10806/64-struct-sliders-no-mouse-external</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/4</guid><dc:creator><![CDATA[ingox]]></dc:creator><pubDate>Wed, 26 Feb 2020 19:53:38 GMT</pubDate></item><item><title><![CDATA[Reply to how to limit DS array value range on Wed, 26 Feb 2020 21:13:38 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ingox">@ingox</a> yeah, but that's what i've been looking for - i didn't think of using plot for limiting the values. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";-)" alt=";-)" /> in this case, i don't need the index of the modified array element, because the values will triggered by a sequencer, that just iterates through the array. i store all the values at once with a combo of [array get] / [array set].<br />
what i still find unsatisfying is, that i don't get it to work, that the values get stored in a hidden table, that saves the contents with the patch, right <strong>after</strong> i changed a value. at the moment, i use [mousestate], wich let's me store the values, just when i release the mousebutton. i'd love to get this in vanilla, but it seems that the data structures only give me click events, but not when the mousebutton is released. but ok, thats  off topic now.... <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";-)" alt=";-)" /> if someone knows a good workaround though, don't hesitate to reply! <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";-)" alt=";-)" /> however, thank you very much! <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/12613/how-to-limit-ds-array-value-range/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/5</guid><dc:creator><![CDATA[toxonic]]></dc:creator><pubDate>Wed, 26 Feb 2020 21:13:38 GMT</pubDate></item><item><title><![CDATA[Reply to how to limit DS array value range on Wed, 26 Feb 2020 21:52:15 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/toxonic">@toxonic</a> Not &quot;true&quot; vanilla I suppose...... but you can get a mouse up event with a plugin........ <a href="/uploads/files/1582753503371-mouseup.zip">mouseup.zip</a><br />
David.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/6</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Wed, 26 Feb 2020 21:52:15 GMT</pubDate></item><item><title><![CDATA[Reply to how to limit DS array value range on Wed, 26 Feb 2020 22:03:34 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/whale-av">@whale-av</a> hey, that's quite nice! <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":-)" alt=":-)" /> i got an error message, although it seems to work though.</p>
<pre><code class="lang------------">UNHANDLED ERROR: extra characters after close-quote
    while executing
&quot;pdtk_post &quot;loaded: experimental mouse plugin
&quot;`&quot;
    (&quot;uplevel&quot; body line 17)
    invoked from within
&quot;uplevel #0 $tclcode&quot;
FAILED TO LOAD /home/toxonic/.local/lib/pd/extra/focused_mouse-plugin.tcl
-----------
</code></pre>
<p>EDIT: found the buck, there were some &quot; ``` &quot; signs at the end of the code.</p>
<p>after restarting pd (not the patch) it spits out a lot of error messages,: mouse recieve: no such object..<br />
anyway, thanks for the idea! <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/12613/how-to-limit-ds-array-value-range/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/7</guid><dc:creator><![CDATA[toxonic]]></dc:creator><pubDate>Wed, 26 Feb 2020 22:03:34 GMT</pubDate></item><item><title><![CDATA[Reply to how to limit DS array value range on Wed, 26 Feb 2020 22:41:48 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/toxonic">@toxonic</a> If you just need a mouse up &quot;bang&quot; then you can delete the other lines and so reduce the error messages...... to mouse up events only.<br />
David.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/8</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Wed, 26 Feb 2020 22:41:48 GMT</pubDate></item><item><title><![CDATA[Reply to how to limit DS array value range on Wed, 26 Feb 2020 23:01:21 GMT]]></title><description><![CDATA[<p>the problem also for me with the mouse plugin is, that you always need the [mouse receive] object in your patch if you want no error message. i think the best vanilla solution for getting mouse coordinates is this <a href="https://forum.pdpatchrepo.info/topic/10854/xy-abstraction-to-get-mouse-click-and-drag-coordinates-vanilla" rel="nofollow">https://forum.pdpatchrepo.info/topic/10854/xy-abstraction-to-get-mouse-click-and-drag-coordinates-vanilla</a>, but there is still a lot going on just for getting the mouse coordinates. an easy way to get mouse coordinates and a resizable drag area would be a nice addition to the data structure functionality (not sure if that would be possible...). yes, in some aspects they are unsatisfying <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/12613/how-to-limit-ds-array-value-range/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/9</guid><dc:creator><![CDATA[Jona]]></dc:creator><pubDate>Wed, 26 Feb 2020 23:01:21 GMT</pubDate></item><item><title><![CDATA[Reply to how to limit DS array value range on Wed, 26 Feb 2020 23:29:10 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/toxonic">@toxonic</a> Yes, mouseup is not possible in vanilla. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/disappointed.png" title="disappointed" alt=":disappointed:" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/10</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/10</guid><dc:creator><![CDATA[ingox]]></dc:creator><pubDate>Wed, 26 Feb 2020 23:29:10 GMT</pubDate></item><item><title><![CDATA[Reply to how to limit DS array value range on Thu, 27 Feb 2020 04:58:47 GMT]]></title><description><![CDATA[<p>There is this method using [r pd] and [route ping] to detect changes in the array described by <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/whale-av">@whale-av</a> in this thread: <a href="https://forum.pdpatchrepo.info/topic/10709/getting-the-output-from-a-struct-element-i-think-i-m-getting-close/14" rel="nofollow">https://forum.pdpatchrepo.info/topic/10709/getting-the-output-from-a-struct-element-i-think-i-m-getting-close/14</a>, but it is not 100% reliable if i recall correctly. It is some kind of signalling between Pd and the GUI, but as they are processed somewhat independently, Pd does not get an event on every GUI change.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/11</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/11</guid><dc:creator><![CDATA[ingox]]></dc:creator><pubDate>Thu, 27 Feb 2020 04:58:47 GMT</pubDate></item><item><title><![CDATA[Reply to how to limit DS array value range on Thu, 27 Feb 2020 08:05:50 GMT]]></title><description><![CDATA[<p>By the way, i found a method to make the mouse plugin at least work without error messages: <a href="/uploads/files/1582790282691-mouse-plugin.tcl">mouse-plugin.tcl</a> <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
<p>This creates a hidden file that contains a [r mouse_receive], opens it in the background and deletes the hidden file. This way there are no error messages, because there is always a receive present. It is still unclear how to determine the correct window from the focused window code. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" /></p>
<p>Usage: Put the mouse-plugin.tcl in the extra directory, restart Pd, open a patch, create a [r mouse_receive] and connect it to a [print]. You can now see mouse movements and mouse up and down events.</p>
<p>Maybe this can be improved if a method like &quot;ifexist&quot; exists. <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/12613/how-to-limit-ds-array-value-range/12</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/12</guid><dc:creator><![CDATA[ingox]]></dc:creator><pubDate>Thu, 27 Feb 2020 08:05:50 GMT</pubDate></item><item><title><![CDATA[Reply to how to limit DS array value range on Thu, 27 Feb 2020 12:09:16 GMT]]></title><description><![CDATA[<p>I came up with this a few years ago, using plot and a [line] as a bang firing delay to update the array, not ideal, but an interesting vanilla option. It peters out when the [line] has completed requiring another click.<br />
<a href="/uploads/files/1582804524686-slider-line-2.pd">slider-line-2.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/13</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/13</guid><dc:creator><![CDATA[Balwyn]]></dc:creator><pubDate>Thu, 27 Feb 2020 12:09:16 GMT</pubDate></item><item><title><![CDATA[Reply to how to limit DS array value range on Thu, 27 Feb 2020 18:56:47 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ingox">@ingox</a> <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jona">@Jona</a> <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/whale-av">@whale-av</a> <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/balwyn">@Balwyn</a>  People, you are really amazing! <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":-)" alt=":-)" /> All these hints are very useful! in this particular case, <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ingox">@ingox</a> / <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/whale-av">@whale-av</a> 's tip regarding [receive pd] is a solution, which works pretty well and makes [mousestate] unnecessary! however, a big thanks to each of you! <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/12613/how-to-limit-ds-array-value-range/14</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/12613/how-to-limit-ds-array-value-range/14</guid><dc:creator><![CDATA[toxonic]]></dc:creator><pubDate>Thu, 27 Feb 2020 18:56:47 GMT</pubDate></item></channel></rss>