I've got no idea why this isn't working.
But if I find code someone has shared on a forum, I select all the code, and copy it.
I then open PD, go to edit then paste. And nothing happens!
What's the obvious part I'm missing here?
Really obvious copy and paste question.
I've got no idea why this isn't working.
But if I find code someone has shared on a forum, I select all the code, and copy it.
I then open PD, go to edit then paste. And nothing happens!
What's the obvious part I'm missing here?
@toddak Hi, I think if someone is posting code that looks like this
#N canvas 0 22 450 300 10;
#X msg 159 93 hello;
#X obj 159 115 print;
#X connect 0 0 1 0;
This is what a Pd patch looks like if you open it with a text editor. You need to copy and paste it into a text editor (as plain text), save it with *.pd extension and then you will be able to open the file with Pd.
Ah, yes that is obvious now. Many many thanks!
In Pd-l2ork/Purr Data you can paste it into a canvas window and the corresponding objects will get created.
In Purr Data there's a "Paste from Clipboard" option with a shortcut that achieves this. We did that to keep the user from accidentally pasting a bunch of random data and evaluating it in the Pd interpreter.
Even if you're pasting into a text file and opening it in Pd, if you happen to paste extra content-- say, the paragraphs preceding and/or following a piece of Pd source file-- all that extra text will get evaluated as Pd messages. For example, the text "Hey everybody, here's that Pd snippet I told ya about," would get interpreted as two messages to be sent to the "Hey" receive symbol. It's possible to get a corrupted patch or a crash that way.
It seems weird, that this hasn't been implemented in Vanilla even in 2023. Maybe we should all flood the Github page with a feature request again?
Work is underway on vanilla https://github.com/pure-data/pure-data/pull/2086
@eeropic Good to see! I've been missing this too, it's kind of annoying that you lose your clipboard content when you restart Pd. And it's nice that purr/plug/pure-data will soon all do this, makes it easier to share parts of patches on a forum, or copy/paste between pd flavours.
Oops! Looks like something went wrong!