jitter matrix input to javascript

Aug 1, 2011 at 4:56pm

jitter matrix input to javascript

i am getting into javascript, but its quite hard for me, without any programming background.. can someone help me, with getting values, from one plane, float matrix, with fixed dimension?
thanks tor help

Aug 1, 2011 at 9:31pm

unfortunately i don’t know much about jit.matrix… i would guess it will come as an array to javascript, than you will have to do a “for” loop in your script to go through all cells..

if you post a simple example patch, with a jit matrix being filled and than dumped out, would be super easy to help ( :

might be from your interested this simple javascript example i put in this topic, and surely would help you to understand some stuff in javascript: http://cycling74.com/forums/topic.php?id=25125

good luck in your programming journey !

Apr 27, 2013 at 10:35am

i am trying to learn some javascript and want to understand how to get a jitter-matrix input into js-code. As an example in the Jitter tutorial 46: In the attached JS-File there is a jit.noise object generated for the attractors.

// create a [jit.noise] object for attractor generation
var attgen = new JitterObject(“jit.noise”);
attgen.dim = ATTRACTOR_COUNT;
attgen.planecount = 3;
attgen.type = “float32″;

if I don’t want random attractor points, but generate a 3plane float32 matrix in Jitter, how can I then feed this jitter-generated-matrix into the JS-File and replace the jit.noise with it?

Apr 29, 2013 at 10:33pm

create a named jitter matrix in your patch:
[ jit.matrix mymatrix 4 char 80 60 ]

reference it in js:
var mat = new JitterMatrix("mymatrix");


You must be logged in to reply to this topic.