[PD] shell pipe to signal]
august
august at develop.ment.org
Wed Dec 21 17:09:21 CET 2005
Federico Bonelli say:
> Hallo,
>
> I would like to pass some data from a shell to a pd patch that is on
> another machine in the subnetwork. I have solved most of the troubles
> using nc in the form
> > more junk | nc 146.50.10.35 9000
> and putting my patch with netsreceive on port 9000.
>
> My problem is rather banale for you guys, but i had not find a
> solution in the archives of the list...
>
> but how do i translate these data (floating point values in between
> 0 and 1) in audio signal? The data represents a 8khz sample of sound....
fredd,
what you want to do sounds pretty interesting.
some tips: as far as I can remember, you will want to add ";" to all of
your values that you send over the net. the ";" is Pd's end of line
character and I believe netreceive will expect one for each value.
on the pd end, you probably want something like this:
[netreceive 9000 1]
|
[$1 10(
|
[line~]
|
[dac~]
for that example, inorder to hear something, you would want to scale your original data to be in the range of -1.0 <-> 1.0 (not 0.0 <-> 1.0)
but, I just tried it now and can't seem to get nc to send more than just
the first value.
I try: cat file.txt | nc -uv localhost 9000
(the "-u" is for udp)
the file.txt looks like this:
0.41;
0.31;
0.31;
0.21;
0.11;
but "nc" seems to hang with the first value of 0.41, not sending the
rest.
best of luck.
-august.
------------------
http://aug.ment.org
More information about the Pd-list
mailing list