Thanks guys.<br><br><div><span class="gmail_quote">On 5/5/07, <b class="gmail_sendername">marius schebella</b> &lt;<a href="mailto:marius.schebella@gmail.com">marius.schebella@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Daniel,<br><br>I don&#39;t know if it has advantages, but it is possoble to open/close<br>patches from another patch. Maybe an advantage would be that it is<br>faster, because you don&#39;t have to resart pd. but I don&#39;t know how to
<br>handle crashes... </blockquote><div><br>Currently, I call ps every now and then to get the status of pd using pd&#39;s pid.<br>If it has stalled I can kill and restart it.&nbsp; I&#39;m setting up my whole system as<br>a Linux daemon that runs in the background and handles patch control and
<br>input devices.&nbsp; It starts jack for me and connects all of my midi connections.<br>Currently, I&#39;m using udev to tell the daemon when a new device is connected<br>so it will start a new listener that sends OSC from the device&nbsp; or to shut it down
<br>on a removal (device = sdl joystick). That way, everything is plug and play since<br>I have no way of setting anything up without a gui and mouse/keyboard.&nbsp; If anyone<br>is interested, I&#39;m thinking of making a release available to try out.&nbsp; There is a client mode
<br>that will only handle the devices so multiple machines can send input info. (ahh OSC power).<br>It&#39;s all hackish alpha, but it is starting to work ...<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
anyway, have a look at<br>manuals/pd-msg/2.message_and_pd/2.open_close.pd</blockquote><div><br>I swear I went through the whole manual and didnt notice this! <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
you open a patch by using a message to pd (starting with &quot;;pd&quot;).<br>the first argument is open, the second the patchname and the third the<br>directory. to close you give the argument menuclose and then the prefix
<br>&quot;pd-&quot; and the patchname. some time ago it was not possible to use<br>abbreviations for directories (like a dot). maybe this works now. but<br>you can always use the full path name. regarding closing, many people
<br>are talking about a &quot;closebang&quot; but I am not sure if that is about<br>shutting down pd or closing a patch. it should provide a clean shutdown.<br>&nbsp;&nbsp;maybe this affects serial connections? I don&#39;t know. For me it worked
<br>the way I described it above and I had no problems.<br>[that is a message(<br>[;pd open mypatch.pd /home/marius/pd(<br>[;pd menuclose pd-mypatch.pd(</blockquote><div><br>Awesome .. I will have to try this out!&nbsp;</div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">marius.<br><br><br>Daniel Wilcox wrote:<br>&gt; Hi,<br>&gt;<br>&gt; So this is my first post to the list.
<br>&gt;<br>&gt; back story:<br>&gt; I&#39;m running pd in Linux on a small wearable computer.&nbsp;&nbsp;I do not<br>&gt; use a screen, mouse, or keyboard, just an arduino box with a button<br>&gt; and some other doo dads to control patch loading / activation.
<br>&gt;<br>&gt; I&#39;ve successfully automated pd in Windows using a python windows<br>&gt; testing library to grab widgets and send keys to applications, but the Gnome<br>&gt; alternative cannot see tcl/tk widgets ... I&#39;m better off running without
<br>&gt; a gui anyway. :P<br>&gt;<br>&gt; I&#39;ve hacked a quick controller patch using the ;open message for a show,<br>&gt; but that was only<br>&gt; a temp fix as I have no way to close patches from within pd ... or is
<br>&gt; there?&nbsp;&nbsp;I do not<br>&gt; want to have to open an entire set of patches at once as my machine only<br>&gt; has 256 Mb of ram<br>&gt; and, if I start using lots of samples, this could be a problem.<br>&gt;<br>&gt; So now I&#39;m exec launching and SIGINT&#39;ing pd in C :
<br>&gt; - lauch pd with the current patch and remember the process id<br>&gt; - the patch contains an osc object to receive all of my controllers<br>&gt; - sigint pd when I&#39;m done (btw Whats the cleanest kill signal to send?)
<br>&gt;<br>&gt; Now my questions are:<br>&gt;<br>&gt; - Is there a built in way to close an open pd patch from within pd ...?<br>&gt;<br>&gt; My thinking is that I can open pd with a small control patch that<br>&gt; receives messages to open and close
<br>&gt; patches.<br>&gt;<br>&gt; - If not, has anyone made an automation object? Would anyone be<br>&gt; interested if I attempted<br>&gt; to write one?<br>&gt;<br>&gt; - Does having a built-in method to do this provide any advantage over my
<br>&gt; current solution of launching/killing pd?<br>&gt;<br>&gt; The advantage I have now is that I can monitor the running status of pd<br>&gt; so if it crashes, which it has done when using<br>&gt; the aforementioned temp hack, I can safely kill and restart on the
<br>&gt; current patch.<br>&gt;<br>&gt; Thanks!<br>&gt;<br>&gt; --<br>&gt; Dan Wilcox<br>&gt; danomatika<br>&gt; <a href="http://www.robotcowboy.com">www.robotcowboy.com</a> &lt;<a href="http://www.robotcowboy.com">http://www.robotcowboy.com
</a>&gt;<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; <a href="mailto:PD-list@iem.at">PD-list@iem.at
</a> mailing list<br>&gt; UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a><br><br></blockquote></div><br><br clear="all"><br>-- 
<br>Dan Wilcox<br>danomatika<br><a href="http://www.robotcowboy.com">www.robotcowboy.com</a>