I wrote a perl script that allows you to compose puredata patches in a text editor. You define the patch using ASCII art like this:
*------------------------*
| .--------. \
.-x--------. | osc~ 5 | *
| osc~ 500 | `-x------' |
`-x--------' | |
| .-x------. |
| | *~ 300 | |
| `-x------' |
*---* | |
| *------------*
.-x------.
| *~ 0.2 |
`-x------'
|
*
|\
| *
| |
.-x-x--.
| dac~ |
`------'
Then run the Perl script over it to produce a .pd file, that you can then load into puredata to get this:
The ASCII syntax basically allows you to define pd objects and connect them together. Layout is preserved. Much like in ghostbusters, you can’t cross the lines, and there isn’t syntax for different box types (messages and numbers). Fixing this would be short work, but I ran out of train journey 🙂
There is a particular syntax for drawing the lines. You use – for going left and right, | for going up and down and \ and / for going diagonally. To change direction or fork a wire you have to place a * . Mark inlets and outlets with x .
I think this shows nicely how there is no real difference between patching and coding. Shades of pixels are an alphabet, anything can be a program if you define a suitable interpreter to go with it.
Sadly you can’t do live patching with this, but perhaps this could be a starting point for thinking about more interesting ways of programming with text.
If you are curious you can download the script (and patch) here.
Awesome, I don’t use Pd all that much anymore, and I’m not _particularly_ sure how this is useful. But it definitely has a cool-factor of pi^2/10
just stumbled across your work after seeing your talk at The Next Layer on video, great stuff and *lovely* perl script.. I’m not a PD user either, but it’s really got me thinking ! thank you
Very clever hack!
If you are into new textual programming tecniques, you may find befunge and derivatives interesting: http://quadium.net/funge/spec98.html