<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: How to set a variable to local?</title>
		<atom:link href="http://cycling74.com/forums/topic/how-to-set-a-variable-to-local/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/how-to-set-a-variable-to-local/feed</link>
		<description></description>
		<pubDate>Tue, 18 Jun 2013 21:51:41 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-set-a-variable-to-local/#post-49883</guid>
					<title><![CDATA[How to set a variable to local?]]></title>
					<link>http://cycling74.com/forums/topic/how-to-set-a-variable-to-local/#post-49883</link>
					<pubDate>Tue, 20 Apr 2010 14:49:30 +0000</pubDate>
					<dc:creator>stuckie27</dc:creator>

					<description>
						<![CDATA[
						<p>I have a bunch of sub-patches that use the same structure, it would be nice if there was a way to define a local variable to just that subpatch, so I can easily copy and paste them.</p>
<p>Is this possible?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-set-a-variable-to-local/#post-179150</guid>
					<title><![CDATA[Re: How to set a variable to local?]]></title>
					<link>http://cycling74.com/forums/topic/how-to-set-a-variable-to-local/#post-179150</link>
					<pubDate>Tue, 20 Apr 2010 18:39:49 +0000</pubDate>
					<dc:creator>Roman Thilenius</dc:creator>

					<description>
						<![CDATA[
						<p> <br />
yes, you could, for example, use [var foo] in the abstraction, where<br />
foo might be (partially or fully) set by an argument to the abstraction,<br />
and the var object also beeing loadbanged.</p>
<p>now you can make an abstraction [mypatch test1], send it &#8220;33&#8243; via an inlet,<br />
and when you copy [mypatch test1] it will already load with the 33 as<br />
variable.</p>
<p>-110<br />
 </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-set-a-variable-to-local/#post-179151</guid>
					<title><![CDATA[Re: How to set a variable to local?]]></title>
					<link>http://cycling74.com/forums/topic/how-to-set-a-variable-to-local/#post-179151</link>
					<pubDate>Tue, 20 Apr 2010 21:17:14 +0000</pubDate>
					<dc:creator>stuckie27</dc:creator>

					<description>
						<![CDATA[
						<p>Thanks for the response Roman but it does not address my problem.</p>
<p>I have 6 sub patches, and  I have an if statement in each one.</p>
<p>If $i1 == 10 then send bob 20 else $i1</p>
<p>I use the variable bob in all of the sub patches and a side effect is that the bob variable acts global it changes everywhere, it&#8217;s global.</p>
<p>Can I make it just respond to the local subpatch?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-set-a-variable-to-local/#post-179152</guid>
					<title><![CDATA[Re: How to set a variable to local?]]></title>
					<link>http://cycling74.com/forums/topic/how-to-set-a-variable-to-local/#post-179152</link>
					<pubDate>Tue, 20 Apr 2010 21:31:24 +0000</pubDate>
					<dc:creator>Jesse</dc:creator>

					<description>
						<![CDATA[
						<p>Not sure if this helps, but #0 is a unique ID for each patch, so if you can name your variable using this ID then you should be ok.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-set-a-variable-to-local/#post-179153</guid>
					<title><![CDATA[Re: How to set a variable to local?]]></title>
					<link>http://cycling74.com/forums/topic/how-to-set-a-variable-to-local/#post-179153</link>
					<pubDate>Wed, 21 Apr 2010 03:27:44 +0000</pubDate>
					<dc:creator>seejayjames</dc:creator>

					<description>
						<![CDATA[
						<p>[patcherargs] can be used instead of the #0, #1 etc. for abstractions. the advantage is working with a subpatch instead of a separate file.</p>
<p>Not sure if you can work it into the [send], but you can definitely do a workaround, as each subpatch can be made to do whatever you want, because you have a different main number/patcherarg to work with. So for example, don&#8217;t just &#8220;send bob&#8221;, use [prepend] and the patcherarg, then at the other end, at the [receive], use [route] to sort out the different indexes.</p>
<p>Though of course using a [patcherarg] in only one place is the same amount of work as just manually setting a different value in each subpatch.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-set-a-variable-to-local/#post-179154</guid>
					<title><![CDATA[Re: How to set a variable to local?]]></title>
					<link>http://cycling74.com/forums/topic/how-to-set-a-variable-to-local/#post-179154</link>
					<pubDate>Wed, 21 Apr 2010 04:19:02 +0000</pubDate>
					<dc:creator>Chris Muir</dc:creator>

					<description>
						<![CDATA[
						<p>The suggestion to prefix your variable names with #0 (e.g. #0_bob might become 3456_bob in one subpatcher and 3457_bob in another) is a good one, although I rarely use it.</p>
<p>Instead I often pass in an instance ID to a patch, such as A, B, C etc. Using the same prefix trick I end up with A_bob in the A patch, B_bob in the B patch, etc.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

