Network-setup: basic problem
Hi there,
I have a very basic question about netsend /netreceive (as it does not not work on my test-setting).
The aim: I'm working on an installation with 28 mono speakers, connected to computers. On bang, they have to start playing pre-recorded audiofiles.
The idea is to use [netsend Host_IP PortNumber] at my hostcomputer and [netreceive PortNumber 1] at all clients.
As long as Host and Client 1 are on the same machine, it's all fine.
The problem:
In my test-network with two computers (it works for several months: two mac osx, pd extended, already connected via lan-gigabit-switch, sharing same subnetmask and static ip-adresses) Client 2 (not running the Host) does not react.
I tried as seen in all helpfiles [netsend PortNumber 1] (as it works for Client 1): no reaction.
I tried to define the host-ip by inserting [netsend Host_IP PortNumber 1]: error: bad arguments for message 'netreceive' to object 'objectmaker' ... couldn't create.
What is the trick to let pd connect between two computers?
Thanks in advance,
phili2p
UDP for headtracking using netreceive
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
Netsend vs sendOSC
Is there a fundamental difference between netsend/netreceive and sendOSC/dumpOSC?
Does netsend and netreceive not work for OSC?
Netsend/Netreceive and MIDI
Hi Simon,
Fun idea - yes, it can be done (I found it usable on a wired Ethernet LAN). I'd recommend using UDP mode for the netsend/netreceive, since you're dealing with events and you want the lowest latency.
In the netreceive help patch, note that the "send foo" stuff is actually a message box, it's not a send object - that's why your receive doesn't see anything. Open the netsend and netreceive help patches, then click the "connect localhost 3001" message for netsend. Then, twiddle the number in the netsend patch and you should see the messages printed to the main Pd window.
If you hook up a number box to the netreceive's output and delete the "foo" from the netsend's message, you should see the number changing in the netreceive patch itself.
Hope this helps!
Sprintf and netsend for comma delimited UDP data
Hello,
This is my first post, please excuse any forum faux pas. 
I am building a connector for PD to communicate with an external application running on another system. I am using netsend to craft UDP packets that the remote application can parse for actions. The payload is supposed to look sort of like this:
(STRING,STRING,INTEGER,INTEGER,STRING,INTEGER)
Initially I was unable to get commas into the netsend stream because PD uses commas as in internal delimiter. I was able to circumvent this by using the cyclone external's 'sprintf' function. Like this:
|44|
|
|send (STRING%cSTRING%cINTEGER%cINTEGER%cSTRING%cINTEGER) |
|
|netsend|
this almost works, except that pd inserts whitespace characters after the commas, which the remote application doesn't understand.
I noticed that 'print' actually puts a space before and after the commas, whereas netsend (or sprintf) only puts one after the commas.
Does anyone know how to circumvent this behavior? Or, perhaps a simpler way to achieve what I am trying to do?
Thank you.
Florian
Sending message from PD to Matlab
Hi there,
the project I am currently working on involves synthesis of short samples and their playback. I intend to use PD as frontend for my synthesizer as well as for the playback of sounds. The synthesizer itself however is implemented in Matlab. I therefore should transmit my parameters to Matlab somehow. It was quite easy to generate a TCP object in Matlab and to receive the data in PD via netreceive. However, the other way round won't work. Both the PD netsend object and Matlab appear to be clients which require a host. While netreceive seems to provide this host for Matlab, netsend somehow doesn't. Has anyone every had this problem before or is there an alternative to a TCP/UDP connection?
Thanks in advance,
Alex
Networked Audio problems
I am trying to get either netsend~ or streamout~ to work. So far neither of them are working with their respective receive objects.
with netsend~ we're getting weird errors like sending too many channels, when we set it to 2. the error would say sending 47 channels or some other false information.
okay so here is the process
[format 8bit<
[connect xxx.xxx.xxx.xxx 8000<
compute audio
then on the receive side its says connected.
[env~] is reporting "nan"
then the boot
netsend~: send tag: software caused connection abort (10053)
with [streamout~] its reporting large numbers on the streamin side. Below is an example.
unknown format 0
unknown format 0
unknown format 0
unknown format 0
error: streamin~: got an invalid frame size of -large number, maximum is 256
[streamin~] is set with [reset 4<
any ideas, I would rather get netsend~ working as you can seemingly do multiple channels.
Netsend float?
The following error occurs, when i build a connection between the left outlet of
netreceive an the left inlet of netsend: error: netsend: no method for 'float'.
The received data are sent by an other application via localhost.
netreceive 6001 : receives floating point numbers, separated by semicolon
|
|
|
|
netsend 6002 : should send floating point numbers, separated by semicolon
Online mixing sound
@mcardoso said:
dont use osc! netsend/netreceive is much faster.
use php to write big blocks of data and netsend/netreceive to alert pd that info was sent!!
whats netsend/netreceive?
Online mixing sound
dont use osc! netsend/netreceive is much faster.
use php to write big blocks of data and netsend/netreceive to alert pd that info was sent!!