<?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: jit.qt.movie &#8211;&gt; videoplane &#8211;&gt; window in JS problems</title>
		<atom:link href="http://cycling74.com/forums/topic/jit-qt-movie-videoplane-window-in-js-problems/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/jit-qt-movie-videoplane-window-in-js-problems/feed</link>
		<description></description>
		<pubDate>Mon, 17 Jun 2013 23:20:25 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/jit-qt-movie-videoplane-window-in-js-problems/#post-66860</guid>
					<title><![CDATA[jit.qt.movie &#8211;&gt; videoplane &#8211;&gt; window in JS problems]]></title>
					<link>http://cycling74.com/forums/topic/jit-qt-movie-videoplane-window-in-js-problems/#post-66860</link>
					<pubDate>Tue, 05 Mar 2013 02:57:42 +0000</pubDate>
					<dc:creator>mattyo</dc:creator>

					<description>
						<![CDATA[
						<p>Greetings, hive mind,</p>
<p>I&#8217;m attempting to write a moviebank type thing in js, based on the moviebank example, with two main differences:</p>
<p>1. the movies all play simultaneously (not the biggest deal, I think)<br />
2. each movie has its own videoplane, and those are offset relative to each other in a window</p>
<p>I&#8217;m not getting the planes to show up, although as far as I can tell, movies are successfully loading into the jit.qt.movie objects, and nothing seems out of order with instantiating my videoplanes.  I suspect I&#8217;m doing something wrong in the bang() function, but my researches so far have yet to provide me with an answer.  I&#8217;d appreciate it if someone could have a look for me&#8230;</p>
<p>Thanks!</p>
<p>JS: (moviebank.js)</p>
<p>//moviebank.js</p>
<p>autowatch = 1;</p>
<p>outlets = 3;</p>
<p>var window = new JitterObject(&#8220;jit.window&#8221;,&#8221;window&#8221;);<br />
window.size = [1280, 320];</p>
<p>var render = new JitterObject(&#8220;jit.gl.render&#8221;,&#8221;window&#8221;);</p>
<p>var vdim = [320,240];<br />
var vindex = 0;<br />
var vcount = 0;<br />
var movArray = new Array();		//jit.qt.movie objects<br />
var outMatrix = new Array();	// intermediate matrices &#8212; I don&#8217;t even know if I need these&#8230;<br />
var planeArray = new Array();	//videoplanes<br />
var dummymatrix = new JitterMatrix(4,&#8221;char&#8221;,vdim[0],vdim[1]);<br />
var filenames = new Array();</p>
<p>// I think my error is in here &#8212; in theory, I&#8217;m passing the movies to the matrices, and then using the matrix name to assign it to the videoplane</p>
<p>function bang() {</p>
<p>		render.erase();<br />
		for(var i = 0; i<outmatrix .length;i++){<br></outmatrix>
			movArray[i].matrixcalc(outMatrix[i]/*null*/,outMatrix[i]);<br />
			planeArray[i].jit_matrix(outMatrix[i].name);<br />
			planeArray[i].draw();<br />
			}<br />
		render.drawswap();<br />
}</p>
<p>/*<br />
function index(i)<br />
{<br />
	if (i>=vcount)<br />
		i = vcount-1;<br />
	if (i&lt;0)<br />
		i = 0;</p>
<p>	movArray[vindex].stop();<br />
	vindex = i;<br />
	movArray[vindex].start();<br />
}<br />
*/</p>
<p>function readfolder(foldername)<br />
{<br />
	var fold;<br />
	var i,rv;</p>
<p>	fold = new Folder(foldername);<br />
	fold.typelist = ["MooV","PICT","MPEG","GIFf","JPEG","PNG","TIFF","SWFL","8BPS","BMP","VfW"]<br />
	if (fold.count) {<br />
		// reset old movies<br />
		for (i=0;i<vcount ;i++) {<br></vcount>
			movArray[i].dispose();<br />
			movArray[i].matrixcalc(dummymatrix/*null*/,dummymatrix);<br />
		}<br />
		// build filename array<br />
		vcount = 0;<br />
		fold.reset();<br />
		filenames = new Array();<br />
		outlet(1,&#8221;clear&#8221;);  //clears menu, which we probably don&#8217;t need<br />
		// load new movies<br />
		for (i=0;i<fold .count;i++) {<br></fold>
			fold.next();<br />
			filenames[vcount] = fold.pathname + &#8220;/&#8221; + fold.filename;<br />
			movArray[vcount] = new JitterObject(&#8220;jit.qt.movie&#8221;);<br />
// add movie attributes here<br />
			movArray[vcount].vol = 0;<br />
			movArray[vcount].colormode = &#8220;uyvy&#8221;;<br />
			movArray[vcount].unique = 1;</p>
<p>			rv = movArray[vcount].read(filenames[vcount]);<br />
			if (rv[1]==1) { // success, read returns an array [filename,success]</p>
<p>			// create intermediate matrices and videoplanes</p>
<p>					outMatrix[vcount] = new JitterMatrix(4,&#8221;char&#8221;,vdim[0],vdim[1]);<br />
					planeArray[vcount] = new JitterObject(&#8220;jit.gl.videoplane&#8221;, &#8220;render&#8221;);<br />
// add plane attributes here<br />
					planeArray[vcount].transform_reset = 2;<br />
					planeArray[vcount].colormode = &#8220;uyvy&#8221;;<br />
					planeArray[vcount].automatic = 0;<br />
					planeArray[vcount].rotatexyz[0,0,90];<br />
					planeArray[vcount].scale[0.2,0.2,1];<br />
					planeArray[vcount].color[1,1,1,1];</p>
<p>//position planes here &#8212; this is sloppy, but not the problem&#8230;</p>
<p>						var max = -6;<br />
						var offset = .4;<br />
						var pos = (max+ (vcount * offset));<br />
						planeArray[vcount].postion = [pos, 0., 0.];<br />
						post(&#8220;nposition &#8221; , pos, &#8220;vcount &#8221; , vcount);</p>
<p>				outlet(1,&#8221;append&#8221;,fold.filename);<br />
				movArray[vcount].loadram;<br />
				movArray[vcount].matrixcalc(outMatrix[vcount]/*null*/,outMatrix[vcount]);<br />
				vcount++;<br />
			}<br />
		}<br />
		if (vindex>=vcount)<br />
			vindex = 0;<br />
//		movArray[vindex].matrixcalc(outMatrix[vindex]/*null*/,outMatrix[vindex]);<br />
		outlet(2,vcount);<br />
	}<br />
}</p>
<p>function dim(width,height)<br />
{<br />
	vdim[0] = width;<br />
	vdim[1] = height;<br />
	for (i=0;i<vcount ;i++) {<br></vcount>
		outMatrix[i].dim = vdim;<br />
	}<br />
	dummymatrix.dim = vdim;<br />
}</p>
<p>/*<br />
function anything()<br />
{<br />
	//pass off all other messages to the movie object<br />
	var a = arrayfromargs(arguments);<br />
	if (Function.prototype.isPrototypeOf(movArray[vindex][messagename])) {<br />
		movArray[vindex][messagename](a);<br />
	} else {<br />
		movArray[vindex][messagename] = a;<br />
	}<br />
}</p>
<p>*/</p>
<p>Patcher:</p>
<pre><code>
----------begin_max5_patcher----------
991.3oc0XssjZiCD8Y3qvKOy5XYysYea+.xWPpTTx1M1Brk7JICSHU92WcwF
PCCFCgYJxK3RG0Rp6S2p6V7ygCFEydEDi79Guu4MXvOGNXfARCLnY7fQk3WS
JvBiXiRXkk.UNZrcNI7pzfWvvodBVI3UBoDr2JBWH+qVwpvxjbBMaIGRj1iK
L5E+fwdnn.ymo1OK7C79dyhHolclEu9uCCa2oULpjhKAyTekQwIr1on0krZY
AHMZZP6B3Ywlw9AmrEBxdyV7xAT0pIz1EizX+Z3P8Oi6IyTBBANCNiYvUU.M
0aWN.E9krssBTPnPBqlZjJpChBEpolnf45OVdJ5R7TvMySnFTKj7GUf8XGM5
vAzCBK7NHr0Do+pJQVMoqvjWr1q4yBqwO48Mdzha13CunwO9FIf6IhItVJYz
NL9nH6cCj9SXP6uuqwO+FcuwXZ1QK7CK5Oo.v7tLw.qYEgNFcilcAab5ePQ2
TXmRmOiOzA86HzT1ttB5mL0DnOyvFAclZb9iKn2DR7YD3WqJgT2g8iPH+opf
hIVK2xCWLx+8y48ubBt33YvU3RfuDn33B3zBDtjSzkHGhtnWWIFT57KQSlG0
FxQjPonkYiwEMI+8FMV+SbANUYztXrMPteRcLThq7WWkcXlDPs735xJ+J5In
4jBhvUPVAiGi4B+JRhzEVrSyzuyD1RSmsMV3JGoUkqTgtTG09.JZpKNGKxkf
P5flRD4fvEhsG3tHaSqS17Fo1tQQoNPqp2ueYBgqRx3n9YXEGj4JKK2c3dF0
UfJLkohRvK0NfkZOvobMGSbsZdB1cLjdlSVjSbMdQMU.RGcUxwIaPNRYfBeK
zpUjDGricT7wmFmC3zUrhTf64+EyMVP7ESmdcbMdlaGdQckFa50uD+akY+s2
N+8yuWWFCcUYalIqksD9zNqcG8HSfEdkDXt086MEgdbk.+OkgvYdgWsquoyN
96k3tvGVbycRL2SrijkkU.Wuq2nq222jaOBA0UDxiKUxkZ.R3oRYQ.EcuoCF
XdSOuK5QKPnatEnnN66+laApATf2BoKUZjxJVhkRNQ0gu840CNPRpcjT.Gzx
Cbg+ZQitdAeoYNiO3g8xzZIyzSfG5pdBzbimX9jNaPG8DzftYclWW+l+XCis
owcoJAqlmzdpMkh7NZdopFXHTrjndo1QYPNxjSRSA5o23Tc4ncboG7bm4x5q
1nOIzUzF8y9OQnOR0IrOjyhOO1Y9ykypWwNAOUAOelpC5oxaE9ToMS5g1D9o
oMQ8TatmrN1Lz3pps.WzrkFEQU1ZMiqGNarYHgZGZ1Q0iP1RZkewP8t8qg+O
FKVY0B
-----------end_max5_patcher-----------
</code></pre>						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/jit-qt-movie-videoplane-window-in-js-problems/#post-240665</guid>
					<title><![CDATA[Re: jit.qt.movie &#8211;> videoplane &#8211;> window in JS problems]]></title>
					<link>http://cycling74.com/forums/topic/jit-qt-movie-videoplane-window-in-js-problems/#post-240665</link>
					<pubDate>Tue, 05 Mar 2013 11:37:15 +0000</pubDate>
					<dc:creator>Jeremy Bernstein</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Matthew,</p>
<p>Your render and window are named &#8220;window&#8221; (I would choose a different name to avoid potential collisions, but that&#8217;s just me), but your videoplanes are named &#8220;render&#8221;. I haven&#8221;t tested your JS with that fix, but it seems like the most likely culprit on a quick scan.</p>
<p>Jeremy</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/jit-qt-movie-videoplane-window-in-js-problems/#post-240666</guid>
					<title><![CDATA[Re: jit.qt.movie &#8211;> videoplane &#8211;> window in JS problems]]></title>
					<link>http://cycling74.com/forums/topic/jit-qt-movie-videoplane-window-in-js-problems/#post-240666</link>
					<pubDate>Tue, 05 Mar 2013 13:40:54 +0000</pubDate>
					<dc:creator>mattyo</dc:creator>

					<description>
						<![CDATA[
						<p>Jeremy!</p>
<p>I&#8217;m too stupid to live, obviously.  This is why I never get called back for those jobs at Google. I had the same problem in high-school math &#8212; I understood the logic, but let the details slip through&#8230;.</p>
<p>Thanks, Jeremy.</p>
<p>M</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

