VCVRack / VCV-Prototype

Other
130 stars 22 forks source link

Create new script should open a template file #33

Closed mxa closed 4 years ago

mxa commented 4 years ago

This is a feature request.

The issue is that when I do New script..., save it as, say thunder.pd, then Edit script... Pd will not load this script because it doesn't look like a valid Pd file. If I put the single line

#N canvas 0 188 450 300 12;

manually in thunder.pd, only then Edit script... will work.

It would be cool to have a template file for each scripting backend, so users would already have a boilerplate to start with. That would solve this issue and may also be beneficial for the other backends.

mxa commented 4 years ago

I'm thinking of another folder "templates" with new.lua, new.pd inside which will be opened from the Prototype module when asked for a new file.

AndrewBelt commented 4 years ago

would be cool to have a template file for each scripting backend, so users would already have a boilerplate to start with.

That is already the case... but I forgot to commit the /examples/template.* files. Simply create a file called /examples/template.pd, possibly looking like what you did for https://vcvrack.com/fundraiser/Pure%20Data%20patch.png, and it will be copied when choosing New script.