Tools for emulating subpatching in Wire

FFGL, OSC, GLSL. If you like abbreviations, this is the forum for you
Post Reply
moldybeats
Posts: 8
Joined: Wed Jan 04, 2023 04:14

Tools for emulating subpatching in Wire

Post by moldybeats »

I had a goofy idea recently about a way in which we could emulate subpatching by manipulating Wire files from the commandline. It's really just a proof of concept, not a fully-formed application, but if you're a brave soul comfortable running Python scripts from the commandline, maybe you'll find it useful.

The gist is that you define a subpatch within a Wire patch by putting your nodes inside a Comment node with some special text. Hub nodes that don't have an input connection are considered subpatch input nodes, and Hub nodes that don't have output connection are considered subpatch output nodes. You use one script to extract the subpatch from the Wire patch file, and another script to insert the subpatch into a Wire patch file. When the subpatch is inserted, all the nodes are collapsed visually except for input and output nodes.

Is this better than copy/paste + using the "Align..." functions within Wire? Probably not, but you decide. :D

https://github.com/moldybeats/wire-subpatch

Post Reply