Problem with writing a matrix to jxf File and reading it back to Jitter
I still did not get an answer to my question so i try to edit my original post for better understanding and reproducing my Problem to hopefully some hints to my issue:
I am writing an jitter external for Max 9.0.8 with max-sdk-8.2.0:
Inside the external i am filling a 2x2x3 matrix and storing the matrix to brightnessTest.jxf in the Filesystem. After reading back into a matrix object i want to get the stored Values back in a jitter Patch.
While storing the values to the matrix with this code:
for (x->currentframe = 0; x->currentframe < 3; x->currentframe++) {
for (i = 0; i < x->nrOfCells; i++) {
yCellPos = i / x->cols;
xCellPos = i % x->cols;
brightness = 25. * i;
post("i: %ld", i);
post("x->currentframe: %ld, xPos: %ld, yPos: %ld", x->currentframe, xCellPos, yCellPos);
post("brightness: %f", brightness);
brightnessp = brightness_bp
+ xCellPos * sizeof(float)
+ yCellPos * sizeof(float) * (&brightness_minfo)->dim[0]
+ x->currentframe * sizeof(float) * (&brightness_minfo)->dim[0] * (&brightness_minfo)->dim[1];
*brightnessp = brightness;
}
}
The output to console looks fine (frames 0,1,2 are filled with values):

But when i try to read back the matrix values in the patch

it seems that only the first frame (frames 0) was read back correctly. At the second frame (frames 1) i only get 0. Values and the third frame (frames 2) i get no Values.
Hope anyone could give me a hint to solve my problem.
I have edited my original post from Aug 11 for better understanding my Problem. Hope that anyone can help me.