[PD] Fw: Are there alternative means of creating patches besides the graphical editor?

Ed Kelly morph_2016 at yahoo.co.uk
Fri Feb 4 00:53:29 CET 2011


> Thanks Ed.
> Yes, it is indeed simple-looking. But simply editing that file by hand doesn't 
>do me much good. I'd want the power of
> scripting -- loops, variables, conditionals, to generate such a thing for me.
> -Morgan

OK. What I mean is, the scripting of PD patches follows a simple formula.
The objects, messages etc are numbered from 0. Inlets of objects are numbered 
from 0 to the last inlet, as are outlets.
Connections are made thus:
connect sourceobject outletnumber targetobject inletnumber

simpleosc~.pd looks like this:

#N canvas 0 0 450 300 10;
#X obj 59 70 loadbang;
#X msg 59 96 440;
#X obj 59 127 osc~;
#X obj 58 159 *~ 0.1;
#X obj 51 202 dac~;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 3 0 4 1;

The #N canvas is the window (x-position y-position x-size y-size font-size).

You can use netreceive to send messages to a PD patch, or you can use a script 
to create a text file that is a PD patch.
You could use any language to write the script, or any language connected to 
localhost to network-communicate with PD.
Please see my  enclosed examples to see what I mean. simpleosc~.pd is the patch 
shown above. dynamic_simpleosc~.pd shows you how it can be built dynamically 
from within PD.

Best wishes,
Ed Kelly



On Thu, Feb 3, 2011 at 3:35 PM, Ed Kelly <morph_2016 at yahoo.co.uk> wrote:

Load a PD patch in a text editor and take a look.
>Ed
>
> Metastudio 4 for Pure Data - coming soon!
>Metastudio 3 still available at http://sharktracks.co.uk/puredata
>
>
>
>
>
________________________________
From: Morgan Packard <morgan at morganpackard.com>
>
>To: pd-list at iem.at
>Sent: Thu, 3 February, 2011 6:35:19
>Subject: [PD] Are  there alternative means of creating patches besides the 
>graphical editor?
>
>
>Hello there.
>I'm interested in using PD. However, as someone who spends a lot of time with 
>code, I'm actually a little afraid of the learning curve involved with the 
>graphical programming language! I'd be much more comfortable creating my patches 
>using, for example, a Python tool. Does such a programmatic PD patch generation 
>tool exist? I can't imagine I'm the first person who's wanted such a thing.
>thanks,
>-Morgan
>
>-- 
>================================
>Web:
>
>http://www.morganpackard.com
>
>
>Music/Art:
>Latest album: Moment Again Elsewhere
>iOS app Thicketavailable on iTunes store.
>================================
>
>


-- 
================================
Web:

http://www.morganpackard.com

Music/Art:
Latest album: Moment Again Elsewhere
iOS app Thicketavailable on iTunes store.
================================


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110203/d15ff0ba/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simpleosc~.pd
Type: application/octet-stream
Size: 373 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110203/d15ff0ba/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dynamic_simpleosc~.pd
Type: application/octet-stream
Size: 3524 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110203/d15ff0ba/attachment-0003.obj>


More information about the Pd-list mailing list