<?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[Help with porting example patch to be an abstraction]]></title><description><![CDATA[<p>Help with abstraction.</p>
<p>I'm trying to adapt the shepard tone example so that I can run two of them at once with different parameters.  <img src="/uploads/files/1642301983106-problem.png" alt="problem.png" class="img-responsive img-markdown" /> .</p>
<p>The issue I'm having is naming things to convert the patch to an abstraction.  You can see the highlights where I've moved <code>pitch+</code> to <code>$0-pitch</code>, and where <code>dropoff+</code> remains the same.  Where I keep the name as per the original everything works fine.  Once I move the variable names to <code>$0-pitch</code> the slider functionality is no longer there.</p>
<p>Any idea what I've missed or misunderstood here?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13782/help-with-porting-example-patch-to-be-an-abstraction</link><generator>RSS for Node</generator><lastBuildDate>Fri, 11 Sep 2026 05:37:57 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/13782.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 16 Jan 2022 03:04:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Help with porting example patch to be an abstraction on Sun, 16 Jan 2022 03:04:35 GMT]]></title><description><![CDATA[<p>Help with abstraction.</p>
<p>I'm trying to adapt the shepard tone example so that I can run two of them at once with different parameters.  <img src="/uploads/files/1642301983106-problem.png" alt="problem.png" class="img-responsive img-markdown" /> .</p>
<p>The issue I'm having is naming things to convert the patch to an abstraction.  You can see the highlights where I've moved <code>pitch+</code> to <code>$0-pitch</code>, and where <code>dropoff+</code> remains the same.  Where I keep the name as per the original everything works fine.  Once I move the variable names to <code>$0-pitch</code> the slider functionality is no longer there.</p>
<p>Any idea what I've missed or misunderstood here?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13782/help-with-porting-example-patch-to-be-an-abstraction</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13782/help-with-porting-example-patch-to-be-an-abstraction</guid><dc:creator><![CDATA[dr_kd]]></dc:creator><pubDate>Sun, 16 Jan 2022 03:04:35 GMT</pubDate></item><item><title><![CDATA[Reply to Help with porting example patch to be an abstraction on Sun, 16 Jan 2022 03:53:41 GMT]]></title><description><![CDATA[<p>The value of $0 is relative to the patch/abstraction. As [shepvoice] is an abstraction, $0 will have a different value in each instance. A way of circumventing this is to pass $0 in the abstractions arguments and invoking it inside the abstraction as $2 (or whichever # argument you reserve for it). Concrete example: [shepvoice 500 $0] and inside [shepvoice]: [r $2-pitch], [r $2-dropoff] etc</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13782/help-with-porting-example-patch-to-be-an-abstraction/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13782/help-with-porting-example-patch-to-be-an-abstraction/2</guid><dc:creator><![CDATA[bocanegra]]></dc:creator><pubDate>Sun, 16 Jan 2022 03:53:41 GMT</pubDate></item><item><title><![CDATA[Reply to Help with porting example patch to be an abstraction on Sun, 16 Jan 2022 08:21:03 GMT]]></title><description><![CDATA[<p>well that makes total sense (i.e. I can see how $-\d+ expands to a memory address or something, and your explanation makes complete sense.   I'll report back once I've given it a try.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13782/help-with-porting-example-patch-to-be-an-abstraction/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13782/help-with-porting-example-patch-to-be-an-abstraction/3</guid><dc:creator><![CDATA[dr_kd]]></dc:creator><pubDate>Sun, 16 Jan 2022 08:21:03 GMT</pubDate></item><item><title><![CDATA[Reply to Help with porting example patch to be an abstraction on Sun, 16 Jan 2022 22:44:28 GMT]]></title><description><![CDATA[<p>Thank you, worked beautifully.  For the future reference below is how the patch looks now.   Next up will be throwing around some LFOs for maximum weirdness.</p>
<p>I think this is because $0 is a pseudo argument that represents something like the memory address of the current abstraction.</p>
<p><img src="/uploads/files/1642372912720-fixed.png" alt="fixed.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13782/help-with-porting-example-patch-to-be-an-abstraction/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13782/help-with-porting-example-patch-to-be-an-abstraction/4</guid><dc:creator><![CDATA[dr_kd]]></dc:creator><pubDate>Sun, 16 Jan 2022 22:44:28 GMT</pubDate></item><item><title><![CDATA[Reply to Help with porting example patch to be an abstraction on Mon, 17 Jan 2022 07:17:15 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/dr_kd">@dr_kd</a> $0 is a real argument assigned to every patch according to the order in which they are created.... so from a fresh start of Pd the first patch opened will have 1001 assigned to $0.<br />
You can find its value for a patch by banging a [$0] object into a number box.<br />
The next patch opened will have a $0 value of 1002......... and each abstraction put in a patch is also a patch....<br />
A sub-patch will have the same value as its mother.<br />
The actual value is of little interest as it can change (for a particular patch) depending on the order in which patches are opened..... so we cannot rely on it.... but $0 is an important variable for building abstractions.<br />
David.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13782/help-with-porting-example-patch-to-be-an-abstraction/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13782/help-with-porting-example-patch-to-be-an-abstraction/5</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Mon, 17 Jan 2022 07:17:15 GMT</pubDate></item></channel></rss>