XML Feeds

.

[java-dev] jit.glue confusion

Wesley Smith wesley.hoke at gmail.com
Thu Nov 1 22:51:02 MDT 2007


I'm not sure that glue and scissors work in scripting.  You can do
exactly the same thing by use the src/dstdim attrs of jit.matrix
though.

wes

On 11/1/07, Mike <djiamnot at gmail.com> wrote:
>
> Hi,
>
> from my last lesson I learned that jitter objects that require multiple input matrices need to have an array of jitter matrices as input to the .matrixcalc method.
>
> so I have :
>
> int INSTANCES=4;
>
> JitterMatrix tiles=new JitterMatrix[INSTANCES];
> JitterObject glue=new JitterObject("jit.glue");
> public void setup(){
> players=new StripsPlayer[INSTANCES];
> tiles=new JitterMatrix[INSTANCES];
> out=new JitterMatrix("FloorOut",4,"char",24,24);
> glue=new JitterObject("jit.glue");
> glue.send("rows", 2);
> glue.send("columns",2);
> for (int i=0;i<INSTANCES;i++){
> players[i]=new StripsPlayer(i);
> tiles[i]=new JitterMatrix("tile_"+i,4,"char",12,12);
> tiles[i].setAdapt(1);
> }
> }
>
> public void bang(){
> for (int i = 0; i < INSTANCES; i++) {
> tiles[i].frommatrix(players[i].playStrip());
> }
> glue.matrixcalc(tiles, out);
> outlet(0,"jit_matrix",out.getName());
> }
>
> Problem?
> all I get is a matrix with only one of the tiles (tile[0]) playing (i.e. only the first quater of the output window is occupied).
>
> Note that playStrip()method returns a valid JitterMatrix.
> now, when i plug these things into inlets (bypassing glue) I get correct content out of 4 outlets.
>
> am i doing something wrong?
>
> m.
> --
> --
> TBD
> _______________________________________________
> java-dev mailing list
> java-dev at cycling74.com
> http://www.cycling74.com/mailman/listinfo/java-dev
>


More information about the java-dev mailing list