<?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[Adding a custom dynamic variable to abstraction name, is this possible?]]></title><description><![CDATA[<p>Hi again! Apologies if this is answered elsewhere (or perhaps very obvious), but I am aware that you can pass on a $0 variable to an abstraction by naming it 'abstraction $0', and also you can pass on static variables in its name also (eg 'abstraction foo bar'), but is it possible to create a separate dynamic variable that could be definied somehow in the parent patch?</p>
<p>So the abstraction name would be 'abstraction $0 $1 $2'), and I could definie $1 and $2 somewhere else, per patch. This would be incredibly handy, as I want to dynamically reference OSC message in Open Stage Control, and want to reuse the same abstraction for mapping (rather than tediously incrementing the number for the next fader etc). Have had a try this morning but cannot seem to make this work!</p>
<p>This forum has been massively helpful and friendly, so I am hoping someone can help out again thanks!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible</link><generator>RSS for Node</generator><lastBuildDate>Wed, 12 Aug 2026 05:20:40 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/15086.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 10 Apr 2025 08:46:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Adding a custom dynamic variable to abstraction name, is this possible? on Thu, 10 Apr 2025 08:46:16 GMT]]></title><description><![CDATA[<p>Hi again! Apologies if this is answered elsewhere (or perhaps very obvious), but I am aware that you can pass on a $0 variable to an abstraction by naming it 'abstraction $0', and also you can pass on static variables in its name also (eg 'abstraction foo bar'), but is it possible to create a separate dynamic variable that could be definied somehow in the parent patch?</p>
<p>So the abstraction name would be 'abstraction $0 $1 $2'), and I could definie $1 and $2 somewhere else, per patch. This would be incredibly handy, as I want to dynamically reference OSC message in Open Stage Control, and want to reuse the same abstraction for mapping (rather than tediously incrementing the number for the next fader etc). Have had a try this morning but cannot seem to make this work!</p>
<p>This forum has been massively helpful and friendly, so I am hoping someone can help out again thanks!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible</guid><dc:creator><![CDATA[RT5000]]></dc:creator><pubDate>Thu, 10 Apr 2025 08:46:16 GMT</pubDate></item><item><title><![CDATA[Reply to Adding a custom dynamic variable to abstraction name, is this possible? on Thu, 10 Apr 2025 09:48:08 GMT]]></title><description><![CDATA[<p>Maybe [receive $1] inside the abstraction. Or [value $1]. Or both (to get the value when abstraction is loaded and new value is sent).</p>
<pre><code>[123\ 
|
[s $0-a]


[abstraction $0 a]

[r $1-$2]
|
[print]

[loadbang]
|
[v $1-$2]
|
[print]
</code></pre>
]]></description><link>http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/2</guid><dc:creator><![CDATA[lacuna]]></dc:creator><pubDate>Thu, 10 Apr 2025 09:48:08 GMT</pubDate></item><item><title><![CDATA[Reply to Adding a custom dynamic variable to abstraction name, is this possible? on Thu, 10 Apr 2025 09:49:14 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/rt5000">@RT5000</a> $ variables are translated as a patch opens, so the &quot;mother patch&quot; arguments will be translated to $ variables for abstractions.<br />
Which means that you need a &quot;super mother patch&quot; that opens the &quot;mother patch&quot; with all the variables that you will want to use for the abstractions.<br />
You could otherwise use a counter and dynamic patching to create the abstractions with an incremented argument (or more) like this.... <a href="/uploads/files/1744278460985-dynamic.zip">dynamic.zip</a><br />
David.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/3</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Thu, 10 Apr 2025 09:49:14 GMT</pubDate></item><item><title><![CDATA[Reply to Adding a custom dynamic variable to abstraction name, is this possible? on Thu, 10 Apr 2025 10:30:38 GMT]]></title><description><![CDATA[<p>Ah, that makes sense with the mother patch (and the fact the variables need to be created at load time). I am maybe approaching my problem from the wrong angle in that case. I have a simple abstraction that will receive an OSC message from Open Stage Control, and I want to reuse this over and over, so currently adding the OSC address as a static variable in the abstraction name and that works really well.</p>
<p>As I am trying to create a sort of modular in pure data, I wondered if I have two identical for example 'envelope' abstractions (with controls pre-mapped to OSC), then it would be fantastic to make the OSC addresses dynamic (so /EnvAtt_1 could be /EnvAtt_$3), and I could have a floatbox define the $3 on each copy of the envelope abstraction.</p>
<p>So inside my OSC control I have declared the OSC address in its title and then use this in a receive, but the issue is declaring a dynamic variable in a receive path (that is not from the abstraction name), so 'r EnvAtt_$3' for example. Can you declare a variable for a receive any other way?</p>
<p>Sorry for the convoluted reply, and thanks again for helping, much appreciated!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/4</guid><dc:creator><![CDATA[RT5000]]></dc:creator><pubDate>Thu, 10 Apr 2025 10:30:38 GMT</pubDate></item><item><title><![CDATA[Reply to Adding a custom dynamic variable to abstraction name, is this possible? on Thu, 10 Apr 2025 13:20:02 GMT]]></title><description><![CDATA[<p>I don't really understand your question. Maybe share a patch or screenshot to make it clear.<br />
Don't know much about OSC, but I guess you are routing the incoming messages, don't you? So you could just route another name/adress?<br />
Threre are many ways to archive things, in some cases dynamic patching is the only way, but this sounds like it maybe could be done easier.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/5</guid><dc:creator><![CDATA[lacuna]]></dc:creator><pubDate>Thu, 10 Apr 2025 13:20:02 GMT</pubDate></item><item><title><![CDATA[Reply to Adding a custom dynamic variable to abstraction name, is this possible? on Thu, 10 Apr 2025 14:49:47 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/rt5000">@RT5000</a> Any object (all objects) can have a $ variable as one of its arguments.... you don't need to use a [float] to define it.... it will be translated as the abstraction is opened.<br />
So you can use $ variables as part of a symbol in the OSC address.... [oscformat /EnvATT_$3] will become [oscformat /EnvAtt_1] if the value of $3 for the abstraction is &quot;1&quot;.<br />
A $ variable in a message acts differently.... taking its value from an incoming message.</p>
<p>GUI's can be told to change their send and receive addresses by sending them a message, so they can be dynamically changed within an abstraction.<br />
And those addresses can contain $ variables anyway.<br />
The same for e.g. [send message_$1] because it is an object.</p>
<p>[route] and [select] can also be changed (for a single argument) through their right inlet.... but again... they are objets so you could put a [route $3 $1 $2] if you wish.<br />
So you do have a few options.</p>
<p>Knowing that it is not easy, I had a go at explaining this a while ago...<br />
<a href="https://forum.pdpatchrepo.info/topic/9774/pure-data-noob/4" rel="nofollow">https://forum.pdpatchrepo.info/topic/9774/pure-data-noob/4</a><br />
David.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/6</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Thu, 10 Apr 2025 14:49:47 GMT</pubDate></item><item><title><![CDATA[Reply to Adding a custom dynamic variable to abstraction name, is this possible? on Thu, 10 Apr 2025 18:21:35 GMT]]></title><description><![CDATA[<p>Thanks for that info, I am starting to work this out now! The only thing that I am now struggling with is the right inlet of 'route'; I am trying to update its argument with my dynamic OSC message (which is coming out of a message box as /EnvAtt3 ), but I get a message when I try and update this argument saying 'gatom: no method for '/EnvAtt3). However, when I had it as 'route $1' and the $1 was '/EnvAtt3' it routed the OSC message fine! Here is a screenshot of what I am trying thanks:<br />
<img src="/uploads/files/1744300645599-screenshot.png" alt="Screenshot.png" class="img-responsive img-markdown" /></p>
<p>I am sure this is possible, it seems to be some issue between floats/symbols possibly in that inlet I think <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/smile.png" title="smile" alt=":smile:" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/7</guid><dc:creator><![CDATA[RT5000]]></dc:creator><pubDate>Thu, 10 Apr 2025 18:21:35 GMT</pubDate></item><item><title><![CDATA[Reply to Adding a custom dynamic variable to abstraction name, is this possible? on Thu, 10 Apr 2025 17:39:54 GMT]]></title><description><![CDATA[<p>yes, try</p>
<p>[symbol $2$1(</p>
<p>instead of [$2$1( message.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/8</guid><dc:creator><![CDATA[lacuna]]></dc:creator><pubDate>Thu, 10 Apr 2025 17:39:54 GMT</pubDate></item><item><title><![CDATA[Reply to Adding a custom dynamic variable to abstraction name, is this possible? on Thu, 10 Apr 2025 19:52:17 GMT]]></title><description><![CDATA[<p>Thanks Lacuna and everyone else for helping me out with this, {symbol $2$1;] did the trick in the end! This is so great, I can have multiple abstractions and it just needs one float change now to dynamically change all of the OSC messages in the patch, this is going to save ages of tedious OSC mapping, really great support thanks! <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/thumbsup.png" title="thumbsup" alt=":thumbsup:" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15086/adding-a-custom-dynamic-variable-to-abstraction-name-is-this-possible/9</guid><dc:creator><![CDATA[RT5000]]></dc:creator><pubDate>Thu, 10 Apr 2025 19:52:17 GMT</pubDate></item></channel></rss>