XML Feeds

.

[jitter] Re: Re: Problems with speed of patch using Expr and Matrix

Carl Knott carl.knott at gmail.com
Wed Aug 1 12:53:27 MDT 2007


For people who have a similar problem in the future, I solved it by  writing this algorithm...

JitterObject myexpr = new JitterObject("jit.expr");
		boolean result; 
		for(int i=0; i<NUMBER_OF_MODES; i++) {
			for(int j=1; j<NUMBER_OF_MODES; j++) { 
				jm[i][j] = new JitterMatrix(1, "float32",256, 256);	
				out[i][j] = new JitterMatrix(1, "float32",256, 256);
				myexpr.send("expr", CircleMembraneFormula[i][j]);
				result = myexpr.matrixcalc(jm[i][j],out[i][j]);
				post("RESULT: " + result);
			}
		}

I put it into my constructor, it just takes an extra couple of seconds to load the patch :)


Quote: andrewb at cycling74.com wrote on Wed, 01 August 2007 10:17
----------------------------------------------------
> One thing that hasn't been suggested is that you create one jit.expr 
> object for each expression you are going to use, and then a gate to 
> route the bang/matrix to the right one.  This will save you a lot of 
> processing time as you aren't having to evaluate the expression string 
> each time you switch.  Jit.expr should be no different from using the 
> equivalent jit.op objects when working with float32 matrices (in theory). 
> 
> Andrew B.
> 
----------------------------------------------------




More information about the jitter mailing list