Thanks guys.<br><br><div><span class="gmail_quote">On 5/5/07, <b class="gmail_sendername">marius schebella</b> <<a href="mailto:marius.schebella@gmail.com">marius.schebella@gmail.com</a>> 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'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't have to resart pd. but I don'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's pid.<br>If it has stalled I can kill and restart it. I'm setting up my whole system as<br>a Linux daemon that runs in the background and handles patch control and
<br>input devices. It starts jack for me and connects all of my midi connections.<br>Currently, I'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 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. If anyone<br>is interested, I'm thinking of making a release available to try out. There is a client mode
<br>that will only handle the devices so multiple machines can send input info. (ahh OSC power).<br>It'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 ";pd").<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>"pd-" 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 "closebang" but I am not sure if that is about<br>shutting down pd or closing a patch. it should provide a clean shutdown.<br> maybe this affects serial connections? I don'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! </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>> Hi,<br>><br>> So this is my first post to the list.
<br>><br>> back story:<br>> I'm running pd in Linux on a small wearable computer. I do not<br>> use a screen, mouse, or keyboard, just an arduino box with a button<br>> and some other doo dads to control patch loading / activation.
<br>><br>> I've successfully automated pd in Windows using a python windows<br>> testing library to grab widgets and send keys to applications, but the Gnome<br>> alternative cannot see tcl/tk widgets ... I'm better off running without
<br>> a gui anyway. :P<br>><br>> I've hacked a quick controller patch using the ;open message for a show,<br>> but that was only<br>> a temp fix as I have no way to close patches from within pd ... or is
<br>> there? I do not<br>> want to have to open an entire set of patches at once as my machine only<br>> has 256 Mb of ram<br>> and, if I start using lots of samples, this could be a problem.<br>><br>> So now I'm exec launching and SIGINT'ing pd in C :
<br>> - lauch pd with the current patch and remember the process id<br>> - the patch contains an osc object to receive all of my controllers<br>> - sigint pd when I'm done (btw Whats the cleanest kill signal to send?)
<br>><br>> Now my questions are:<br>><br>> - Is there a built in way to close an open pd patch from within pd ...?<br>><br>> My thinking is that I can open pd with a small control patch that<br>> receives messages to open and close
<br>> patches.<br>><br>> - If not, has anyone made an automation object? Would anyone be<br>> interested if I attempted<br>> to write one?<br>><br>> - Does having a built-in method to do this provide any advantage over my
<br>> current solution of launching/killing pd?<br>><br>> The advantage I have now is that I can monitor the running status of pd<br>> so if it crashes, which it has done when using<br>> the aforementioned temp hack, I can safely kill and restart on the
<br>> current patch.<br>><br>> Thanks!<br>><br>> --<br>> Dan Wilcox<br>> danomatika<br>> <a href="http://www.robotcowboy.com">www.robotcowboy.com</a> <<a href="http://www.robotcowboy.com">http://www.robotcowboy.com
</a>><br>><br>><br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> <a href="mailto:PD-list@iem.at">PD-list@iem.at
</a> mailing list<br>> UNSUBSCRIBE and account-management -> <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>