Archive

Archive for the ‘Uncategorized’ Category

Small lesson on setters, setcell!

Another way to think setcell messages to a matrix using java. So something like this:

setcell 1 1 plane 1 val 233

can be turned into the next, a small tiny thingie to play around:

import com.cycling74.max.*;
import com.cycling74.jitter.*;

public class SetcellBasic extends MaxObject{
JitterMatrix sc1 = new JitterMatrix(3,”char”,3,3);
int[] cells = new int[2];
int value;
int plane;

public SetcellBasic(){
declareInlets(new int[]{DataTypes.ALL});
declareOutlets(new int[]{DataTypes.ALL});

value = 0;
plane = 0;
}

public void setCells(int _x, int _y){
cells[0] = _x;
cells[1] = _y;

post(“the position of the cell is “+ cells[0] + ” ” + cells[1]);
}

public void setValue(int _value){
value = _value;
}

public void setPlane(int _plane){
plane = _plane;
}

public void bang(){
//remember that setcell(int[], int, int)
//also floats can be used as values
sc1.setcell(cells, plane, value);

outlet(0,”jit_matrix”, sc1.getName());
}
}

Now, if we want to port this into gl vectors we can do something like this:

import com.cycling74.max.*;
import com.cycling74.jitter.*;

public class Gldraw extends MaxObject{

JitterMatrix l2= new JitterMatrix(3,”float32″,2);
int[] cells = new int[2];
float x, y;

public Gldraw(){
declareInlets(new int[]{DataTypes.ALL});
declareOutlets(new int[]{DataTypes.ALL});
x = 0; y = 0;
cells[0]=0; cells[1] = 0;
}

public void setX(float _x){
x = _x;
}

public void setY(float _y){
y = _y;
}

public void resetValues(){
x = 0;
y = 0;
}

public void bang(){
int plane = 0;
l2.setcell(cells, plane, x);

plane = 1;
l2.setcell(cells, plane, y);

plane = 2;
l2.setcell(cells, plane, 0.0f);

outlet(0,”jit_matrix”, l2.getName());
}

}

Notice how each plane represents the x, y and z values. Remember that setters are our friends here!
Once in maxland we can provide the next command to our sketch object:

reset, drawmatrix [matrix name] [primitive]

A proper example very soon!

Categories: Uncategorized

How are we making ‘Apoptosis’?

I just posted some technical references about the way we are currently developing ‘Apoptosis’:

http://apoptosisproject.blogspot.com/2011/03/some-technical-thoughts.html

Categories: Uncategorized

Turbulence

September 24, 2009 Leave a comment

Here are some snapshots of the piece ‘Turbulence’. The music was written by Kasia Glowicka and the Premier was the 4th of October 2009, in Sweden. The piece was developed with the help of STEIM, Amsterdam.