<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Thanks a bunch for this, it is, effectively, what I wanted to do with pdsend and pdreceive. The only problem now is sending a variable I've defined via this method, as opposed to the variable name, and I'm sure that's just 'cause I'm new to ruby.&nbsp;<br><br>&gt; Date: Thu, 25 Mar 2010 12:16:07 -0700<br>&gt; Subject: Re: [PD] any mac OS terminal experts?<br>&gt; From: aturley@acm.org<br>&gt; To: jbturgid@hotmail.com; pd-list@iem.at<br>&gt; <br>&gt; So first off, you don't need to call them with 'open' from the command<br>&gt; line. You can just run them directly like any other command, like<br>&gt; this:<br>&gt;   echo "a b c 1 2 3;" |<br>&gt; /Applications/Pd-extended.app/Contents/Resources/bin/pdsend 3939<br>&gt; The command reads the standard input and sends the data to PD.<br>&gt; <br>&gt; Assuming you have a PD patch running with a netrecieve object<br>&gt; listening to port 3939, you can send the same message as above with<br>&gt; this Ruby code:<br>&gt; <br>&gt;   require 'socket'<br>&gt;   hostname = "localhost"<br>&gt;   port = 3939<br>&gt;   s = TCPSocket.open(hostname, port)<br>&gt;   # don't forget the semicolon!<br>&gt;   s.puts("a b c 1 2 3;")<br>&gt;   s.close()<br>&gt; <br>&gt; andy<br>&gt; <br>&gt; On Thu, Mar 25, 2010 at 11:28 AM, Andrew Faraday &lt;jbturgid@hotmail.com&gt; wrote:<br>&gt; &gt; I mean both opening them in finder and using 'open pdsend' in the terminal,<br>&gt; &gt; same result. I'm not up to socket programming in Ruby. But knowing that it's<br>&gt; &gt; possible to communicate directly is a good start. Now, how do it do it?<br>&gt; &gt;<br>&gt; &gt;&gt; Date: Thu, 25 Mar 2010 11:13:12 -0700<br>&gt; &gt;&gt; Subject: Re: [PD] any mac OS terminal experts?<br>&gt; &gt;&gt; From: aturley@acm.org<br>&gt; &gt;&gt; To: jbturgid@hotmail.com<br>&gt; &gt;&gt; CC: pd-list@iem.at<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; You should be able to run them from the command line. When you say<br>&gt; &gt;&gt; that you are "opening the files", do you mean you're clicking on them<br>&gt; &gt;&gt; in the Finder? As you've said, that will just open up a terminal<br>&gt; &gt;&gt; window.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Also, these commands just communicate with strings over a TCP socket.<br>&gt; &gt;&gt; If you're comfortable with socket programming in Ruby then you don't<br>&gt; &gt;&gt; even have to use pdsend and pdreceive.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; andy<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; On Thu, Mar 25, 2010 at 10:55 AM, Andrew Faraday &lt;jbturgid@hotmail.com&gt;<br>&gt; &gt;&gt; wrote:<br>&gt; &gt;&gt; &gt; Hey All<br>&gt; &gt;&gt; &gt; I've recently started learning Ruby (on Ubuntu 9.04), part of what I'm<br>&gt; &gt;&gt; &gt; trying to do is control PD through ruby, using the terminal.<br>&gt; &gt;&gt; &gt; The main trouble I'm having now is that I'm mostly using a Mac OS X<br>&gt; &gt;&gt; &gt; machine<br>&gt; &gt;&gt; &gt; which doesn't recognize the 'pdsend' and 'pdreceive' commands (as the<br>&gt; &gt;&gt; &gt; linux<br>&gt; &gt;&gt; &gt; shell does). I've tried opening the files with these names in<br>&gt; &gt;&gt; &gt; /resources/bin<br>&gt; &gt;&gt; &gt; which open a new terminal window and display what looks like the<br>&gt; &gt;&gt; &gt; relevant<br>&gt; &gt;&gt; &gt; -help text. But I can't seem to use these to send messages to and from<br>&gt; &gt;&gt; &gt; pd<br>&gt; &gt;&gt; &gt; from the Mac OS terminal. (in theory I could then automate this with<br>&gt; &gt;&gt; &gt; Ruby).<br>&gt; &gt;&gt; &gt; Any ideas, at all?<br>&gt; &gt;&gt; &gt; ________________________________<br>&gt; &gt;&gt; &gt; Not got a Hotmail account? Sign-up now - Free<br>&gt; &gt;&gt; &gt; _______________________________________________<br>&gt; &gt;&gt; &gt; Pd-list@iem.at mailing list<br>&gt; &gt;&gt; &gt; UNSUBSCRIBE and account-management -&gt;<br>&gt; &gt;&gt; &gt; http://lists.puredata.info/listinfo/pd-list<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; ________________________________<br>&gt; &gt; Not got a Hotmail account? Sign-up now - Free<br>                                               <br /><hr />Do you want a Hotmail account? <a href='http://clk.atdmt.com/UKM/go/197222280/direct/01/' target='_new'>Sign-up now - Free</a></body>
</html>