We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi,
I'm trying to send out a packet of data using OscP5 from processing to max/msp. I'm not sure why I'm getting this error message: ### [2013/10/9 16:43:30] ERROR @ UdpClient.send ioexception while sending packet.
It happens when I try to fill up an OscMessage (myMessage). I think it may have to do with the buffer size in the Osc object in Max. Here is the where I'm filling up myMessage:
for (int i = 0; i < no_vehicles; i++){
myPVectorlist.add(new PVector(vehicles.get(i).location.x,vehicles.get(i).location.y));
V[i] = (PVector) myPVectorlist.get(i);
for (int b = 1; b < columns+1; b++) {
for (int c = 1; c < rows+1; c++) {
if ((V[i].x > (b-1)*width/div) && (V[i].x < b*width/div) && (V[i].y > (c-1)*height/div) && (V[i].y < c*height/div)){
speak_arr[i][b][c] = pan_calc_11(V[i], center_1_1, max_dist);
myMessage.add(speak_arr[i][b][c]);
} else{
speak_arr[i][b][c] = 0.;
myMessage.add(speak_arr[i][b][c]);
}
}
}
}
(V[i].x and V[i].y just contain coordinate information) and speak_arr[][][] is just holds float values.
Here's how I had declared myMessage previously:
OscMessage myMessage = new OscMessage ("panning coefficients for agent 0");
My output is erratic as some of the data I'm trying to transmit to max goes through and other times I get this error message that stalls the program.
Any help would be awesome - as always, sorry for my ineptitude.
Answers
Hi, you have three nested loops adding data to the message. Is maybe the message too heavy? The amount of data it can contain is limited.
I would also rename the message as /panningCoeffAgent0. Spaces might cause trouble.
I agree with hamoid.
Try that points: