<?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[Conditional Bang]]></title><description><![CDATA[<p>Hello everybody,</p>
<p>I was wondering whether anybody knew of a good way to hold off a bang until the right conditions have been met.</p>
<p>It's kind of hard to explain, but essentially I have a looping patch. The loop repeats over and over again until a random parameter tells it to stop looping. The problem? The bang that stops the loop doesn't consider where it is stopping in the sample. So I have a tablplay~ that is looping, and suddenly it stops and pops/clicks right in the middle of it. The goal is to create a kind of check that only sends a bang when the sample is done playing.</p>
<p>When a bang is sent at the end of the tabplay~, check whether the spigot object has been opened. If it has, pass through the bang, and stop the playback. If not, WAIT until it has opened, and THEN pass it through. Does anybody have a good idea of doing this?</p>
<p>This is a simplified version of the looper subpatch. Notice a couple of things.</p>
<ol>
<li>Select objects sends a 1 which starts the loop</li>
<li>The delay object delays the bang from the end of the tabplay to start the loop all over again (it increases over time actually)</li>
<li>Select object sends a 0 (at some random point (we don't know when)) but the bang will go through only when the spigot is open. So the sample needs to have stopped playing when this happens.</li>
</ol>
<p>The tricky part about all of this is that the looper needs to stop IN BETWEEN the start of the next loop, and the end of the sample.</p>
<p>Help would be tremendously appreciated.</p>
<p><img src="/uploads/files/1471407706458-screenshot-2016-08-16-23.18.45.png" alt="Screenshot 2016-08-16 23.18.45.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10278/conditional-bang</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 07:41:58 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/10278.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 17 Aug 2016 04:33:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Conditional Bang on Wed, 17 Aug 2016 04:33:51 GMT]]></title><description><![CDATA[<p>Hello everybody,</p>
<p>I was wondering whether anybody knew of a good way to hold off a bang until the right conditions have been met.</p>
<p>It's kind of hard to explain, but essentially I have a looping patch. The loop repeats over and over again until a random parameter tells it to stop looping. The problem? The bang that stops the loop doesn't consider where it is stopping in the sample. So I have a tablplay~ that is looping, and suddenly it stops and pops/clicks right in the middle of it. The goal is to create a kind of check that only sends a bang when the sample is done playing.</p>
<p>When a bang is sent at the end of the tabplay~, check whether the spigot object has been opened. If it has, pass through the bang, and stop the playback. If not, WAIT until it has opened, and THEN pass it through. Does anybody have a good idea of doing this?</p>
<p>This is a simplified version of the looper subpatch. Notice a couple of things.</p>
<ol>
<li>Select objects sends a 1 which starts the loop</li>
<li>The delay object delays the bang from the end of the tabplay to start the loop all over again (it increases over time actually)</li>
<li>Select object sends a 0 (at some random point (we don't know when)) but the bang will go through only when the spigot is open. So the sample needs to have stopped playing when this happens.</li>
</ol>
<p>The tricky part about all of this is that the looper needs to stop IN BETWEEN the start of the next loop, and the end of the sample.</p>
<p>Help would be tremendously appreciated.</p>
<p><img src="/uploads/files/1471407706458-screenshot-2016-08-16-23.18.45.png" alt="Screenshot 2016-08-16 23.18.45.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10278/conditional-bang</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10278/conditional-bang</guid><dc:creator><![CDATA[Maks]]></dc:creator><pubDate>Wed, 17 Aug 2016 04:33:51 GMT</pubDate></item><item><title><![CDATA[Reply to Conditional Bang on Wed, 17 Aug 2016 04:47:43 GMT]]></title><description><![CDATA[<p>Does this help?</p>
<p><img src="/uploads/files/1471409229301-stop.png" alt="stop.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10278/conditional-bang/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10278/conditional-bang/2</guid><dc:creator><![CDATA[LiamG]]></dc:creator><pubDate>Wed, 17 Aug 2016 04:47:43 GMT</pubDate></item><item><title><![CDATA[Reply to Conditional Bang on Wed, 17 Aug 2016 04:54:34 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/liamg">@LiamG</a> The thing is that the tabplay~ is looping indefinitely. If I'm looking at what you wrote correctly, that would stop the playback only after one loop. The looper needs to be ready to stop at any second whenever the indefinite stop bang is sent out.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10278/conditional-bang/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10278/conditional-bang/3</guid><dc:creator><![CDATA[Maks]]></dc:creator><pubDate>Wed, 17 Aug 2016 04:54:34 GMT</pubDate></item><item><title><![CDATA[Reply to Conditional Bang on Wed, 17 Aug 2016 05:05:45 GMT]]></title><description><![CDATA[<p>It looks like I don't fully understand what you're aiming for. I do think though that using the [f] and [sel] objects will help you to get conditional logic right, as this is a way of &quot;checking whether the spigot has been opened&quot;.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10278/conditional-bang/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10278/conditional-bang/4</guid><dc:creator><![CDATA[LiamG]]></dc:creator><pubDate>Wed, 17 Aug 2016 05:05:45 GMT</pubDate></item><item><title><![CDATA[Reply to Conditional Bang on Wed, 17 Aug 2016 05:13:07 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/liamg">@LiamG</a> No worries. Simply put, I'm trying to avoid popping and clicking. In my case, it happens when the loop is randomly told to stop playing without verifying that the playback is complete. So I somehow have to find a way to make sure that looping ends only when the playback ends without knowing when the stop looping message arrives. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
<p>I've been banging my head against the wall for a while about this. I may just come back to it tomorrow. I think you have a point though that the select and float objects will probably come in handy.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10278/conditional-bang/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10278/conditional-bang/5</guid><dc:creator><![CDATA[Maks]]></dc:creator><pubDate>Wed, 17 Aug 2016 05:13:07 GMT</pubDate></item><item><title><![CDATA[Reply to Conditional Bang on Wed, 17 Aug 2016 05:18:17 GMT]]></title><description><![CDATA[<p>@lunacyfringe said:</p>
<blockquote>
<p>I somehow have to find a way to make sure that looping ends only when the playback ends without knowing when the stop looping message arrives. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
</blockquote>
<p>If that's the case then I think the construction I posted should help. Just connect the second outlet of [sel 1] back into tabplay~ (I forgot to do this in the picture). That way, each time the sample ends, it will either restart the tabplay~ object (0--&gt;bang) or stop it (1--&gt;stop)</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10278/conditional-bang/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10278/conditional-bang/6</guid><dc:creator><![CDATA[LiamG]]></dc:creator><pubDate>Wed, 17 Aug 2016 05:18:17 GMT</pubDate></item><item><title><![CDATA[Reply to Conditional Bang on Wed, 17 Aug 2016 10:04:41 GMT]]></title><description><![CDATA[<p>@lunacyfringe and <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/liamg">@LiamG</a> You can use a spigot if you wish...... no capture and storage of the bang is necessary because [tabplay~] kindly provides the bang when it has finished playing.......<br />
If you do want to immediately stop the sample without clicks then you can use [line~]........ but..... you were nearly there with your patch....... the problem you had was that the bang to fade out was immediately followed by a bang to stop.  You needed a delay of say [delay 6] in the string before the stop message so as to allow the fade out to complete before the stop!<br />
<img src="/uploads/files/1471417091314-capture.jpg" alt="Capture.JPG" class="img-responsive img-markdown" /><br />
David.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10278/conditional-bang/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10278/conditional-bang/7</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Wed, 17 Aug 2016 10:04:41 GMT</pubDate></item><item><title><![CDATA[Reply to Conditional Bang on Wed, 17 Aug 2016 06:56:35 GMT]]></title><description><![CDATA[<p>Oh yeah, of course that's simpler!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10278/conditional-bang/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10278/conditional-bang/8</guid><dc:creator><![CDATA[LiamG]]></dc:creator><pubDate>Wed, 17 Aug 2016 06:56:35 GMT</pubDate></item></channel></rss>