I'm trying to get a data stream from a headtracking application (Facetrack Noir) into PD. Currently the best I could do was to get the first of a string of 6 doubles sent by Facetrack Noir. I tried both udpreceive and netreceive (netreceive set to udp mode using the "1" specifier). For some reason, only the netreceive works right now, not udpreceive (yes, mrpeach library is loaded).

I use the netreceive, and output to print and to an unpack object. I can see the data stream corresponding to the first data object in the UDP packet, both at the print and on the number box at the first output of the unpack. But nothing on the other number boxes at the outputs of unpack object.

[netreceive 5551 1]
|
|\
| \
| \
| \
| \
| \
| \
[print] [unpack f f f f f f ]
| | | | | | |

The Facetrack Noir (FTN) app is set to broadcast to localhost at port 5551, and is sending an ascii string with ";" separators. Here is the relevent code section from FTN:

sprintf_s(data, "%.2f;%.2f;%.2f;%.2f;%.2f;%.2f\n\0", FlightData.x, FlightData.y, FlightData.z, FlightData.p, FlightData.h, FlightData.r);

if (outSocket != 0) {

no_bytes = outSocket->writeDatagram((const char *) &data, strlen( data ), destIP, destPort);

if ( no_bytes > 0) {

qDebug() << "FGServer::writePendingDatagrams says: bytes send =" << data;

}

else {

qDebug() << "FGServer::writePendingDatagrams says: nothing sent!";

}

}

writeDatagram is using Qt 4.6.2.

Could it be the separator used? I can't find much documentation on how to use UDP in PD in general. Any help appreciated.

ADDED: I just saw that I am in fact seeing all 6 data items in the print stream, just not unpacking correctly.

Todd Welti