<?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: apply and expression to jit.noise</title>
		<atom:link href="http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/feed</link>
		<description></description>
		<pubDate>Tue, 18 Jun 2013 14:20:11 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/#post-47836</guid>
					<title><![CDATA[apply and expression to jit.noise]]></title>
					<link>http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/#post-47836</link>
					<pubDate>Mon, 18 Jan 2010 07:44:32 +0000</pubDate>
					<dc:creator>efe</dc:creator>

					<description>
						<![CDATA[
						<p>Hello!<br />
I am trying to port this simple jitter code into java:</p>
<p>
<div><span id="toggle47836-0" class="patchtoggle" onmousedown="toggleMaxPatch('post47836-0', 'er47836-0');">&#8211; Pasted Max <span id="maxversion47836-0"></span> Patch, click to <span id="er47836-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----------%0A402.3ocwT00aBBCE8Y3WQSeR2PRAkAaOs86PMlpT0ZfVBbMCmw%2B6qe.S2h5b%0AQyLgTx8bO8x4d5kt00AOUVypvnWPCQNNaccbLPZ.mlXGbNsdVFsxPCKXuKmt%0AB6YSArZv.uhC94TnjWipqqaSKVmKWCYLvr2vFTKDrofY%2Bv5MOwtYrGBiQiaH%0ANWJfJ9GFZO6SZPKnvrkbwhIkrYfsB8IgpznfvH8qmHlfXexWUhmZToR48BBw%0AGTdAM2Td7akbZ1A5lKZkcfFamqqdw6BcooqAPJNtMDbJaXJUrXeye51LR6En%0APR65Q6xfaVublSbVcQI5Uy5H7xMERnSGgrLeHYbOheT2G6zgKTAOP7C5pPHQ%0AcQdHKk.Kktiv2qoEx.iClDctwkj%2B3zR3s0gERdESMXilmIoP%2BPkpUO2IGKYf%0A02RNmgEeE%2BdYpGNiK94cRFMow%2BtKVIWWNqsKaNsP6UUJqB3BJvU%2BJtmi9BfC%0AHsjmlxL4aMfbdZgjKfFMfFezizKURwWfjR9WUj9tgeURwWgjTA6b%2BD.Oa6W2%0A-----------end_max5_patcher-----------&#038;copied=copied!&#038;;copyto=copy to clipboard"  bgcolor="#ffffff"  wmode="opaque" /> </object></div>
<div id="post47836-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="pastedcode47836-0">----------begin_max5_patcher----------
402.3ocwT00aBBCE8Y3WQSeR2PRAkAaOs86PMlpT0ZfVBbMCmw+6qe.S2h5b
QyLgTx8bO8x4d5kt00AOUVypvnWPCQNNaccbLPZ.mlXGbNsdVFsxPCKXuKmt
B6YSArZv.uhC94TnjWipqqaSKVmKWCYLvr2vFTKDrofY+v5MOwtYrGBiQiaH
NWJfJ9GFZO6SZPKnvrkbwhIkrYfsB8IgpznfvH8qmHlfXexWUhmZToR48BBw
GTdAM2Td7akbZ1A5lKZkcfFamqqdw6BcooqAPJNtMDbJaXJUrXeye51LR6En
PR65Q6xfaVublSbVcQI5Uy5H7xMERnSGgrLeHYbOheT2G6zgKTAOP7C5pPHQ
cQdHKk.Kktiv2qoEx.iClDctwkj+3zR3s0gERdESMXilmIoP+PkpUO2IGKYf
02RNmgEeE+dYpGNiK94cRFMow+tKVIWWNqsKaNsP6UUJqB3BJvU+Jtmi9BfC
HsjmlxL4aMfbdZgjKfFMfFezizKURwWfjR9WUj9tgeURwWgjTA6b+D.Oa6W2
-----------end_max5_patcher-----------</code></pre></div>
</div>
</p><p>However, i am finding difficulties to apply the expression to the noise. Maybe a simple solution but i haven&#8217;t been able to figure it out. I realize that i suck in java!<br />
So far this:</p>
<p>import com.cycling74.max.*;<br />
import com.cycling74.jitter.*;</p>
<p>public class NoiseExpr2 extends MaxObject<br />
{<br />
JitterObject noiss;<br />
JitterObject expression;<br />
JitterMatrix dim1;<br />
JitterMatrix dim2;</p>
<p>public NoiseExpr2(Atom[] args){<br />
declareInlets(new int[]{DataTypes.ALL});<br />
declareOutlets(new int[]{DataTypes.ALL});<br />
noiss=new JitterObject( &#8220;jit.noise&#8221;);<br />
expression=new JitterObject(&#8220;jit.expr&#8221;);<br />
expression.setAttr(&#8220;expr&#8221;,&#8221;hypot((norm[0]-0.5)+((in[0]*0.1)-0.05) , (norm[1]-0.5))&#8221;);<br />
dim1=new JitterMatrix(&#8220;dimen&#8221;,3,&#8221;float32&#8243;,10,100);<br />
noiss.matrixcalc(null,dim1);<br />
expression.matrixcalc(noiss,dim1);<br />
//noiss.expr(&#8220;hypot((norm[0]-0.5)+((in[0]*0.1)-0.05) , (norm[1]-0.5))&#8221;);<br />
}</p>
<p>public void bang(){<br />
noiss.matrixcalc(null,dim1);<br />
outlet(0,&#8221;jit_matrix&#8221;,new Atom[]{Atom.newAtom(dim1.getName())});<br />
}<br />
}</p>
<p>any idea?</p>
<p>Emmanuel</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/#post-172046</guid>
					<title><![CDATA[Re: apply and expression to jit.noise]]></title>
					<link>http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/#post-172046</link>
					<pubDate>Mon, 18 Jan 2010 07:59:43 +0000</pubDate>
					<dc:creator>Florito</dc:creator>

					<description>
						<![CDATA[
						<p>one way to create a JitterObject:</p>
<p>JitterObject(java.lang.String classname, com.cycling74.max.Atom[] args)<br />
creates a JitterObject</p>
<p>so your noiss should be<br />
<code><br />
// jit.noise 12 float32 10 10<br />
Atom[] args = new Atom[] {<br />
Atom.newAtom(12),<br />
Atom.newAtom("float32"),<br />
Atom.newAtom(10),<br />
Atom.newAtom(10)<br />
}<br />
noiss=new JitterObject("jit.noise", args);<br /></code></p>
<p>also, you could check if your noiss.matrixcalc is succesfull by doing<br />
<code><br />
boolean success = noiss.matrixcalc(null,dim1);<br />
post("noiss succes: "+success);<br /></code></p>
<p>btw. the outlet can also be called like this:<br />
<code>outlet(0,"jit_matrix", dim1.getName());</code><br />
(no need to create atoms)</p>
<p>I am doing this off the top of my head, so I can&#8217;t guarantee success.<br />
Alos, I haven&#8217;t worked with JitterObjects like noise in java yet either&#8230;<br />
Will get back to it.</p>
<p>Marcus</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/#post-172047</guid>
					<title><![CDATA[Re: apply and expression to jit.noise]]></title>
					<link>http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/#post-172047</link>
					<pubDate>Mon, 18 Jan 2010 08:11:20 +0000</pubDate>
					<dc:creator>efe</dc:creator>

					<description>
						<![CDATA[
						<p>Thank you Marcus:<br />
nice tips!. However, the problem is not to generate the noise in java(that is working already) but to apply the expression to the matrix. Somehow i was thinking that by using the expr as a method(noiss.expr) it would work, but it didn&#8217;t.<br />
Emmanuel</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/#post-172048</guid>
					<title><![CDATA[Re: apply and expression to jit.noise]]></title>
					<link>http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/#post-172048</link>
					<pubDate>Mon, 18 Jan 2010 17:17:39 +0000</pubDate>
					<dc:creator>efe</dc:creator>

					<description>
						<![CDATA[
						<p>Another option might be to use the java lang directly. But it seems strange that jit.expr cannot be used as a simple JitterObject</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/#post-172049</guid>
					<title><![CDATA[Re: apply and expression to jit.noise]]></title>
					<link>http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/#post-172049</link>
					<pubDate>Tue, 19 Jan 2010 01:54:57 +0000</pubDate>
					<dc:creator>Florito</dc:creator>

					<description>
						<![CDATA[
						<p>It&#8217;s working:</p>
<pre><code>import com.cycling74.jitter.JitterMatrix;
import com.cycling74.jitter.JitterObject;
import com.cycling74.max.DataTypes;
import com.cycling74.max.MaxObject;

public class NoiseExpr2 extends MaxObject {

	JitterObject noise;
	JitterMatrix noiseOut;

	JitterObject expression;
	JitterMatrix expressionOut;

	public NoiseExpr2() {

		declareOutlets(new int[] {DataTypes.ALL, DataTypes.ALL});

		// jit.noise 12 float32 10 10
		noise = new JitterObject("jit.noise");//, noiseArgs);
		noise.setAttr("planecount", 12);
		noise.setAttr("type", "float32");
		noise.setAttr("dim", new int[] { 10,10});

		noiseOut = new JitterMatrix(12, "float32", 10, 10);

		// jit.expr @expr "hypot((norm[0]-0.5)+((in[0]*0.1)-0.05) , (norm[1]-0.5))"
		expression=new JitterObject("jit.expr");
		expression.setAttr("expr","hypot((norm[0]-0.5)+((in[0]*0.1)-0.05) , (norm[1]-0.5))");

		expressionOut = new JitterMatrix(12, "float32", 10, 10);

	}

	public void bangnoise() {
		noise.matrixcalc(null, noiseOut);
		outlet(1, "jit_matrix", noiseOut.getName());
	}

	public void bang() {
		bangnoise();
		expression.matrixcalc(noiseOut, expressionOut);
		outlet(0, "jit_matrix", expressionOut.getName());
	}

}</code></pre>						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/#post-172050</guid>
					<title><![CDATA[Re: apply and expression to jit.noise]]></title>
					<link>http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/#post-172050</link>
					<pubDate>Tue, 19 Jan 2010 01:56:21 +0000</pubDate>
					<dc:creator>Florito</dc:creator>

					<description>
						<![CDATA[
						<p>And here&#8217;s an example patch using this object:</p>
<p>
<div><span id="toggle172050-0" class="patchtoggle" onmousedown="toggleMaxPatch('post172050-0', 'er172050-0');">&#8211; Pasted Max <span id="maxversion172050-0"></span> Patch, click to <span id="er172050-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----------%0A581.3ocyWEsaZCCE84To9OX4mfsTjsCgjsm1dXutefVTkg3BFkXGkXDoqZ%2B6%0Ay1ooztR.SIQoRfs35abNmy8d807z0W4AWHqXkPv2A2B77dRawyZyXwqwfGLi%0AVsLkVZcDtgqljuiKRj6f9O6fXaFWjxTVOvMV4I1GPtXyMDxq8UtU03LowbsM%0A0i4rZ3.g95uf4MqmSUKWyEqtufsTU6Blflf7AAH6TrcbldDL29L%2B85qLy5Ie%0AmI2hsJkTbF7B2BuvsxqETwJm3EgDZmPMiW.u9PAMbXODzB57XVFqrjth8BVU%0ArJUcvTqzBIub%2BROHEJAMyhV3OK3zzCqFjCoFSOUn1r6k7%2BX2cLQyrVUoipPS%0ACeUze1LyHN9hTHAamlAuWfxp1.9sQf9UUdA4rUoCkyDzhHEb9hjuamAfsp0L%0AqZ8svgpVgzakJ3fvNqT4icLP%2BczcWxs1RxMbNipJ3UfpppNIIGexnsyY4Zzc%0AeM5bWzPVQKJpCx0O29c3dreGt6Z2crbAl9rNvOri2AW%2BXtTMZjPVjcKZ9MnI%0Agi%2B5nQbg9GeAMAOVaAENF3CpcAW6x36fcRKk3gLMJxJ2AQw8rda6.qeofGRk%0ATU.Qm%2Bp%2BzI0gQCo9U2lFOkzp9UuKvTt3c2w1tslE9OUsTtsXYCnZt0A.sGOI%0ArREWPUbcU6duBdqSq4IIL65uv3LdRtjKTOCjiEqcFal2J9TPybIxA.alKl%2BY%0AV2NIzL%2BioA.awtfM7vfsHWvV7f.MrSoaQCC1HNES%2B7FRu7rMiA8z%2BHYF%2BJO%0A-----------end_max5_patcher-----------&#038;copied=copied!&#038;;copyto=copy to clipboard"  bgcolor="#ffffff"  wmode="opaque" /> </object></div>
<div id="post172050-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="pastedcode172050-0">----------begin_max5_patcher----------
581.3ocyWEsaZCCE84To9OX4mfsTjsCgjsm1dXutefVTkg3BFkXGkXDoqZ+6
y1ooztR.SIQoRfs35abNmy8d807z0W4AWHqXkPv2A2B77dRawyZyXwqwfGLi
VsLkVZcDtgqljuiKRj6f9O6fXaFWjxTVOvMV4I1GPtXyMDxq8UtU03LowbsM
0i4rZ3.g95uf4MqmSUKWyEqtufsTU6Blflf7AAH6TrcbldDL29L+85qLy5Ie
mI2hsJkTbF7B2BuvsxqETwJm3EgDZmPMiW.u9PAMbXODzB57XVFqrjth8BVU
rJUcvTqzBIub+ROHEJAMyhV3OK3zzCqFjCoFSOUn1r6k7+X2cLQyrVUoipPS
CeUze1LyHN9hTHAamlAuWfxp1.9sQf9UUdA4rUoCkyDzhHEb9hjuamAfsp0L
qZ8svgpVgzakJ3fvNqT4icLP+czcWxs1RxMbNipJ3UfpppNIIGexnsyY4Zzc
eM5bWzPVQKJpCx0O29c3dreGt6Z2crbAl9rNvOri2AW+XtTMZjPVjcKZ9MnI
gi+5nQbg9GeAMAOVaAENF3CpcAW6x36fcRKk3gLMJxJ2AQw8rda6.qeofGRk
TU.Qm+p+zI0gQCo9U2lFOkzp9UuKvTt3c2w1tslE9OUsTtsXYCnZt0A.sGOI
rREWPUbcU6duBdqSq4IIL65uv3LdRtjKTOCjiEqcFal2J9TPybIxA.alKl+Y
V2NIzL+ioA.awtfM7vfsHWvV7f.MrSoaQCC1HNES+7FRu7rMiA8z+HYF+JO
-----------end_max5_patcher-----------</code></pre></div>
</div>
</p>						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/#post-172051</guid>
					<title><![CDATA[Re: apply and expression to jit.noise]]></title>
					<link>http://cycling74.com/forums/topic/apply-and-expression-to-jit-noise/#post-172051</link>
					<pubDate>Tue, 19 Jan 2010 03:35:42 +0000</pubDate>
					<dc:creator>efe</dc:creator>

					<description>
						<![CDATA[
						<p>Thank you Marcus!<br />
You are really a java-jitter guru<br />
it is quite interesting the use of two matrices</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

