Is it possible to modify a SOUL Graph at runtime?

Is it possible to dynamically change a Graph at runtime, by adding/removing Processors and Connections? I kind of suspect that the answer is no, but I’m brand new to SOUL so I thought I’d make sure.

I am thinking about using SOUL to create a virtual modular synthesis environment that would be somewhat like a cross between Eurorack and Max/MSP, but to do so I’ll need to allow the user to create and modify an arbitrarily complex Graph at runtime.

If its not possible to do this with a compiled Graph, what is the best workaround? I suppose I could treat each virtual module as its own separate Graph, but then I’d have to manage passing samples between separate Graphs from the UI, which I’d really like to avoid if possible.

As far as I know you can’t change graph at runtime like that. But you can hot reload recompiled graph. If you’re trying to do something modular, you’d probably need to parse your graph/code into SOUL patch which you’d then recompile, create a player instance and hot swap previous active player with the new one. It might even be possible to crossfade between two versions of the player: old and new, recompiled one. E.g. when you create new player, you process the same sample block with both version and crossfade between them. Then you’d discard the old player. But that crossfade you’d have to do outside of the SOUL code, in your host application.