Files
dragology-pd/public/samples/synth.pd
T
david fe6f2bfe76 Browser patch editor for Pure Data (closes #1)
Open a .pd file, drag boxes and pull cords, save it back as a file Pd
will load. Dragging is Dragology: `d.vary` moves a box, and a cord drag
is `d.closest(...).whenFar(vary)` over every inlet in the patch, so the
plug snaps to an inlet and cancels on empty space.

The parser is a byte-exact round trip. Two Pd format details that matter:
`#X connect` indices count comments, and `;;` (an empty record) is not the
same as a blank line. Anything unmodelled — arrays, `#X declare`,
subpatches — is preserved verbatim.

Tests run real Pd: patches round trip, an edited patch loads in
`pd -nogui` without new complaints, and the bridge carries a message into
a running Pd and back.

The bridge writes to server/patches/ and runs `pd -nogui` itself, so
saving and hearing the patch is one button.
2026-11-04 19:19:53 -08:00

73 lines
1.6 KiB
Plaintext

#N canvas 0 0 900 550 10;
# DO NOT EDIT — generated by scripts/gen_synth_pd.py;
#X obj 20 20 notein;
#X obj 80 50 pack 0 0;
#X obj 80 80 unpack 0 0;
#X obj 20 110 s midi-pitch;
#X obj 80 110 s midi-vel;
#X obj 400 20 netreceive -u 8081;
#X obj 400 60 route midi;
#X obj 400 100 route 144 128;
#X obj 400 140 unpack 0 0;
#X obj 480 140 unpack 0 0;
#X obj 400 180 s midi-pitch;
#X obj 480 180 s midi-vel;
#X obj 20 160 r midi-vel;
#X obj 20 190 r midi-pitch;
#X obj 20 220 stripnote;
#X obj 20 260 mtof;
#X obj 140 260 osc~;
#X obj 140 290 *~ 0.3;
#X obj 220 260 osc~;
#X obj 220 290 *~ 0.3;
#X obj 180 330 +~;
#X obj 180 360 *~ 0.5;
#X obj 180 400 lop~;
#X obj 180 460 *~;
#X obj 320 460 *~;
#X obj 250 530 dac~ 1;
#X obj 20 290 line~ 0 50;
#X obj 20 330 *~ 0.0055;
#X obj 100 370 *~;
#X obj 350 300 loadbang;
#X obj 350 320 float 10000;
#X obj 350 400 loadbang;
#X obj 350 420 float 80;
#X obj 350 450 / 100;
#X connect 0 0 1 0;
#X connect 0 1 1 1;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 2 1 4 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 7 1 9 0;
#X connect 8 0 10 0;
#X connect 8 1 11 0;
#X connect 9 0 10 0;
#X connect 9 1 11 0;
#X connect 12 0 14 1;
#X connect 13 0 14 0;
#X connect 14 0 15 0;
#X connect 15 0 16 0;
#X connect 15 0 18 0;
#X connect 16 0 17 0;
#X connect 18 0 19 0;
#X connect 17 0 20 0;
#X connect 19 0 20 1;
#X connect 20 0 21 0;
#X connect 21 0 22 0;
#X connect 22 0 23 0;
#X connect 14 1 26 0;
#X connect 26 0 27 0;
#X connect 27 0 28 0;
#X connect 23 0 28 1;
#X connect 28 0 24 0;
#X connect 29 0 30 0;
#X connect 30 0 22 1;
#X connect 31 0 32 0;
#X connect 32 0 33 0;
#X connect 33 0 24 1;
#X connect 24 0 25 0;