hi all,
i recently got an old notebook (p2, 400mhz), i'd like to set up as a hard disk recorder ... i'd like to build a recording patch (wav / mp3 / ogg) and start it from the command line (i'd prefer not to run an x server on this machine) ...
but how is it possible to interact with pd without the gui or some kind of midi device? is it possible to send messages to pd from the command line (maybe via netsend/recieve or osc)
thnx...
Tim mailto:TimBlechmann@gmx.de ICQ: 96771783 -- The only people for me are the mad ones, the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn, like fabulous yellow roman candles exploding like spiders across the stars and in the middle you see the blue centerlight pop and everybody goes "Awww!" Jack Kerouac
If you open a port using a [netreceive] you can send any message to pd using the command line tools pdsend and pdreceive, or anything that can open a TCP port and send semicolon-terminated text to it. You could probably do this with OSC as well.
If you create a netreceive with a third argument, its like sending semi-colon-preceeded mesages i.e. [; msg( Here's an example:
[netreceive 4444 0 old]
4444 is the TCP port number, 0 means use TCP (1=UDP), and as for ''old" I am not sure exactly what the symbol does, I just know that its presense makes it send the messages into the global space. (Anyone know exactly what that symbol argument specifies?)
So to send messages to a [receive my_msgs] you would run this from the command line:
pdsend 4444 "my_msgs hello world;"
.hc
On Wednesday, Mar 24, 2004, at 16:13 America/New_York, Tim Blechmann wrote:
hi all,
i recently got an old notebook (p2, 400mhz), i'd like to set up as a hard disk recorder ... i'd like to build a recording patch (wav / mp3 / ogg) and start it from the command line (i'd prefer not to run an x server on this machine) ...
but how is it possible to interact with pd without the gui or some kind of midi device? is it possible to send messages to pd from the command line (maybe via netsend/recieve or osc)
thnx...
Tim mailto:TimBlechmann@gmx.de ICQ: 96771783 -- The only people for me are the mad ones, the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn, like fabulous yellow roman candles exploding like spiders across the stars and in the middle you see the blue centerlight pop and everybody goes "Awww!" Jack Kerouac
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
So to send messages to a [receive my_msgs] you would run this from the
command line:
pdsend 4444 "my_msgs hello world;"
this is actually not working ... pdsend reads from stdin ... i don't think this is very useful, expecially if you want to do write some shell scripts ... i'll try to edit the pdsend to be used like: pd <portnumber> [host] [udp|tcp] "msg_to_pd;"
cheers...
Tim mailto:TimBlechmann@gmx.de ICQ: 96771783 -- The only people for me are the mad ones, the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn, like fabulous yellow roman candles exploding like spiders across the stars and in the middle you see the blue centerlight pop and everybody goes "Awww!" Jack Kerouac
Hallo, Tim Blechmann hat gesagt: // Tim Blechmann wrote:
So to send messages to a [receive my_msgs] you would run this from the
command line:
pdsend 4444 "my_msgs hello world;"
this is actually not working ... pdsend reads from stdin ... i don't think this is very useful, expecially if you want to do write some shell scripts ... i'll try to edit the pdsend to be used like: pd <portnumber> [host] [udp|tcp] "msg_to_pd;"
There already are various alternatives to pdsend, for example the perl and Python scripts on pure-data.iem.at
Connecting to Pd is a simple socket-connection, for which you even could use something like netcat, so I'd see not much use in changing pdsend just to make scripting easier.
Frank Barknecht _ ______footils.org__
On Thu, 1 Apr 2004, Frank Barknecht wrote:
Tim Blechmann hat gesagt: // Tim Blechmann wrote:
pdsend 4444 "my_msgs hello world;"
this is actually not working ... pdsend reads from stdin ... i don't think this is very useful, expecially if you want to do write some shell scripts ...
Connecting to Pd is a simple socket-connection, for which you even could use something like netcat, so I'd see not much use in changing pdsend just to make scripting easier.
I don't understand; is there a problem or some difficulty with the following command?
echo my_msgs hello world ; | pdsend 4444
or is there with the following one?
pdsend 4444 <<EOF my_msgs hello world ; my_msgs hello world take deux ; my_msgs hello world again ; EOF
or my favourite:
( echo my_msgs hello world ; echo my_msgs hello world take deux ; echo my_msgs hello world again ; ) | pdsend 4444
Mathieu Bouchard http://artengine.ca/matju
Hallo, Mathieu Bouchard hat gesagt: // Mathieu Bouchard wrote:
On Thu, 1 Apr 2004, Frank Barknecht wrote:
Tim Blechmann hat gesagt: // Tim Blechmann wrote:
pdsend 4444 "my_msgs hello world;"
this is actually not working ... pdsend reads from stdin ... i don't think this is very useful, expecially if you want to do write some shell scripts ...
Connecting to Pd is a simple socket-connection, for which you even could use something like netcat, so I'd see not much use in changing pdsend just to make scripting easier.
I don't understand; is there a problem or some difficulty with the following command?
Not at all, IMO. Of course, it often is nice to be able to do a bit more structured (network) programing, for which I'd prefer something like Python anyway.
Frank Barknecht _ ______footils.org__
morning everyone,
On 1 April 2004 at 12:18:36, Frank Barknecht wrote:
Mathieu Bouchard hat gesagt: // Mathieu Bouchard wrote:
On Thu, 1 Apr 2004, Frank Barknecht wrote:
Tim Blechmann hat gesagt: // Tim Blechmann wrote:
pdsend 4444 "my_msgs hello world;"
I don't understand; is there a problem or some difficulty with the following command?
Not at all, IMO. Of course, it often is nice to be able to do a bit more structured (network) programing, for which I'd prefer something like Python anyway.
... if anyone's interested, i just uploaded some oo perl wrappers for communication via netsend/netreceive -- udp send isn't working, but it's another possibility...
http://www.ling.uni-potsdam.de/~moocow/projects/pd/Pd-Socket-0.01.tar.gz
marmosets, Bryan
On Thu, 1 Apr 2004, Bryan Jurish wrote:
... if anyone's interested, i just uploaded some oo perl wrappers for communication via netsend/netreceive -- udp send isn't working, but it's another possibility...
http://www.ling.uni-potsdam.de/~moocow/projects/pd/Pd-Socket-0.01.tar.gz
If anyone's interested, I just wrote a Ruby wrapper for communication via netsend and
ruby -rsocket -e'TCPSocket.open("localhost",4444){|s|s.print ARGV[0]}'
it's shorter than the URL for the Perl wrapper.
You just have to append a shell argument to the end, as in Tim Blechmann's proposal.
Mathieu Bouchard http://artengine.ca/matju
Hallo, Mathieu Bouchard hat gesagt: // Mathieu Bouchard wrote:
If anyone's interested, I just wrote a Ruby wrapper for communication via netsend and
ruby -rsocket -e'TCPSocket.open("localhost",4444){|s|s.print ARGV[0]}'
it's shorter than the URL for the Perl wrapper.
Okay, attached is my quick hack Python PdSender-object/script. Either call it directly for a nice command line interface to with history (if readline is available) or use it in a Python script like:
# --- from pdsender import PdSender pd = PdSender( "localhost", 3000 ) pd.send("something was sent;") # ---
It could be much shorter, probably as short as the Ruby example, if I didn't go for a bit of comfort with readline support and a nicer prompt.
Frank Barknecht _ ______footils.org__
On Thu, 1 Apr 2004, Frank Barknecht wrote:
Mathieu Bouchard hat gesagt: // Mathieu Bouchard wrote:
If anyone's interested, I just wrote a Ruby wrapper for communication via netsend and ruby -rsocket -e'TCPSocket.open("localhost",4444){|s|s.print ARGV[0]}' it's shorter than the URL for the Perl wrapper.
Okay, attached is my quick hack Python PdSender-object/script. Either call it directly for a nice command line interface to with history (if readline is available) or use it in a Python script like: from pdsender import PdSender pd = PdSender( "localhost", 3000 ) pd.send("something was sent;") It could be much shorter, probably as short as the Ruby example, if I didn't go for a bit of comfort with readline support and a nicer prompt.
Interesting. I can see however that it loads some kind of pdsender.py ... I don't have that file on my machine. However, my version for Ruby does not require any special modules, as it directly uses the Ruby socket library. Plus you can use it in irb (a nice command line interface with history and readline), like:
s = TCPSocket.open "localhost",4444 s.puts "hello world ;" s.flush s.puts "0 1 1 2 3 5 8 13 ;" s.flush
and so on. (or use s.sync=true, for automatic s.flush's)
Btw where do I download pdsender.py from ?
Mathieu Bouchard http://artengine.ca/matju
On Thu, 1 Apr 2004, Thomas Grill wrote:
Btw where do I download pdsender.py from ?
It was an attachment to Frank's mail.
WOOPS, I'm sorry, I didn't see the attachment.
Mathieu Bouchard http://artengine.ca/matju
I don't understand; is there a problem or some difficulty with the following command?
echo my_msgs hello world ; | pdsend 4444
well, ... i already wrote a small patch and commited it to the cvs ... maybe a bit to fast ... if you want, i can remove it again ...
cheers...
Tim mailto:TimBlechmann@gmx.de ICQ: 96771783 -- The only people for me are the mad ones, the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn, like fabulous yellow roman candles exploding like spiders across the stars and in the middle you see the blue centerlight pop and everybody goes "Awww!" Jack Kerouac
Hallo, Tim Blechmann hat gesagt: // Tim Blechmann wrote:
I don't understand; is there a problem or some difficulty with the following command?
echo my_msgs hello world ; | pdsend 4444
well, ... i already wrote a small patch and commited it to the cvs ... maybe a bit to fast ... if you want, i can remove it again ...
I didn't look at it yet, but I think it's better to remove it, if it introduces incompatibilities which aren't good here (because they might break others' shell scripts)
ciao
Frank Barknecht _ ______footils.org__
I didn't look at it yet, but I think it's better to remove it, if it introduces incompatibilities which aren't good here (because they might break others' shell scripts)
it's not breaking anything, but it's simply unnecessary ...
i've removed it ... sorry for all this useless traffic.
cheers...
Tim mailto:TimBlechmann@gmx.de ICQ: 96771783 -- The only people for me are the mad ones, the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn, like fabulous yellow roman candles exploding like spiders across the stars and in the middle you see the blue centerlight pop and everybody goes "Awww!" Jack Kerouac
On Thu, 1 Apr 2004, Tim Blechmann wrote:
I don't understand; is there a problem or some difficulty with the following command?
echo my_msgs hello world ; | pdsend 4444
well, ... i already wrote a small patch and commited it to the cvs ... maybe a bit to fast ... if you want, i can remove it again ...
Yes, please do so. We want to keep the differences small. The fact that all these "how to do it" messages popped up in no time shows that it is not difficult to use pdsend, probably its just a question of documentation.
Guenter
hi all,
i added a small feature to pdsend so that we can write shell scripts more easily:
pd <portnumber> [host] [udp|tcp] ["message;"] (before: pd <portnumber> [host] [udp|tcp])
if no message is given, it reads from stdin as before (note that you'll have to add a hostname and protocol to be able to write a message ... if not, it's looking for the corresponding hostname) ...
i hope, i'm not the only one who benefits from this feature ... cheers...
Tim mailto:TimBlechmann@gmx.de ICQ: 96771783 -- The only people for me are the mad ones, the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn, like fabulous yellow roman candles exploding like spiders across the stars and in the middle you see the blue centerlight pop and everybody goes "Awww!" Jack Kerouac
Hallo, Tim Blechmann hat gesagt: // Tim Blechmann wrote:
i recently got an old notebook (p2, 400mhz), i'd like to set up as a hard disk recorder ... i'd like to build a recording patch (wav / mp3 / ogg) and start it from the command line (i'd prefer not to run an x server on this machine) ...
but how is it possible to interact with pd without the gui or some kind of midi device? is it possible to send messages to pd from the command line (maybe via netsend/recieve or osc)
OSC is fine here. The helpfiles should be able to, well, help.
You might be interested in a recent development in the RRADical project, which now uses OSC to alleviate the problem, that GUI heavy patches disturb audio computation. For this, I extended the preset saving system Memento to not only be able to be set by OSC messages, but also to forward any state changes to an outlet. If this outlet is connected to an OSC sender, you can use the same RRADical patch both for controlling some other patch with OSC and to be controlled by OSC. Hard to explain in words, but you might look into the "tests" directory of the latest rradical-package for an example. (Beware: You need a full set of the CVS-externals) The example shows, how to run two Pd processes: one with "-nogui -realtime", the other with "-noaudio" but with GUI. The GUI Pd then is used to control the no-GUI Pd.
You can download rradical-work-in-progess here: http://footils.org/pkg/rradical-wip-040325.tgz
Frank Barknecht _ ______footils.org__