<?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: [sharing is fun] store coll in pattr</title>
		<atom:link href="http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/feed</link>
		<description></description>
		<pubDate>Wed, 19 Jun 2013 13:48:47 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-40842</guid>
					<title><![CDATA[[sharing is fun] store coll in pattr]]></title>
					<link>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-40842</link>
					<pubDate>Fri, 14 Nov 2008 09:25:47 +0000</pubDate>
					<dc:creator>jasch</dc:creator>

					<description>
						<![CDATA[
						<p>Dear Maxers,</p>
<p>I&#8217;d like to share a Javascript solution for storing contents of colls  <br />
in pattr presets.</p>
<p>It works quite well, even when interpolating presets, but there are  <br />
some limitations, such as mixing symbols and numbers. Since colls  <br />
share a global namespace in a similar way than pattr does, i find it  <br />
quite convenient to keep all of those functions in one place, and to  <br />
manage everything together with the global pattr presets.</p>
<p>I haven&#8217;t tested it extensively in long term projects, but i&#8217;d say  <br />
it&#8217;s as viable as js&#8217; garbage collector is&#8230;.</p>
<p>It would be nice to have pattr get/setvalue-functionality directly  <br />
integrated into coll, but until that day comes, this solution should  <br />
fill that gap.</p>
<p>Below are the files in text-format, but i&#8217;ve also put up a zip archive  <br />
here:  <a href="http://www.jasch.ch/dl/coll_to_pattr.zip" rel="nofollow">http://www.jasch.ch/dl/coll_to_pattr.zip</a></p>
<p>Enjoy</p>
<p>/*j</p>
<p>
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
save as c2p.js<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>/*<br />
	c2p.js :: connect coll to pattrstorage via javascript<br />
  	store contents of a coll in a pattr-value array and dump it back  <br />
when pattr slots change<br />
	jasch 20081114<br />
*/</p>
<p>// autowatch = 0;<br />
inlets = 4;</p>
<p>// variable declarations<br />
var warehouse = new Array();<br />
var supplier = new Array();<br />
var i = 0;<br />
var j = 0;<br />
var index = 0;<br />
var count = 0;</p>
<p>// unique marker string<br />
const marker = &#8220;#-#&#8221;;</p>
<p>/* standard functions */</p>
<p>function bang()<br />
{<br />
	if(inlet == 0) { 		// bang on first inlet 	:: new content<br />
		warehouse[index++] = &#8220;bang&#8221;;	<br />
	} else if(inlet == 1) {	// bang on second inlet :: new keyword<br />
		warehouse[index++] = marker;<br />
		warehouse[index++] = &#8220;bang&#8221;;	<br />
	} else if(inlet == 2) {	// bang on third inlet -> read finished ::  <br />
get contents<br />
		outlet(0, &#8220;dump&#8221;);<br />
	} else if(inlet == 3) {	// bang on fourth inlet -> dump finished ::  <br />
notify pattrwarehouse<br />
		notifyclients();<br />
	}<br />
}<br />
bang.immediate = 1;</p>
<p>function msg_int(a)<br />
{<br />
	if(inlet == 0) { // content<br />
		warehouse[index++] = a;<br />
	} else if(inlet == 1) { // index<br />
		warehouse[index++] = marker;<br />
		warehouse[index++] = a;<br />
	}<br />
}</p>
<p>function msg_float(a)<br />
{<br />
	if(inlet == 0) { // content<br />
		warehouse[index++] = a;<br />
	}<br />
}<br />
msg_int.immediate = 1;</p>
<p>function list()<br />
{<br />
	if(inlet == 0) {<br />
		var b = arrayfromargs(arguments);<br />
		for(i = 0; i < b.length; i++){<br />
			warehouse[index++] = b[i];<br />
		}		<br />
	}<br />
}<br />
list.immediate = 1;</p>
<p>function anything()<br />
{<br />
	if(inlet == 0){<br />
		var a = arrayfromargs(messagename, arguments);			<br />
		for(i = 0; i < a.length; i++){<br />
			warehouse[index++] = a[i];<br />
		}<br />
	}<br />
}<br />
anything.immediate = 1;</p>
<p>function symbol(s)<br />
{<br />
	if(inlet == 0){<br />
		warehouse[index++] = s;		<br />
	} else if(inlet == 1) {<br />
		warehouse[index++] = marker;<br />
		warehouse[index++] = s;<br />
	}<br />
}<br />
symbol.immediate = 1;</p>
<p>/* pattr communication */</p>
<p>/* when notified, pattr calls this function to retrieve the warehouse  <br />
array */<br />
function getvalueof()<br />
{<br />
     return warehouse;<br />
}<br />
getvalueof.local = 1;</p>
<p>/* pattr sends new values to array, we update coll */<br />
function setvalueof()<br />
{<br />
	warehouse.length = 0;<br />
	warehouse = arrayfromargs(arguments);<br />
	dump();<br />
}<br />
setvalueof.local = 1;</p>
<p>/* call this function BEFORE storing a pattr preset */<br />
function store()<br />
{	<br />
	warehouse.length = 0;<br />
	index = 0;<br />
	notifyclients();<br />
	post(warehouse);<br />
	outlet(0, &#8220;dump&#8221;);<br />
}<br />
store.immediate = 1;</p>
<p>/* call this function AFTER recalling a pattr preset */<br />
function dump()<br />
{<br />
	outlet(0, &#8220;clear&#8221;); // reset the client coll<br />
	supplier.length = 0;<br />
	count = 0;</p>
<p>	for(i = 0; i < warehouse.length; i++) {<br />
		if(warehouse[i] == marker) {<br />
			if(supplier.length > 0) {<br />
				if(supplier.length > 1) {<br />
					if(typeof(supplier[0]) == &#8220;number&#8221;) {<br />
						supplier[0] = supplier[0].toFixed(0);<br />
					}<br />
					outlet(0, &#8220;store&#8221;, supplier); // supply the entry to coll<br />
				}<br />
				supplier.length = 0;<br />
				count = 0;<br />
			}<br />
		} else {<br />
			supplier[count] = warehouse[i];<br />
			count++;<br />
		}<br />
	}<br />
	if(supplier.length > 1) {<br />
		if(typeof(supplier[0]) == &#8220;number&#8221;) {<br />
			supplier[0] = supplier[0].toFixed(0);<br />
		}<br />
		outlet(0, &#8220;store&#8221;, supplier); // supply the entry to coll<br />
	}</p>
<p>}<br />
dump.immediate = 1;</p>
<p>function clear()<br />
{<br />
	warehouse.length = supply.length = count = index = 0;	<br />
}<br />
clear.immediate = 1;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
save as coll_to_pattr.help (Max 4)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>max v2;<br />
#N vpatcher 5 49 906 551;<br />
#P origin 3 0;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 1;<br />
#P comment 295 341 68 196617 view coll Nr.;<br />
#P number 368 340 35 9 0 0 8224 3 0 0 0 221 221 221 255 181 181 0 0 0;<br />
#N vpatcher 53 271 519 498;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P flonum 359 71 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P objectname value[3];<br />
#P flonum 322 71 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P objectname value[2];<br />
#P flonum 285 71 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P objectname value[1];<br />
#P flonum 248 71 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P objectname value[0];<br />
#P newex 25 43 34 196617 r c2p;<br />
#P newex 80 173 125 196617 autopattr @autorestore 0;<br />
#X prestore value[0] 1 0 0.;<br />
#X prestore value[1] 1 0 0.;<br />
#X prestore value[2] 1 0 0.;<br />
#X prestore value[3] 1 0 0.;<br />
#P objectname u415000059;<br />
#N coll 4_voice 1;<br />
#P newobj 80 96 101 196617 coll 4_voice 1;<br />
#P newex 80 118 100 196617 js c2p.js;<br />
#P objectname js_store[1];<br />
#N coll 3_voice 1;<br />
#P newobj 80 43 100 196617 coll 3_voice 1;<br />
#P newex 80 65 100 196617 js c2p.js;<br />
#P objectname js_store[0];<br />
#P fasten 0 0 1 0 85 86 72 86 72 36 85 36;<br />
#P fasten 5 0 0 0 30 64 85 64;<br />
#P connect 1 0 0 0;<br />
#P fasten 2 0 3 0 85 139 72 139 72 89 85 89;<br />
#P connect 3 0 2 0;<br />
#P fasten 5 0 2 0 30 117 85 117;<br />
#P connect 1 1 0 1;<br />
#P connect 3 1 2 1;<br />
#P connect 1 2 0 2;<br />
#P connect 3 2 2 2;<br />
#P connect 1 3 0 3;<br />
#P connect 3 3 2 3;<br />
#P pop;<br />
#P newobj 126 241 100 196617 p subpatch;<br />
#P objectname sub;<br />
#N coll 2_voice 1;<br />
#P newobj 126 180 101 196617 coll 2_voice 1;<br />
#P newex 126 202 100 196617 js c2p.js;<br />
#P objectname js_store[1];<br />
#P hidden newex 449 363 60 196617 loadmess 1;<br />
#P hidden message 368 364 79 196617 refer $1_voice;<br />
#P user jit.cellblock 296 359 536 428 3 9 1 1 60 17 0 0 1 0 1 0 0 0 0  <br />
0 0 0 247 247 247 255 255 255 0 0 0 232 232 245 0 0 0 215 215 240 1 1  <br />
1 0 4 0 0 0;<br />
#P comment 575 409 187 196617 a 1 2 -> b 3 4: numbers get interpolated;<br />
#P comment 575 394 154 196617 a b c -> 1 2 3: interpolation fails;<br />
#P comment 575 341 34 196617 Note:;<br />
#P newex 295 172 47 196617 t l store;<br />
#P newex 332 200 34 196617 s c2p;<br />
#P message 610 265 14 196617 2;<br />
#P flonum 407 293 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P objectname value[3];<br />
#P flonum 370 293 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P objectname value[2];<br />
#P flonum 333 293 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P objectname value[1];<br />
#P flonum 296 293 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P objectname value[0];<br />
#P comment 780 28 85 196617 jasch 20081114;<br />
#P comment 628 266 109 196617 recall a pattr preset;<br />
#P window linecount 2;<br />
#P comment 628 284 139 196617 c2p automatically pushes the contents  <br />
out to the collection;<br />
#P window linecount 1;<br />
#P newex 586 282 37 196617 s psto;<br />
#P objectname u106000012[2];<br />
#P message 586 265 14 196617 1;<br />
#P comment 628 192 109 196617 store the pattr preset;<br />
#P window linecount 2;<br />
#P comment 628 153 122 196617 harvest contents from the collection;<br />
#P window linecount 1;<br />
#P newex 586 169 34 196617 s c2p;<br />
#P message 586 152 40 196617 store;<br />
#P newex 586 208 37 196617 s psto;<br />
#P objectname u106000012[1];<br />
#P newex 415 172 37 196617 r psto;<br />
#P objectname u106000012;<br />
#P message 586 191 43 196617 store 2;<br />
#P comment 576 247 92 196617 to recall a preset:;<br />
#P user ubumenu 418 127 86 196617 0 1 1 0;<br />
#X add read;<br />
#X add write;<br />
#X add clientwindow;<br />
#X add storagewindow;<br />
#X prefix_set 0 0  0;<br />
#P newex 71 127 34 196617 r c2p;<br />
#P flonum 364 127 52 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P number 311 127 51 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P button 295 127 15 0;<br />
#P newex 295 150 66 196617 pack store 0;<br />
#P window linecount 2;<br />
#P newex 295 223 67 196617 pattrstorage orfeo;<br />
#X autorestore orfeo.xml;<br />
#X client_rect 10 59 650 299;<br />
#X storage_rect 10 59 650 299;<br />
#P objectname orfeo;<br />
#P window linecount 1;<br />
#N coll 1_voice 1;<br />
#P newobj 126 127 100 196617 coll 1_voice 1;<br />
#P newex 126 149 100 196617 js c2p.js;<br />
#P objectname js_store[0];<br />
#P comment 576 134 90 196617 to store a preset:;<br />
#P window setfont &#8220;Sans Serif&#8221; 18.;<br />
#P comment 19 17 114 196626 coll to pattr;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P comment 139 27 246 196617 store contents of collections in  <br />
pattrstorage presets;<br />
#P user panel 567 126 220 110;<br />
#X brgb 247 247 247;<br />
#X frgb 165 165 165;<br />
#X border 1;<br />
#X rounded 0;<br />
#X shadow 0;<br />
#X done;<br />
#P user panel 567 240 220 75;<br />
#X brgb 247 247 247;<br />
#X frgb 165 165 165;<br />
#X border 1;<br />
#X rounded 0;<br />
#X shadow 0;<br />
#X done;<br />
#P window linecount 2;<br />
#P newex 370 223 76 196617 autopattr @autorestore 0;<br />
#X prestore value[0] 1 0 0.;<br />
#X prestore value[1] 1 0 0.;<br />
#X prestore value[2] 1 0 0.;<br />
#X prestore value[3] 1 0 0.;<br />
#P objectname u059000061;<br />
#P window linecount 3;<br />
#P comment 575 355 190 196617 pattr can&#8217;t interpolate coll entries  <br />
that mix symbol and int/float data-types at the same element-index in  <br />
the same line:;<br />
#P user panel 5 4 876 50;<br />
#X brgb 239 239 239;<br />
#X frgb 181 181 181;<br />
#X border 1;<br />
#X rounded 0;<br />
#X shadow 0;<br />
#X done;<br />
#P user panel 295 358 242 71;<br />
#X brgb 191 191 191;<br />
#X frgb 190 190 190;<br />
#X border 1;<br />
#X rounded 0;<br />
#X shadow 0;<br />
#X done;<br />
#P fasten 9 0 10 0 131 170 118 170 118 120 131 120;<br />
#P fasten 16 0 9 0 76 146 131 146;<br />
#P connect 10 0 9 0;<br />
#P fasten 44 0 45 0 131 223 118 223 118 173 131 173;<br />
#P connect 45 0 44 0;<br />
#P fasten 16 0 44 0 76 199 131 199;<br />
#P connect 10 1 9 1;<br />
#P connect 45 1 44 1;<br />
#P connect 10 2 9 2;<br />
#P connect 45 2 44 2;<br />
#P connect 10 3 9 3;<br />
#P connect 45 3 44 3;<br />
#P connect 13 0 12 0;<br />
#P connect 12 0 37 0;<br />
#P fasten 15 0 11 0 369 195 300 195;<br />
#P connect 37 0 11 0;<br />
#P fasten 17 1 11 0 461 220 300 220;<br />
#P fasten 20 0 11 0 420 198 300 198;<br />
#P hidden connect 42 0 41 0;<br />
#P connect 37 1 36 0;<br />
#P fasten 14 0 12 1 316 146 356 146;<br />
#P hidden connect 43 0 47 0;<br />
#P hidden connect 47 0 42 0;<br />
#P connect 22 0 23 0;<br />
#P connect 19 0 21 0;<br />
#P connect 26 0 27 0;<br />
#P fasten 35 0 27 0 615 281 591 281;<br />
#P pop;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
copy to clipboard and save as coll_to_pattr.maxhelp (Max 5)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>
<div><span id="toggle40842-0" class="patchtoggle" onmousedown="toggleMaxPatch('post40842-0', 'er40842-0');">&#8211; Pasted Max <span id="maxversion40842-0"></span> Patch, click to <span id="er40842-0">expand</span>. &#8211;</span> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  width="110" height="14" class="clippy" ><param name="allowScriptAccess" value="always" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param NAME="FlashVars" value="copied=copied!&#038;copyto=copy to clipboard"/><param name="bgcolor" value="#FFFFFF"/><param name="wmode" value="opaque"/><embed src="/wp-content/plugins/bbpress-copy-compressed/clippy.swf"  width="110" height="14"   name="clippy"  quality="high"  allowScriptAccess="always"  type="application/x-shockwave-flash"  pluginspage="http://www.macromedia.com/go/getflashplayer"  FlashVars="text=----------begin_max5_patcher----------%0A2994.3oc6bsziiiaD9r6eEDdCPt3oCenmygf8VtsGCBvjEMjsY2V8JKYHI2c%0AOYv9e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="#ffffff"  wmode="opaque" /> </object></div>
<div id="post40842-0" style="display:none;visibility:hidden;" >
<div class="patchtoggleInfo"><small>Copy <b>all</b> of the following text.Then, in Max, select <em>New From Clipboard</em>.</small></div>
<div class="patchtogglediv">
<pre><code id="pastedcode40842-0">----------begin_max5_patcher----------
2994.3oc6bsziiiaD9r6eEDdCPt3oCenmygf8VtsGCBvjEMjsY2V8JKYHI2c
OYv9eO7ksnrojojkr0Nyr.aO5oUUe0CVUwh7aOLa9xrOnEyAeF7EvrYe6gYy
DWhegYpymMeazGqRhJDO17UYa2RSKmuPduR5Gkhq+VL8cvprjDvuk+3g6lte
a19xDZo3cgpqtKpb0l3zWdJmtpT9swgtOBW.HNH9+3Ev+Kx+QH32UuS7ZwWI
a4qeBc3W+4rzxznsTwc92z70QoQZe43zCeXj1KTD++DuP3iP9E+yGdf+mEVx
8re1kzbyrGVc0kuvfgrbIiI3mp+.0XICv.Qx4DGn3ebOCFjetxutiJeg4wbQ
AX9xnzWlaBrvGn0kY4qo41QYsArk4wEqhRD2C9Xn5parko2vUXN8QgO5CCCf
N5GgzdIiBSFgvXZEgLbBX56LX6.y9VT9QbnX+xyT52AXWUHG6rFOB6wYcrTi
GAgsoxS5rJeCHhN8PyU3fBHXObbB8MZdQbVpFROadEU6RDDsufnc7jr.+hGn
Zt5eR1p+ftViJlMeM84N8ijsilV8BPkVT0ep+jwo6xoELuRQkJRW+CGsOo7I
cb.Aez38eNZEswWtATe17WxiWmkxIiZuK+xG9feAH3QOc5Vb+zncFd0xrrjk
Q4uEWDuTpeeTRvTdiRi2FURKikzCFd78h2tKm6OP+2pl+cMYcMCgZW+DChmS
xXJVG31SMJdKJYO8KjeW+9F8JdtmQ3iAdr+yegwizL+azYoKWgFHUiN2WoY+
kL1I5bOlMMDykr4Z1inQmcL1yG5FDrv3Qmxxl750jWtYG7zIOXwHJrw2GgMF
OVBa7OE1MJrQ2EgMNvcrD1jeJraTXCuOBamfwRX67CpvtVPr0iXMGrBuqYwL
5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ESB+tt8hgiP6Eij8Sa+
auXG3cr+haIUIo+6qNSIjLD1vV2+0bPSwILgaex.Bgy4tu+ycrds709jSaEj
zYXpoOO0sAuL1USLzyZUss.DmBpMnkTKo68HnZgTIchgc7ZUK4d1WT6hRoIs
ydUsKMpo1kNvC6uv3QWHpZW4f2GVSCX0Vb.rAjxoklT1ygEsqnUsO+n5sY79
z001mAu9.FmFnnp0xUnnuaCfn6DEDaoFotDrXSyw67F7s8MLGaBzz4xs7jLP
S4Jk3BAZdwU5j2.GKxIaSNGh8n4sGmV1ZbZYawowsDmdEUSSdmkhxUQo+8Zc
ttbGBl8B4whY1OpDrM9CPwW2tLKADktl+v+CQ8O.qiJi9jnnb.1Y7okqfAx.
ZBk+E+TLSu8Cte9i2gqh7Yi5Kj91hztxb8BkSKQXCFh9+U2uOwG65tv3QWxi
knL7hhwJimxsIW9sstTNe6+07FA7T0kuuSHDuvvAWrmwTpYxNOw43dboQDLr
MDzwkgWKLdTeQPwKUeKMQBnmtpjUv5YqFYd6OTsJiaXkHy6XDsG5rkgr4kA9
YBYaoId6ZO3zjGRrlmwAhpI5xjpGN6JoVBzFpM3lhfXeanIuaKMYAI42.EgF
EJxyFP5lRQDWKHIRsMmkKK2XwyI17IbTKMRzwytV6TbMBog8jAxMUKyFE+fa
qL0FuYjN5ef3SDRQ0fSPmimMDxzglZuVDzF8rtRSNdHsD3THn3rq0OW3HffN
XkDNnl7N35G8xFCFzsc7ehmsdAuczji9dgVCjjasmYzQoPKHIG3Mklbz2DyZ
Akv2VTBaCJguonDxBTBcaQIjMnD5lhRPKPoaneIxvSRAxXyBkk5m3d7rqjVs
IPRmtQpJpSUfN0dia8yNr2Wq3Cex0O9jMil5.md5AcklBzCR+..N.Ao6XS5o
mfx1pJf7qsMIW+L07KndxyBrhcxe9v+GwYiS0
-----------end_max5_patcher-----------</code></pre></div>
</div>
</p><p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
example presets: save as orfeo.xml<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-144941</guid>
					<title><![CDATA[Re: [sharing is fun] store coll in pattr]]></title>
					<link>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-144941</link>
					<pubDate>Fri, 14 Nov 2008 21:03:15 +0000</pubDate>
					<dc:creator>barry threw</dc:creator>

					<description>
						<![CDATA[
						<p>this is rad, thanks.</p>
<p>bt</p>
<p>On Nov 14, 2008, at 1:25 AM, jasch   wrote:</p>
<p>> Dear Maxers,<br />
><br />
> I&#8217;d like to share a Javascript solution for storing contents of  <br />
> colls in pattr presets.</p>
<p>barry threw<br />
Media Art and Technology</p>
<p>San Francisco, CA<br />
Work: 857-544-3967<br />
Email: bthrew (at) gmail (dot) com<br />
Web: <a href="http://www.barrythrew.com" rel="nofollow">http://www.barrythrew.com</a></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-144942</guid>
					<title><![CDATA[Re: [sharing is fun] store coll in pattr]]></title>
					<link>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-144942</link>
					<pubDate>Mon, 17 Nov 2008 22:37:17 +0000</pubDate>
					<dc:creator>gusanomaxlist</dc:creator>

					<description>
						<![CDATA[
						<p>Thanks !</p>
<p>Ciao</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-144943</guid>
					<title><![CDATA[Re: [sharing is fun] store coll in pattr]]></title>
					<link>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-144943</link>
					<pubDate>Wed, 17 Dec 2008 08:11:41 +0000</pubDate>
					<dc:creator>Adam Murray</dc:creator>

					<description>
						<![CDATA[
						<p>I needed this feature tonight. This solution works great. Thank you very much. <br />
:)</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-144944</guid>
					<title><![CDATA[Re: [sharing is fun] store coll in pattr]]></title>
					<link>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-144944</link>
					<pubDate>Mon, 01 Nov 2010 16:27:35 +0000</pubDate>
					<dc:creator>vogt</dc:creator>

					<description>
						<![CDATA[
						<p>i just stumbled upon the problem that colls can&#8217;t be saved within pattrstorage and found this thread &#8211; however, i get some errors when i try it out under max 5, namely these:</p>
<p>js: c2p.js: Javascript SyntaxError: missing ; before statement, line 31<br />
 source line: get contents<br />
js: c2p.js: Javascript SyntaxError: missing ; before statement, line 31<br />
 source line: get contents<br />
js: c2p.js: Javascript SyntaxError: missing ; before statement, line 31<br />
 source line: get contents<br />
js: c2p.js: Javascript SyntaxError: missing ; before statement, line 31<br />
 source line: get contents</p>
<p>actually i never worked with javascripts and don&#8217;t have much knowledge about these..</p>
<p>is there a newer working version?</p>
<p>i need to interpolate between bigger arrays of numbers!</p>
<p>or is there a newer solution to this problem?</p>
<p>any help is highly appreciated,<br />
kind regards</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-144945</guid>
					<title><![CDATA[Re: [sharing is fun] store coll in pattr]]></title>
					<link>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-144945</link>
					<pubDate>Mon, 01 Nov 2010 21:52:09 +0000</pubDate>
					<dc:creator>Floating Point</dc:creator>

					<description>
						<![CDATA[
						<p>I don&#8217;t know javascript either. but it looks like what it says&#8211; some sort of syntax error:</p>
<p>function bang()<br />
{<br />
if(inlet == 0) { // bang on first inlet :: new content<br />
warehouse[index++] = &#8220;bang&#8221;;<br />
} else if(inlet == 1) {	// bang on second inlet :: new keyword<br />
warehouse[index++] = marker;<br />
warehouse[index++] = &#8220;bang&#8221;;<br />
} else if(inlet == 2) {	// bang on third inlet -> read finished :: </p>
<p>get contents             HERE (maybe needs to be commented out?(looks like a comment to my non-js eyes)</p>
<p>outlet(0, &#8220;dump&#8221;);<br />
} else if(inlet == 3) {	// bang on fourth inlet -> dump finished ::<br />
notify pattrwarehouse<br />
notifyclients();<br />
}<br />
}</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-144946</guid>
					<title><![CDATA[Re: [sharing is fun] store coll in pattr]]></title>
					<link>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-144946</link>
					<pubDate>Tue, 02 Nov 2010 10:11:25 +0000</pubDate>
					<dc:creator>vogt</dc:creator>

					<description>
						<![CDATA[
						<p>aaaaah, thanks for poointing this out!!<br />
i noticed before that the semicolon was missing, but all i could think of was putting the semicolon at the end of<br />
get contents;<br />
notify pattrwarehouse;</p>
<p>you were right however &#8211; those two lines belong to the comment in the respective line before!!! i changed it and now it works!</p>
<p>thanks a lot!!</p>
<p>so for future readers, the correct file should be:</p>
<p>&#8211;</p>
<p>/*<br />
c2p.js :: connect coll to pattrstorage via javascript<br />
store contents of a coll in a pattr-value array and dump it back<br />
when pattr slots change<br />
jasch 20081114<br />
*/</p>
<p>// autowatch = 0;<br />
inlets = 4;</p>
<p>// variable declarations<br />
var warehouse = new Array();<br />
var supplier = new Array();<br />
var i = 0;<br />
var j = 0;<br />
var index = 0;<br />
var count = 0;</p>
<p>// unique marker string<br />
const marker = &#8220;#-#&#8221;;</p>
<p>/* standard functions */</p>
<p>function bang()<br />
{<br />
if(inlet == 0) { // bang on first inlet :: new content<br />
warehouse[index++] = &#8220;bang&#8221;;<br />
} else if(inlet == 1) {    // bang on second inlet :: new keyword<br />
warehouse[index++] = marker;<br />
warehouse[index++] = &#8220;bang&#8221;;<br />
} else if(inlet == 2) {    // bang on third inlet -> read finished :: get contents<br />
outlet(0, &#8220;dump&#8221;);<br />
} else if(inlet == 3) {    // bang on fourth inlet -> dump finished :: notify pattrwarehouse<br />
notifyclients();<br />
}<br />
}<br />
bang.immediate = 1;</p>
<p>function msg_int(a)<br />
{<br />
if(inlet == 0) { // content<br />
warehouse[index++] = a;<br />
} else if(inlet == 1) { // index<br />
warehouse[index++] = marker;<br />
warehouse[index++] = a;<br />
}<br />
}</p>
<p>function msg_float(a)<br />
{<br />
if(inlet == 0) { // content<br />
warehouse[index++] = a;<br />
}<br />
}<br />
msg_int.immediate = 1;</p>
<p>function list()<br />
{<br />
if(inlet == 0) {<br />
var b = arrayfromargs(arguments);<br />
for(i = 0; i < b.length; i++){<br />
warehouse[index++] = b[i];<br />
}<br />
}<br />
}<br />
list.immediate = 1;</p>
<p>function anything()<br />
{<br />
if(inlet == 0){<br />
var a = arrayfromargs(messagename, arguments);<br />
for(i = 0; i < a.length; i++){<br />
warehouse[index++] = a[i];<br />
}<br />
}<br />
}<br />
anything.immediate = 1;</p>
<p>function symbol(s)<br />
{<br />
if(inlet == 0){<br />
warehouse[index++] = s;<br />
} else if(inlet == 1) {<br />
warehouse[index++] = marker;<br />
warehouse[index++] = s;<br />
}<br />
}<br />
symbol.immediate = 1;</p>
<p>/* pattr communication */</p>
<p>/* when notified, pattr calls this function to retrieve the warehouse<br />
array */<br />
function getvalueof()<br />
{<br />
return warehouse;<br />
}<br />
getvalueof.local = 1;</p>
<p>/* pattr sends new values to array, we update coll */<br />
function setvalueof()<br />
{<br />
warehouse.length = 0;<br />
warehouse = arrayfromargs(arguments);<br />
dump();<br />
}<br />
setvalueof.local = 1;</p>
<p>/* call this function BEFORE storing a pattr preset */<br />
function store()<br />
{<br />
warehouse.length = 0;<br />
index = 0;<br />
notifyclients();<br />
post(warehouse);<br />
outlet(0, &#8220;dump&#8221;);<br />
}<br />
store.immediate = 1;</p>
<p>/* call this function AFTER recalling a pattr preset */<br />
function dump()<br />
{<br />
outlet(0, &#8220;clear&#8221;); // reset the client coll<br />
supplier.length = 0;<br />
count = 0;</p>
<p>for(i = 0; i < warehouse.length; i++) {<br />
if(warehouse[i] == marker) {<br />
if(supplier.length > 0) {<br />
if(supplier.length > 1) {<br />
if(typeof(supplier[0]) == &#8220;number&#8221;) {<br />
supplier[0] = supplier[0].toFixed(0);<br />
}<br />
outlet(0, &#8220;store&#8221;, supplier); // supply the entry to coll<br />
}<br />
supplier.length = 0;<br />
count = 0;<br />
}<br />
} else {<br />
supplier[count] = warehouse[i];<br />
count++;<br />
}<br />
}<br />
if(supplier.length > 1) {<br />
if(typeof(supplier[0]) == &#8220;number&#8221;) {<br />
supplier[0] = supplier[0].toFixed(0);<br />
}<br />
outlet(0, &#8220;store&#8221;, supplier); // supply the entry to coll<br />
}</p>
<p>}<br />
dump.immediate = 1;</p>
<p>function clear()<br />
{<br />
warehouse.length = supply.length = count = index = 0;<br />
}<br />
clear.immediate = 1;</p>
<p>&#8212;</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-144947</guid>
					<title><![CDATA[Re: [sharing is fun] store coll in pattr]]></title>
					<link>http://cycling74.com/forums/topic/sharing-is-fun-store-coll-in-pattr/#post-144947</link>
					<pubDate>Tue, 16 Nov 2010 17:29:58 +0000</pubDate>
					<dc:creator>11olsen</dc:creator>

					<description>
						<![CDATA[
						<p>can someone give me a hint how do i use this js to save and restore a coll with an ableton live set. watched at the .maxhelp file above, is the whole preset saving thing needed for that? (do not want to save an extra .json file) </p>
<p>do i have to harvest the coll contents everytime the coll changes?<br />
do i have to use a loadbang somwhere to load the coll content when live set is loaded?</p>
<p>or should i go with a pure max solution (coll -> text ->pattr) for this task?</p>
<p>cheers, olsen</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

