Blindingly obvious thing I missed until recently - Cut and Paste between patches

Now I’m like “why didn’t I think of that before.”

  1. Open a patch.
  2. Select a bunch of connected modules.
  3. Open a new patch.
  4. Paste!

I’m never going to make another patch from scratch again! :wink:

5 Likes

You might want to investigate STRIP from stoermelder and the companion STRIP-BAY. I store reusable chunks this way.

Between STRIP, and having customized my template, making a patch “from scratch” is can be a thing of the past.

2 Likes

I’ve used that in the past, but this is more direct. Strip does a lot of things that simply copying selections does not. But this ctrl-C/ctrl-V pair is good.

And some people don’t have Stoermelder in their arsenal. Which is crazy because the Stoermelder plugins are pretty much 95% of the stuff that isn’t in stock VCVRack that should be. And I bet Ben would love those plugins to be made obsolete. The stuff he does stretches what the Rack API can do. If, for example, the Rack folks made a version of 8Face that would retain state when you copy a selection.

The reason it does not is that Rack modules have ID numbers assigned on creation. When you paste a selection the IDs are all different. So 8Face can’t be moved as part of a selection because it’s internal module list refers to different IDs than the ones pasted.

3 Likes

Never entered my mind until now!

While (unique) module ids are assigned at runtime, plugin slugs are guranteed unique, and module slugs within a plugin must also so be unique within the plugin, so the problem is solveable.

it works inside the DAW with more than 1 instances as well :sunglasses:

I think you’re talking about something different. The whole deal is “module ids are assigned at runtime.” That means 8Face assignments/snapshots don’t survive being copy/pasted (even with a Strip module) because the 8Face has a list of module ids that are different to the ones assigned by Rack to modules in the copy.

In order for 8Face to work properly in this situation, it needs help from Rack. There would need to be some API interaction such that when a selection is pasted, the 8Face can ask for the new IDs that correspond with the ones in its internal list.

yes, it would have to do some and bookkeeping mapping over the delta of module instances to line up the new instances. Tricky but might be possible.

Not quite. Module IDs are assigned upon initial insert into the patch. The module ID is preserved in the .vcv patch file, and restored when the patch is loaded.

But when a selection set is loaded or pasted (copy and paste or saved selection set import), then each of the modules potentially must be reassigned new IDs, and the mappings within the set must somehow be translated to the new IDs.

I faced this mapping issue with my new Bay modules (transmit/receive patch bay modules) that I plan to submit to the library this weekend. They are similar to the Little Utils teleport modules, except they support normalled connections, as well as user defined port labels.

I implemented my own way of handling the remapping issue that allows the modules to remap themselves without having to rely on another module like Strip or Strip++. I am very happy with how well it is working. I am thinking of describing the technique in a Development topic, and possibly submitting a support request to implement something similar into the Rack engine. With the current Rack engine/API, my technique requires custom code for both ends of the link. But I think a small change to the engine/API would allow any module to translate a mapping to any other module from any plugin, without the mapped module having to have any custom code.

3 Likes

Did you know that you can “copy paste” modules onto a TXT file?

This is VCO-VCA-ADSR :slight_smile:

3 Likes

yes, the VCV patch clipboard format is utf-8 JSON, I think.

You can also highlight a bunch of modules and right click and save selection as.

You can then load the selection into any patch :slight_smile:

what is the difference to load a saved “selection”?

The difference is that there isn’t a .vcvs file, and fewer steps to accomplish the task.

yes, maybe …,
but I can use the selection in many different patches

1 Like

You could probably keep pasteing until you copy something else, but yeah, if you need something persistent a selection file is good. In the end the selection file is the exact same format as what’s on the clipboard.

I like the “save selection” route, when I have a bunch of modules I always use together. Then it’s pretty easy to load a a chain, rather than having to go into many patches and copy/paste into another new patch.