<?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[Pd files are just text!]]></title><description><![CDATA[<p>nearly 2am here, so i might not be too clear....but this is something so super simple, but which also took me way too long to realize when i first started with pd:</p>
<p>pd files are just made of text. no binary numbers, no secret handshakes...they're just text.</p>
<p>so you can open them and look at them in a text editor. On my mac i use the appropriately titled 'TextEdit', and for sure there are similar simple text things on the other platforms. Linux is 'gedit', isn't it? on windows, you can probably use 'notepad' or something? Not a proper word processor, just a real simple text editor.</p>
<p>so, you open your pd patch in your text editor, and you'll see something like:</p>
<p>#N canvas 367 194 450 300 10;<br />
#X msg 131 93 hello world;</p>
<p>..<br />
that's pretty much the smallest patch i could make, which is just a single message box, saying 'hello world'.</p>
<p>#X msg 131 93 hello world;</p>
<p>so, at x position 131 and y position 93, there is a message box, containing 'hello world'</p>
<p>the other bit is just the size of the window, the canvas behind your patch (#N canvas 367 194 450 300 10;)</p>
<p>you could actually change the document a bit in your text editor if you want, and resave as a .pd patch (or save as a text patch, and then rename), and your patch will now have new attributes. So for example,</p>
<p>#N canvas 367 194 450 300 10;<br />
#X msg 131 93 hello world;</p>
<p>could be changed to:</p>
<p>#N canvas 367 194 450 300 10;<br />
#X msg 131 93 goodbye cruel world;</p>
<p>and then you're all emo, ready for the vampire ball.<br />
...</p>
<p>it's pretty handy to be able to convert your patches to and from text. i won't go into all the uses here, but some of them are:</p>
<p>you can cut and paste patches you find on the mailing list or internet archive that are written in text form. - just copy that text into a blank text document (must be plain text - no special character formatting or anything), and then save or rename that document to have a .pd extension, and then you can open it as a normal pd patch.</p>
<p>also, it's useful for looking up how objects work. for example, here's a blank patch with just a single toggle:</p>
<p>#N canvas 304 280 516 306 10;<br />
#X obj 252 113 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0<br />
1;</p>
<p>so if we just open the properties dialogue for the toggle box, it doesn't take much trial and error to guess what all those bits mean.</p>
<p>finally, one thing i often use textediting for, is repetitive edits to patches. so, for example, if i have a patch with a whole bunch of toggles (yeah, i like toggles, ok?), and i decide i want to make them all red...well, i can delete them all and start again, or i can go into the properties box of every single one...or..</p>
<p>i can just open my text editor, find my toggles in my patch, and replace the white bit with the red bit, like this:</p>
<p>#X obj 252 113 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0<br />
1;</p>
<p>becomes:</p>
<p>#X obj 252 113 tgl 15 0 empty empty empty 17 7 0 10 -258113 -1 -1 0<br />
1;</p>
<p>.<br />
.<br />
.<br />
anyway... it's a simple idea, but quite handy</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6407/pd-files-are-just-text</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 11:47:47 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/6407.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 26 Jun 2012 17:10:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pd files are just text! on Tue, 26 Jun 2012 17:10:00 GMT]]></title><description><![CDATA[<p>nearly 2am here, so i might not be too clear....but this is something so super simple, but which also took me way too long to realize when i first started with pd:</p>
<p>pd files are just made of text. no binary numbers, no secret handshakes...they're just text.</p>
<p>so you can open them and look at them in a text editor. On my mac i use the appropriately titled 'TextEdit', and for sure there are similar simple text things on the other platforms. Linux is 'gedit', isn't it? on windows, you can probably use 'notepad' or something? Not a proper word processor, just a real simple text editor.</p>
<p>so, you open your pd patch in your text editor, and you'll see something like:</p>
<p>#N canvas 367 194 450 300 10;<br />
#X msg 131 93 hello world;</p>
<p>..<br />
that's pretty much the smallest patch i could make, which is just a single message box, saying 'hello world'.</p>
<p>#X msg 131 93 hello world;</p>
<p>so, at x position 131 and y position 93, there is a message box, containing 'hello world'</p>
<p>the other bit is just the size of the window, the canvas behind your patch (#N canvas 367 194 450 300 10;)</p>
<p>you could actually change the document a bit in your text editor if you want, and resave as a .pd patch (or save as a text patch, and then rename), and your patch will now have new attributes. So for example,</p>
<p>#N canvas 367 194 450 300 10;<br />
#X msg 131 93 hello world;</p>
<p>could be changed to:</p>
<p>#N canvas 367 194 450 300 10;<br />
#X msg 131 93 goodbye cruel world;</p>
<p>and then you're all emo, ready for the vampire ball.<br />
...</p>
<p>it's pretty handy to be able to convert your patches to and from text. i won't go into all the uses here, but some of them are:</p>
<p>you can cut and paste patches you find on the mailing list or internet archive that are written in text form. - just copy that text into a blank text document (must be plain text - no special character formatting or anything), and then save or rename that document to have a .pd extension, and then you can open it as a normal pd patch.</p>
<p>also, it's useful for looking up how objects work. for example, here's a blank patch with just a single toggle:</p>
<p>#N canvas 304 280 516 306 10;<br />
#X obj 252 113 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0<br />
1;</p>
<p>so if we just open the properties dialogue for the toggle box, it doesn't take much trial and error to guess what all those bits mean.</p>
<p>finally, one thing i often use textediting for, is repetitive edits to patches. so, for example, if i have a patch with a whole bunch of toggles (yeah, i like toggles, ok?), and i decide i want to make them all red...well, i can delete them all and start again, or i can go into the properties box of every single one...or..</p>
<p>i can just open my text editor, find my toggles in my patch, and replace the white bit with the red bit, like this:</p>
<p>#X obj 252 113 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0<br />
1;</p>
<p>becomes:</p>
<p>#X obj 252 113 tgl 15 0 empty empty empty 17 7 0 10 -258113 -1 -1 0<br />
1;</p>
<p>.<br />
.<br />
.<br />
anyway... it's a simple idea, but quite handy</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6407/pd-files-are-just-text</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/6407/pd-files-are-just-text</guid><dc:creator><![CDATA[mod]]></dc:creator><pubDate>Tue, 26 Jun 2012 17:10:00 GMT</pubDate></item><item><title><![CDATA[Reply to Pd files are just text! on Tue, 10 Jul 2012 09:58:16 GMT]]></title><description><![CDATA[<p>The textsound app is very helpful in realizing this.<br />
Thanks</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6407/pd-files-are-just-text/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/6407/pd-files-are-just-text/2</guid><dc:creator><![CDATA[alexandros]]></dc:creator><pubDate>Tue, 10 Jul 2012 09:58:16 GMT</pubDate></item><item><title><![CDATA[Reply to Pd files are just text! on Fri, 14 Dec 2012 07:09:33 GMT]]></title><description><![CDATA[<p>Not only is a Pd source file all text, but it's all text that is formatted as valid Pd messages. And not only are they valid Pd messages, but the word that immediately follows any #X or #N is a valid method for the canvas class. Plus, all the arguments that follow that word are valid arguments for that particular canvas method.</p>
<p>So you can read them in with [textfile] and send them to an empty subpatch by using [send pd-subpatchname]. That will programmatically rebuild the patch (save for the #A array data, but there's probably a way to do that, too) because the subpatch understands all those messages. (That's how it got built in the first place.)</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6407/pd-files-are-just-text/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/6407/pd-files-are-just-text/3</guid><dc:creator><![CDATA[jancsika]]></dc:creator><pubDate>Fri, 14 Dec 2012 07:09:33 GMT</pubDate></item><item><title><![CDATA[Reply to Pd files are just text! on Sun, 17 Feb 2013 17:32:53 GMT]]></title><description><![CDATA[<p>Just to add to this -- you can (and should) version control your patches with git or something similar!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6407/pd-files-are-just-text/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/6407/pd-files-are-just-text/4</guid><dc:creator><![CDATA[Vixus]]></dc:creator><pubDate>Sun, 17 Feb 2013 17:32:53 GMT</pubDate></item><item><title><![CDATA[Reply to Pd files are just text! on Sun, 26 Apr 2020 20:27:35 GMT]]></title><description><![CDATA[<p>Also just figured out you can see (and save, modify, ...) a patch as text within Pd with a read message to [text define] ...</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/6407/pd-files-are-just-text/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/6407/pd-files-are-just-text/5</guid><dc:creator><![CDATA[Gabriel Lecup]]></dc:creator><pubDate>Sun, 26 Apr 2020 20:27:35 GMT</pubDate></item></channel></rss>