<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Inteface Pd with Shell scripts?]]></title><description><![CDATA[<p>Dear Forum,</p>
<p>I have many years worth of work on acoustic signal processing in the form of matlab codes and unix shell scripts. I would like to build an interface so that I can get numerical output from a MIDI trigger and feed those numbers into these scripts. Those scripts are set up to write .wav files which can be easily re-loaded into pd.</p>
<p>It seems that pd offers a perfect way to get a numerical value from a MIDI interface, but after a few hours scanning tutorials and message boards I don't see an obvious way to feed this number into a shell script. (Is there not an object that can execute a command at the command line interface when it recieves a bang? That is all I need!)</p>
<p>In effect I would like to use my pre-existing scripts as externals, but I don't want to have to migrate all my codes into C. (I know even less about coding in C than coding in pd).</p>
<p>My apologies if this query is trivial or non-sensical. I am very new to the world of Pure Data and I'd be appreciative if someone would just let me know if this idea is feasible or not.</p>
<p>Many thanks!<br />
James</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 17:37:40 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/7335.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 23 Apr 2013 22:14:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Tue, 23 Apr 2013 22:14:54 GMT]]></title><description><![CDATA[<p>Dear Forum,</p>
<p>I have many years worth of work on acoustic signal processing in the form of matlab codes and unix shell scripts. I would like to build an interface so that I can get numerical output from a MIDI trigger and feed those numbers into these scripts. Those scripts are set up to write .wav files which can be easily re-loaded into pd.</p>
<p>It seems that pd offers a perfect way to get a numerical value from a MIDI interface, but after a few hours scanning tutorials and message boards I don't see an obvious way to feed this number into a shell script. (Is there not an object that can execute a command at the command line interface when it recieves a bang? That is all I need!)</p>
<p>In effect I would like to use my pre-existing scripts as externals, but I don't want to have to migrate all my codes into C. (I know even less about coding in C than coding in pd).</p>
<p>My apologies if this query is trivial or non-sensical. I am very new to the world of Pure Data and I'd be appreciative if someone would just let me know if this idea is feasible or not.</p>
<p>Many thanks!<br />
James</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts</guid><dc:creator><![CDATA[Cobian]]></dc:creator><pubDate>Tue, 23 Apr 2013 22:14:54 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Tue, 23 Apr 2013 23:39:36 GMT]]></title><description><![CDATA[<p>Have you stumbled upon [shell]? it makes a trivial task of short script embedding in pd:</p>
<p>[echo 'hola mundo';(<br />
|<br />
[shell]<br />
|<br />
[print]</p>
<p>or then send a [./scriptthatiwroteinperl.pl;( to execute your perl code. I have found that sockets are more reliable for retrieving output then the stdout. I still don't understand why, really.</p>
<p>Happy hacking!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/2</guid><dc:creator><![CDATA[sunji]]></dc:creator><pubDate>Tue, 23 Apr 2013 23:39:36 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Tue, 23 Apr 2013 23:40:40 GMT]]></title><description><![CDATA[<p>[netsend] and [netreceive] are the tcp socket objects in pd, btw.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/3</guid><dc:creator><![CDATA[sunji]]></dc:creator><pubDate>Tue, 23 Apr 2013 23:40:40 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Wed, 24 Apr 2013 00:15:09 GMT]]></title><description><![CDATA[<p>Many thanks for the prompt reply!</p>
<p>[Shell] seems perfect for my use but when I try to create I receive the following message:</p>
<p>shell<br />
... couldn't create</p>
<p>Is [shell] a standard feature? Perhaps I need to re-install PD?</p>
<p>Btw, [netsend] / [netreceive] are working well and I can certainly use those for my project if I can't get the [shell] object to work. Thanks for the info!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/4</guid><dc:creator><![CDATA[Cobian]]></dc:creator><pubDate>Wed, 24 Apr 2013 00:15:09 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Wed, 24 Apr 2013 01:06:32 GMT]]></title><description><![CDATA[<p>I think [shell] is in the ggee library. It's preloaded in pd-extended.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/5</guid><dc:creator><![CDATA[sunji]]></dc:creator><pubDate>Wed, 24 Apr 2013 01:06:32 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Thu, 25 Apr 2013 03:48:09 GMT]]></title><description><![CDATA[<p>Yes, you are correct on both counts. It is in ggee and now that I have installed Pd-extended (I was using an old version previously) the [shell] object works perfectly.</p>
<p>I'm well on my way now. Many thanks!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/6</guid><dc:creator><![CDATA[Cobian]]></dc:creator><pubDate>Thu, 25 Apr 2013 03:48:09 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Fri, 02 Aug 2013 13:52:26 GMT]]></title><description><![CDATA[<p>Hello!</p>
<p>Maybe you can answer this.</p>
<p>I understand that sending something into &quot;shell&quot; object is like writing it on a terminal; but is it possible to obtain back into PD the answers that a terminal gives to commands?</p>
<p>I.e. if under MAC I open terminal and use &quot;say -v ? | more&quot; I get all the available TextToSpeech voices in the system. I'd love to feed these back to PD to populate a sort of menu, to basically change voices on the go, without having to know in advance which ones are available.</p>
<p>This could be useful in many other ways, I assume.</p>
<p>Thank you!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/7</guid><dc:creator><![CDATA[ferr]]></dc:creator><pubDate>Fri, 02 Aug 2013 13:52:26 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Fri, 02 Aug 2013 15:56:44 GMT]]></title><description><![CDATA[<p>The left output of shell returns the terminal response to whatever commands were entered. I have found this works quite well if the terminal command only returns one line i.e.</p>
<p>[date +%Y.%.m.%d (<br />
|<br />
[shell]<br />
|<br />
[symbol]<br />
|<br />
[symbol\</p>
<p>Nicely returns the terminal output into your PD workspace. If you use a terminal command that return multiple lines (i.e. ls), then only the first returned line appears in your symbol box at the end. There may be a way around this but I am pretty new to PD and havent found it yet.</p>
<p>For more involved commands I wrote a little shell script that I can execute from PD which executes the command I want and then writes the output to a text file. Then I load the textfile contents into PD with [textfile]</p>
<p>With some playing around you could probably get your desired voices into PD via one of those approaches. Let me know if it work or if any other problems crop up. Happy hacking!</p>
<p>(oh, and you may be aware of this already but this but whenever you enter a command into [shell] it is executed from the root directory, not the directory where the pd-patch is, so you need full path names for everything you do -- that took me a frustrating hour to figure out)</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/8</guid><dc:creator><![CDATA[Cobian]]></dc:creator><pubDate>Fri, 02 Aug 2013 15:56:44 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Fri, 02 Aug 2013 22:49:10 GMT]]></title><description><![CDATA[<p>Ah! but of course, silly me jaja</p>
<p>Thank you very much for your ideas and advice!</p>
<p>best,</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/9</guid><dc:creator><![CDATA[ferr]]></dc:creator><pubDate>Fri, 02 Aug 2013 22:49:10 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Sat, 03 Aug 2013 03:47:24 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/cobian">@Cobian</a> said:</p>
<blockquote>
<p>Dear Forum,</p>
<p>I have many years worth of work on acoustic signal processing in the form of matlab codes and unix shell scripts. I would like to build an interface so that I can get numerical output from a MIDI trigger and feed those numbers into these scripts. Those scripts are set up to write .wav files which can be easily re-loaded into pd.</p>
</blockquote>
<p>Any chance you'll post your code where the rest of us can use it in Pd?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/10</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/10</guid><dc:creator><![CDATA[Matthew]]></dc:creator><pubDate>Sat, 03 Aug 2013 03:47:24 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Sat, 03 Aug 2013 16:59:13 GMT]]></title><description><![CDATA[<p>Yeah, I keep meaning to do that but I feel I should clean them up first. I am new to PD and, though I am learning fast, these are my first scripts and they are still a little buggy and cumbersome. But I'll re-double my efforts to get them de-bugged and will upload them soon. If I haven't put anything up in a week remind me again!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/11</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/11</guid><dc:creator><![CDATA[Cobian]]></dc:creator><pubDate>Sat, 03 Aug 2013 16:59:13 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Sat, 03 Aug 2013 18:23:05 GMT]]></title><description><![CDATA[<p>I'll try to remember to remind you.</p>
<p>But in the meantime, why not just put them up as-is with even a short note about their quality/status, and if you revise them just update what you've posted whenever you get a chance? That's how open source works. In fact, given Pd's very uneven quality and completeness, and even less even documentation, you'd really be getting into the swing of things. Everything in Pd is a work in progress - don't let the perfect be the enemy of the good, or the finished be the enemy of the started. Nobody else seems to let that hold them back, and that's what we've got to work with.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/12</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/12</guid><dc:creator><![CDATA[Matthew]]></dc:creator><pubDate>Sat, 03 Aug 2013 18:23:05 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Mon, 07 Oct 2013 17:11:39 GMT]]></title><description><![CDATA[<p>How can I run this shell script?</p>
<p>**ls -al | awk '{ print $5 }'; **</p>
<p>I tried, but can't run.</p>
<p>[ls -al | awk '( print $5 )';(<br />
|<br />
[shell]<br />
|<br />
[print]</p>
<p>but, I couldn't write { and } characters.<br />
keycode 123: dropped</p>
<p>Any ideas?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/13</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/13</guid><dc:creator><![CDATA[agitato816]]></dc:creator><pubDate>Mon, 07 Oct 2013 17:11:39 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Mon, 07 Oct 2013 17:17:57 GMT]]></title><description><![CDATA[<p>If I run, **ls -al **<br />
maaya:~ jong$ ls -al<br />
total 96<br />
drwxr-xr-x+ 20 jong staff 680 Oct 7 18:58 .<br />
drwxr-xr-x 6 root admin 204 Oct 4 09:57 ..<br />
-rw------- 1 jong staff 3 Oct 7 12:15 .CFUserTextEncoding<br />
-rw-r--r--@ 1 jong staff 21508 Oct 7 12:20 .DS_Store<br />
drwx------ 5 jong staff 170 Oct 7 18:45 .Trash<br />
-rw------- 1 jong staff 313 Oct 7 18:58 .Xauthority<br />
-rw------- 1 jong staff 5540 Oct 7 18:45 .bash_history<br />
drwxr-xr-x 3 jong staff 102 Oct 7 18:58 .cache<br />
drwx------ 20 jong staff 680 Oct 7 12:25 .dropbox<br />
-rw------- 1 jong staff 56 Oct 7 18:58 .serverauth.1987<br />
drwx------ 3 jong staff 102 Oct 4 16:43 .ssh<br />
-rw------- 1 jong staff 707 Oct 4 10:22 .viminfo<br />
drwx------+ 6 jong staff 204 Oct 7 18:46 Desktop<br />
drwx------+ 7 jong staff 238 Oct 4 17:47 Documents<br />
drwx------+ 5 jong staff 170 Oct 7 18:54 Downloads<br />
drwx------@ 51 jong staff 1734 Oct 7 11:55 Library<br />
drwx------+ 3 jong staff 102 Oct 4 08:31 Movies<br />
drwx------+ 5 jong staff 170 Oct 4 18:07 Music<br />
drwx------+ 4 jong staff 136 Oct 4 09:52 Pictures<br />
drwxr-xr-x+ 4 jong staff 136 Oct 4 08:31 Public</p>
<p>and If I run, **ls -al | awk '{ print $5 }'; **<br />
680<br />
204<br />
3<br />
21508<br />
170<br />
313<br />
5540<br />
102<br />
680<br />
56<br />
102<br />
707<br />
204<br />
238<br />
170<br />
1734<br />
102<br />
170<br />
136<br />
136</p>
<p>I would get only 5th row. How can I do with Pd?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/14</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/14</guid><dc:creator><![CDATA[agitato816]]></dc:creator><pubDate>Mon, 07 Oct 2013 17:17:57 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Mon, 07 Oct 2013 17:44:44 GMT]]></title><description><![CDATA[<p>[ls -al(<br />
|<br />
[shell]<br />
|</p>
<p>|<br />
[$5(<br />
|<br />
[whatever else (print?)]</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/15</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/15</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Mon, 07 Oct 2013 17:44:44 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Mon, 07 Oct 2013 19:06:49 GMT]]></title><description><![CDATA[<p>@sebfumaster said:</p>
<blockquote>
<p>[ls -al(<br />
|<br />
[shell]<br />
|</p>
<p>|<br />
[$5(<br />
|<br />
[whatever else (print?)]<br />
That won't actually work, since each multiword line from [shell] is a list itself; shell is outputting a list of lists, from which list #n is desired. There is no list of lists (of symbols) native in Pd.</p>
<p>For something called &quot;pure data&quot;, Pd has very crude and limited data structures. Especially if the data isn't numeric.</p>
<p>Maybe PDContainer, like some use of [h_multiset data] receiving the shell output, like: [ls -al]-[shell]-[h_multiset data] .</p>
</blockquote>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/16</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/16</guid><dc:creator><![CDATA[Matthew]]></dc:creator><pubDate>Mon, 07 Oct 2013 19:06:49 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Mon, 07 Oct 2013 21:16:48 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/agitato816">@agitato816</a> said:</p>
<blockquote>
<p>How can I run this shell script?</p>
<p>**ls -al | awk '{ print $5 }'; **</p>
<p>I tried, but can't run.</p>
<p>[ls -al | awk '( print $5 )';(<br />
|<br />
[shell]<br />
|<br />
[print]</p>
<p>but, I couldn't write { and } characters.<br />
keycode 123: dropped</p>
<p>Any ideas?</p>
</blockquote>
<p>name the script <a href="http://foo.sh" rel="nofollow">foo.sh</a>, flip it's executable bit, then send</p>
<p>[./foo.sh(<br />
to<br />
[shell]</p>
<p>will that work for ja?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/17</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/17</guid><dc:creator><![CDATA[sunji]]></dc:creator><pubDate>Mon, 07 Oct 2013 21:16:48 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Mon, 07 Oct 2013 22:16:23 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/matthew">@Matthew</a> said:</p>
<blockquote>
<p>@sebfumaster said:</p>
<blockquote>
<p>[ls -al(<br />
|<br />
[shell]<br />
|</p>
<p>|<br />
[$5(<br />
|<br />
[print]<br />
.<br />
It's work, but I got some error...</p>
<p>$5: argument number out of range</p>
</blockquote>
</blockquote>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/18</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/18</guid><dc:creator><![CDATA[agitato816]]></dc:creator><pubDate>Mon, 07 Oct 2013 22:16:23 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Mon, 07 Oct 2013 22:25:36 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/sunji">@sunji</a> said:</p>
<blockquote>
<p>[./foo.sh(<br />
to<br />
[shell]</p>
</blockquote>
<p>It doesn't work. Am I wrong?</p>
<p>I wrote a file.<br />
/Users/jong/Desktop/shell-test.sh<br />
ls -al | awk '{ print $5 }';</p>
<p>then</p>
<p>pd file saved in same folder.<br />
[./Users/jong/Desktop/shell-test.sh(<br />
|<br />
[shell]<br />
|<br />
[print]</p>
<p>I got nothing... What's wrong? or What's problem?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/19</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/19</guid><dc:creator><![CDATA[agitato816]]></dc:creator><pubDate>Mon, 07 Oct 2013 22:25:36 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Mon, 07 Oct 2013 22:35:17 GMT]]></title><description><![CDATA[<p>It seems work, thanks.</p>
<p>#! <a href="http://filename.sh" rel="nofollow">filename.sh</a><br />
ls -al | awk '{ print $5 }';</p>
<p>[sh /path/to/file/filename.sh(<br />
|<br />
[shell]<br />
|<br />
[print]</p>
<p>Thanks sunji!</p>
<p>If the sh file is executable, it works without <strong>sh</strong>.</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/Screen_Shot_2013-10-08_at_12.43.37_AM.png" rel="nofollow">http://www.pdpatchrepo.info/hurleur/Screen_Shot_2013-10-08_at_12.43.37_AM.png</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/20</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/20</guid><dc:creator><![CDATA[agitato816]]></dc:creator><pubDate>Mon, 07 Oct 2013 22:35:17 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Mon, 07 Oct 2013 22:35:17 GMT]]></title><description><![CDATA[<p>It seems work, thanks.</p>
<p>#! <a href="http://filename.sh" rel="nofollow">filename.sh</a><br />
ls -al | awk '{ print $5 }';</p>
<p>[sh /path/to/file/filename.sh(<br />
|<br />
[shell]<br />
|<br />
[print]</p>
<p>Thanks sunji!</p>
<p>If the sh file is executable, it works without <strong>sh</strong>.</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/Screen_Shot_2013-10-08_at_12.43.37_AM.png" rel="nofollow">http://www.pdpatchrepo.info/hurleur/Screen_Shot_2013-10-08_at_12.43.37_AM.png</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/21</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/21</guid><dc:creator><![CDATA[agitato816]]></dc:creator><pubDate>Mon, 07 Oct 2013 22:35:17 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Mon, 07 Oct 2013 23:43:08 GMT]]></title><description><![CDATA[<p>Additional Question:</p>
<p>[shell] object with AWK and Perl script also run under Windows or other OS?</p>
<p>I can run this code under Mac OS X, and Linux. But I don't know under Windows...</p>
<p>AWK is Unix script, but Windows isn't Unix like...?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/22</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/22</guid><dc:creator><![CDATA[agitato816]]></dc:creator><pubDate>Mon, 07 Oct 2013 23:43:08 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Tue, 08 Oct 2013 00:25:48 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/agitato816">@agitato816</a> said:</p>
<blockquote>
<p>Additional Question:</p>
<p>[shell] object with AWK and Perl script also run under Windows or other OS?</p>
</blockquote>
<p>No. [shell] just invokes the Linux shell separately installed in the Linux host that Pd is running in. The Linux shell is able to run awk, perl, or whatever else is installed on that host that the Pd user has permissions to run. None of them except [shell] itself is part of Pd. So if you don't have the separate awk, perl or whatever you call by passing to [shell] both installed and accessible by the Pd user, it's not going to work. Which is the case on any other OS other than Linux. Unless they do have awk or perl etc installed separately, which I believe MacOS does have (Windows doesn't by default have awk or perl, but it might be possible to install some version of them that [shell] can invoke). Some functions, like ls , are builtin shell functions, so [shell] has them builtin too.</p>
<p>You can check which actual shell Pd invokes by using<br />
[echo $SHELL]<br />
|<br />
[shell]<br />
|<br />
[print]</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/23</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/23</guid><dc:creator><![CDATA[Matthew]]></dc:creator><pubDate>Tue, 08 Oct 2013 00:25:48 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Tue, 08 Oct 2013 15:52:55 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/matthew">@Matthew</a> said:</p>
<blockquote>
<p>That won't actually work, since each multiword line from [shell] is a list itself; shell is outputting a list of lists, from which list #n is desired. There is no list of lists (of symbols) native in Pd.</p>
<p>For something called &quot;pure data&quot;, Pd has very crude and limited data structures. Especially if the data isn't numeric.</p>
<p>Maybe PDContainer, like some use of [h_multiset data] receiving the shell output, like: [ls -al]-[shell]-[h_multiset data] .</p>
</blockquote>
<p>why would &quot;casting&quot; as a list not work? the reason it's there is to put the list selector on in order to get the right element (the 5th) from $5 because pd recognizes the list selector.<br />
the reason the error occurs is in the case when the fifth element isn't present, which some</p>
<p>logic would fix.<br />
otherwise it works, but i'm still curious why it wouldn't?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/24</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/24</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Tue, 08 Oct 2013 15:52:55 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Tue, 08 Oct 2013 18:54:14 GMT]]></title><description><![CDATA[<p>@sebfumaster said:</p>
<blockquote>
<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/matthew">@Matthew</a> said:</p>
<blockquote>
<p>That won't actually work, since each multiword line from [shell] is a list itself; shell is outputting a list of lists, from which list #n is desired. There is no list of lists (of symbols) native in Pd.</p>
</blockquote>
<p>why would &quot;casting&quot; as a list not work? the reason it's there is to put the list selector on in order to get the right element (the 5th) from $5 because pd recognizes the list selector.<br />
the reason the error occurs is in the case when the fifth element isn't present, which some</p>
<p>logic would fix.<br />
otherwise it works, but i'm still curious why it wouldn't?<br />
Did you run it? Your patch doesn't work because [ls -al( returns a series of lines, each line a series of words. Pd doesn't recognize the newline delimiter, only the space delimiter that makes the whole output look like just one long list, that happens to contain lines. There's no structure in Pd to say &quot;5th line&quot; or &quot;fifth list&quot;, just &quot;5th atom in a list&quot; at best.</p>
<p>Pd doesn't have data structures at all except for space-delimited list, whether of symbols or other atoms. It doesn't even have strings. It doesn't have any way to make more complex data structures, except the crazily complicated struct/template system that doesn't support runtime dynamic template construction, except perhaps by the ridiculous kluges for dynamic patching. Pd is a programming system, but it is not really a *metaprogramming* system, where runtime logic can change definitions. It's an object system with classes available for instantiation only by the programmer, not by the program.</p>
<p>That's why it's a pretty interesting music/performance system, but an extremely frustrating general programming system. Instead of &quot;Pure-Data&quot; it really could be called &quot;No-Metadata&quot;.</p>
</blockquote>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/25</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/25</guid><dc:creator><![CDATA[Matthew]]></dc:creator><pubDate>Tue, 08 Oct 2013 18:54:14 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Tue, 08 Oct 2013 22:54:58 GMT]]></title><description><![CDATA[<p>I ran it (well, with ls -a -l), it worked. agitato was asking for the 5th item in each list i think. shell outputs the lines as seperate messages.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/26</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/26</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Tue, 08 Oct 2013 22:54:58 GMT</pubDate></item><item><title><![CDATA[Reply to Inteface Pd with Shell scripts? on Wed, 09 Oct 2013 03:35:22 GMT]]></title><description><![CDATA[<p>@sebfumaster said:</p>
<blockquote>
<p>I ran it (well, with ls -a -l), it worked. agitato was asking for the 5th item in each list i think. shell outputs the lines as seperate messages.</p>
</blockquote>
<p>I ran the attached patch and got first the &quot;$5: argument number out of range&quot; error agitato reported, then a series of &quot;print: &lt;float&gt;&quot; lines where &lt;float&gt; was a number, mostly 4096. I got several sets of those, probably one for each file in the directory being listed. What do you get?</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/ls-shell-test.pd" rel="nofollow">http://www.pdpatchrepo.info/hurleur/ls-shell-test.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/27</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7335/inteface-pd-with-shell-scripts/27</guid><dc:creator><![CDATA[Matthew]]></dc:creator><pubDate>Wed, 09 Oct 2013 03:35:22 GMT</pubDate></item></channel></rss>