<?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: random and change &#8211; help please</title>
		<atom:link href="http://cycling74.com/forums/topic/random-and-change-help-please/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/random-and-change-help-please/feed</link>
		<description></description>
		<pubDate>Thu, 20 Jun 2013 03:04:21 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/random-and-change-help-please/#post-28977</guid>
					<title><![CDATA[random and change &#8211; help please]]></title>
					<link>http://cycling74.com/forums/topic/random-and-change-help-please/#post-28977</link>
					<pubDate>Thu, 30 Nov 2006 10:45:31 +0000</pubDate>
					<dc:creator>ahab</dc:creator>

					<description>
						<![CDATA[
						<p>Hi,<br />
Tis is probably a total newbie question but i really need your help as i have tried all the ways i can think of.</p>
<p>Here is my problem:<br />
I need to generate a random number betveen 0 and 3 on each bang to random and filter the numbers so that there are no  immediate repetitions ever (so just using [deal] does not work). I&#8217;m trying to do that by connecting [random] and [change]. Change filters out the repetitions nicely but i need a way to send bang to random when [change] has filtered out the int random sent so the [random] would trie automatically again until a different int is generated and change lets it pass.</p>
<p>Here is what i have now:</p>
<p>#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 1;<br />
#P newex 93 195 36 9109513 print R;<br />
#P button 93 61 15 0;<br />
#P newex 93 150 40 9109513 Change;<br />
#P newex 93 104 51 9109513 Random 3;<br />
#P window linecount 3;<br />
#P comment 114 62 100 9109513 each bang from here should generate output from change;<br />
#P connect 2 0 4 0;<br />
#P connect 3 0 1 0;<br />
#P connect 1 0 2 0;<br />
#P window clipboard copycount 5;</p>
<p>thanks<br />
Taaniel</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89608</guid>
					<title><![CDATA[Re: random and change &#8211; help please]]></title>
					<link>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89608</link>
					<pubDate>Thu, 30 Nov 2006 11:03:51 +0000</pubDate>
					<dc:creator>Emmanuel Jourdan</dc:creator>

					<description>
						<![CDATA[
						<p>On 30 nov. 06, at 11:45, Taaniel wrote:</p>
<p>> Hi,<br />
> Tis is probably a total newbie question but i really need your help  <br />
> as i have tried all the ways i can think of.<br />
><br />
> Here is my problem:<br />
> I need to generate a random number betveen 0 and 3 on each bang to  <br />
> random and filter the numbers so that there are no  immediate  <br />
> repetitions ever (so just using [deal] does not work). I&#8217;m trying  <br />
> to do that by connecting [random] and [change]. Change filters out  <br />
> the repetitions nicely but i need a way to send bang to random when  <br />
> [change] has filtered out the int random sent so the [random] would  <br />
> trie automatically again until a different int is generated and  <br />
> change lets it pass.</p>
<p>Hi,</p>
<p>There&#8217;s an abstraction called &#8220;urn-jb&#8221; in the examples folder of Max.  <br />
It uses the urn object which output random numbers without  <br />
duplicates, and some &#8220;intelligence&#8221; to filter the possible repetition  <br />
at the start of a new serie.</p>
<p>HTH,<br />
ej</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89609</guid>
					<title><![CDATA[Re: random and change &#8211; help please]]></title>
					<link>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89609</link>
					<pubDate>Thu, 30 Nov 2006 11:20:53 +0000</pubDate>
					<dc:creator>roger.carruthers</dc:creator>

					<description>
						<![CDATA[
						<p>Like this ?</p>
<p>#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 1;<br />
#P newex 90 97 30 196617 t b s;<br />
#P message 114 76 33 196617 clear;<br />
#P newex 93 195 36 196617 print R;<br />
#P button 54 58 15 0;<br />
#P newex 90 131 34 196617 urn 3;<br />
#P connect 4 0 0 0;<br />
#P connect 4 1 0 0;<br />
#P connect 3 0 4 0;<br />
#P fasten 0 1 3 0 119 158 156 158 156 64 119 64;<br />
#P connect 1 0 0 0;<br />
#P connect 0 0 2 0;<br />
#P window clipboard copycount 5;</p>
<p>cheers<br />
Roger</p>
<p>&#8212; Taaniel <ahab @hot.ee> wrote:</ahab></p>
<p>> <br />
> <br />
> Here is my problem:<br />
> I need to generate a random number betveen 0 and 3<br />
> on each bang to random and filter the numbers so<br />
> that there are no  immediate repetitions ever (so<br />
> just using [deal] does not work). I&#8217;m trying to do<br />
> that by connecting [random] and [change]. Change<br />
> filters out the repetitions nicely but i need a way<br />
> to send bang to random when [change] has filtered<br />
> out the int random sent so the [random] would trie<br />
> automatically again until a different int is<br />
> generated and change lets it pass.<br />
> </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89610</guid>
					<title><![CDATA[Re: random and change &#8211; help please]]></title>
					<link>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89610</link>
					<pubDate>Thu, 30 Nov 2006 13:11:42 +0000</pubDate>
					<dc:creator>Roby Steinmetzer</dc:creator>

					<description>
						<![CDATA[
						<p>an annotated solution without urn</p>
<p>Roby</p>
<p>#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 3;<br />
#P comment 253 219 100 196617 2. if there&#8217;s a number then open the  <br />
door for it to pass;<br />
#P window linecount 1;<br />
#P newex 161 347 57 196617 route bang;<br />
#P user gswitch2 132 304 39 32 1 0;<br />
#P newex 199 244 29 196617 t i 1;<br />
#P newex 161 139 87 196617 t b i 0;<br />
#P newex 208 375 36 196617 print R;<br />
#P button 161 54 15 0;<br />
#P newex 199 218 40 196617 Change;<br />
#P newex 161 106 51 196617 Random 3;<br />
#P toggle 132 280 15 0;<br />
#P window linecount 3;<br />
#P comment 260 128 100 196617 1. first close the door below for the  <br />
numbers;<br />
#P window linecount 2;<br />
#P comment 60 137 100 196617 3. otherwise only this bang goes thru;<br />
#P window linecount 4;<br />
#P comment 262 344 100 196617 4. finaly we filter out the bang in the  <br />
case when there was a number;<br />
#P fasten 10 0 4 0 137 347 115 347 115 84 166 84;<br />
#P connect 11 1 7 0;<br />
#P connect 10 1 11 0;<br />
#P connect 8 0 10 1;<br />
#P connect 9 1 3 0;<br />
#P connect 8 2 3 0;<br />
#P connect 4 0 8 0;<br />
#P connect 8 1 5 0;<br />
#P connect 5 0 9 0;<br />
#P connect 9 0 10 1;<br />
#P connect 3 0 10 0;<br />
#P connect 6 0 4 0;<br />
#P window clipboard copycount 13;</p>
<p>
On 30 nov. 06, at 11:45, Taaniel wrote:<br />
> Here is my problem:<br />
> I need to generate a random number betveen 0 and 3 on each bang to  <br />
> random and filter the numbers so that there are no  immediate  <br />
> repetitions ever (so just using [deal] does not work). I&#8217;m trying  <br />
> to do that by connecting [random] and [change]. Change filters out  <br />
> the repetitions nicely but i need a way to send bang to random when  <br />
> [change] has filtered out the int random sent so the [random] would  <br />
> trie automatically again until a different int is generated and  <br />
> change lets it pass.<br />
><br />
> Here is what i have now:<br />
><br />
> #P window setfont &#8220;Sans Serif&#8221; 9.;<br />
> #P window linecount 1;<br />
> #P newex 93 195 36 9109513 print R;<br />
> #P button 93 61 15 0;<br />
> #P newex 93 150 40 9109513 Change;<br />
> #P newex 93 104 51 9109513 Random 3;<br />
> #P window linecount 3;<br />
> #P comment 114 62 100 9109513 each bang from here should generate  <br />
> output from change;<br />
> #P connect 2 0 4 0;<br />
> #P connect 3 0 1 0;<br />
> #P connect 1 0 2 0;<br />
> #P window clipboard copycount 5;</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89611</guid>
					<title><![CDATA[Re: random and change &#8211; help please]]></title>
					<link>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89611</link>
					<pubDate>Thu, 30 Nov 2006 13:38:11 +0000</pubDate>
					<dc:creator>ahab</dc:creator>

					<description>
						<![CDATA[
						<p>so much for your help !</p>
<p>Taaniel</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89612</guid>
					<title><![CDATA[Re: random and change &#8211; help please]]></title>
					<link>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89612</link>
					<pubDate>Thu, 30 Nov 2006 18:34:12 +0000</pubDate>
					<dc:creator>Kim Cascone</dc:creator>

					<description>
						<![CDATA[
						<p>
On Nov 30, 2006, at 5:11 AM, Roby Steinmetzer wrote:</p>
<p>>> I need to generate a random number betveen 0 and 3 on each bang to  <br />
>> random and filter the numbers so that there are no  immediate  <br />
>> repetitions ever (so just using [deal] does not work).</p>
<p>
I think this works&#8230;if someone finds a bug please let me know&#8230;</p>
<p>max v2;<br />
#N vpatcher 264 156 813 509;<br />
#P toggle 185 206 15 0;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P number 75 139 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P window linecount 1;<br />
#P newex 117 108 55 196617 Random 10;<br />
#P number 117 178 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P button 117 65 15 0;<br />
#N vpatcher 40 55 440 355;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P number 52 89 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P number 257 119 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#N comlet int;<br />
#P inlet 34 53 15 0;<br />
#P newex 34 117 175 196617 if ($i1!=$i2) then $i1 else out2 bang;<br />
#N comlet bang when a direct repetition occurs;<br />
#P outlet 199 145 15 0;<br />
#N comlet output without direct repetitions;<br />
#P outlet 34 151 15 0;<br />
#P newex 199 91 27 196617 int;<br />
#P connect 4 0 3 0;<br />
#P connect 3 0 1 0;<br />
#P connect 4 0 6 0;<br />
#P fasten 3 0 0 0 39 142 23 142 23 82 204 82;<br />
#P connect 0 0 3 1;<br />
#P connect 3 1 2 0;<br />
#P connect 0 0 5 0;<br />
#P pop;<br />
#P newobj 117 151 78 196617 p antiRepetition;<br />
#P fasten 3 0 4 0 122 132 80 132;<br />
#P fasten 0 1 3 0 190 189 269 189 269 95 122 95;<br />
#P connect 1 0 3 0;<br />
#P connect 3 0 0 0;<br />
#P connect 0 0 2 0;<br />
#P connect 0 1 5 0;<br />
#P pop;</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89613</guid>
					<title><![CDATA[Re: random and change &#8211; help please]]></title>
					<link>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89613</link>
					<pubDate>Thu, 30 Nov 2006 21:14:46 +0000</pubDate>
					<dc:creator>Trond Lossius</dc:creator>

					<description>
						<![CDATA[
						<p>You can also check out &#8220;anti-bis&#8221; from RTC-lib by Karlheinz Essl.</p>
<p>Best,<br />
Trond</p>
<p>>>> /I need to generate a random number betveen 0 and 3 on each bang to <br />
>>> random and filter the numbers so that there are no  immediate <br />
>>> repetitions ever (so just using [deal] does not work). /<br />
>>></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89614</guid>
					<title><![CDATA[Re: random and change &#8211; help please]]></title>
					<link>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89614</link>
					<pubDate>Fri, 01 Dec 2006 07:31:10 +0000</pubDate>
					<dc:creator>yacine</dc:creator>

					<description>
						<![CDATA[
						<p>a simple arithmetic solution (uncommented)<br />
//yac</p>
<p>#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 1;<br />
#P comment 264 127 32 9109513 range;<br />
#P newex 188 156 27 9109513 &#8211; 1;<br />
#P number 228 127 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P newex 147 202 27 9109513 + 1;<br />
#P number 147 302 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P newex 147 273 32 9109513 % 10;<br />
#P newex 147 240 30 9109513 +;<br />
#P button 147 127 15 0;<br />
#P newex 147 178 51 9109513 random 9;<br />
#P comment 163 127 32 9109513 click;<br />
#P connect 6 0 3 0;<br />
#P connect 7 0 4 1;<br />
#P connect 7 0 8 0;<br />
#P connect 4 0 5 0;<br />
#P connect 4 0 3 1;<br />
#P connect 8 0 1 1;<br />
#P connect 1 0 6 0;<br />
#P connect 3 0 4 0;<br />
#P connect 2 0 1 0;<br />
#P window clipboard copycount 10;</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89615</guid>
					<title><![CDATA[Re: random and change &#8211; help please]]></title>
					<link>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89615</link>
					<pubDate>Fri, 01 Dec 2006 08:30:56 +0000</pubDate>
					<dc:creator>lorenzo.pagliei</dc:creator>

					<description>
						<![CDATA[
						<p>try this</p>
<p>Lorenzo</p>
<p>max v2;<br />
#N vpatcher 20 74 456 433;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 1;<br />
#P newex 69 120 48 196617 r rebang;<br />
#P newex 222 242 48 196617 s rebang;<br />
#P newex 60 173 172 196617 t i b;<br />
#P newex 222 197 27 196617 int;<br />
#P number 60 274 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P newex 60 221 172 196617 if $i1 != $i2 then $i1 else out2 bang;<br />
#P newex 72 242 32 196617 print;<br />
#P number 108 60 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P newex 60 85 58 196617 metro 250;<br />
#P toggle 60 60 15 0;<br />
#P newex 120 120 48 196617 t b clear;<br />
#P newex 60 146 34 196617 urn 4;<br />
#P connect 2 0 3 0;<br />
#P fasten 11 0 0 0 74 141 65 141;<br />
#P fasten 1 0 0 0 125 141 65 141;<br />
#P fasten 1 1 0 0 163 141 65 141;<br />
#P connect 3 0 0 0;<br />
#P connect 0 0 9 0;<br />
#P connect 9 0 6 0;<br />
#P connect 6 0 7 0;<br />
#P connect 6 0 5 0;<br />
#P connect 4 0 3 1;<br />
#P fasten 0 1 1 0 89 167 174 167 174 115 125 115;<br />
#P connect 9 1 8 0;<br />
#P connect 8 0 6 1;<br />
#P connect 6 1 10 0;<br />
#P fasten 6 0 8 1 65 263 273 263 273 191 244 191;<br />
#P pop;</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89616</guid>
					<title><![CDATA[Re: random and change &#8211; help please]]></title>
					<link>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89616</link>
					<pubDate>Fri, 01 Dec 2006 14:25:41 +0000</pubDate>
					<dc:creator>Stefan Tiedje</dc:creator>

					<description>
						<![CDATA[
						<p>Taaniel wrote:<br />
> Here is my problem: I need to generate a random number betveen 0 and<br />
> 3 on each bang to random and filter the numbers so that there are no<br />
> immediate repetitions ever (so just using [deal] does not work).</p>
<p>Yet another one:</p>
<p>#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 1;<br />
#P newex 139 225 50 196617 deferlow;<br />
#P newex 93 126 56 196617 t i i;<br />
#P newex 139 203 30 196617 sel 1;<br />
#P newex 139 180 30 196617 ==;<br />
#P newex 93 180 41 196617 print R;<br />
#P button 93 80 15 0;<br />
#P newex 93 148 44 196617 change;<br />
#P newex 93 104 51 196617 random 3;<br />
#P connect 1 0 3 0;<br />
#P connect 1 0 4 1;<br />
#P fasten 7 0 0 0 144 248 195 248 195 100 98 100;<br />
#P connect 5 0 7 0;<br />
#P connect 4 0 5 0;<br />
#P connect 6 1 4 0;<br />
#P connect 6 0 1 0;<br />
#P connect 0 0 6 0;<br />
#P connect 2 0 0 0;<br />
#P window clipboard copycount 8;</p>
<p>&#8211; <br />
Stefan Tiedje&#8212;&#8212;&#8212;&#8212;x&#8212;&#8212;-<br />
&#8211;_____&#8212;&#8212;&#8212;&#8211;|&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&#8211;(_|_ &#8212;-|&#8212;&#8211;|&#8212;&#8211;()&#8212;&#8212;-<br />
&#8211; _|_)&#8212;-|&#8212;&#8211;()&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&#8212;&#8212;&#8212;-()&#8212;&#8212;&#8211;www.ccmix.com</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89617</guid>
					<title><![CDATA[Re: random and change &#8211; help please]]></title>
					<link>http://cycling74.com/forums/topic/random-and-change-help-please/#post-89617</link>
					<pubDate>Mon, 04 Dec 2006 17:51:21 +0000</pubDate>
					<dc:creator>Stefan Tiedje</dc:creator>

					<description>
						<![CDATA[
						<p>Yacine Sebti wrote:<br />
> a simple arithmetic solution (uncommented)</p>
<p>nice one&#8230;<br />
took a while to understand why it works&#8230;<br />
it&#8217;s probably faster than any comparison for duplicates&#8230;</p>
<p>You win the price for the most elegant solution. Could be a wonderful <br />
task for Max classes&#8230; It shows that there are a lot of very different <br />
kind of obvious solutions, but there might be still an even more elegant <br />
solution out there&#8230;</p>
<p>Stefan</p>
<p>&#8211; <br />
Stefan Tiedje&#8212;&#8212;&#8212;&#8212;x&#8212;&#8212;-<br />
&#8211;_____&#8212;&#8212;&#8212;&#8211;|&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&#8211;(_|_ &#8212;-|&#8212;&#8211;|&#8212;&#8211;()&#8212;&#8212;-<br />
&#8211; _|_)&#8212;-|&#8212;&#8211;()&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&#8212;&#8212;&#8212;-()&#8212;&#8212;&#8211;www.ccmix.com</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

