How create patches (wires) between modules programmatically?


I want to create patches (wires) between modules programmatically.

A few questions:

  1. How to create patches programmatically? Need a function like create_path(module_out_id, port_out_id, module_in_id, port_in_id)
  2. How to remove existing patches?
  3. How to get a list of module ids in a project?
  4. How to get the id of the ports in the module?

Thanks :slight_smile:

Re clearing cables, you can do it this way: Befaco/Muxlicer.cpp at dcd9a59ea785d7efebd39ea5564823c72f2fdddf · VCVRack/Befaco · GitHub

I’d dig around those parts of the api

1 Like

The Seq++ Sequencer can patch itself to a few clocks - there’s lots of useful stuff in there, perhaps. SquinkyVCV-main/ClockFinder.cpp at master · kockie69/SquinkyVCV-main · GitHub

1 Like

To create wire dynamically, check the stoermelder PackTau ( T7 serie)

1 Like