Hello, I’m writing SOUL code generator / graph parser for a project and I need to be able to select different external source for different instances of the same processor. Does anyone know if this is even possible at this stage?
The issue I found is that you can only specify external variables per namespace / processor type. In other words, all instances of this processor share the same external variables.
Node_WavePlayers are going to play “thunder” sounds, and if I need to change it to something else, it’s going to be changed for all instances of the processor:
The workaround I found in
MinimumViablePiano is to add all of the possible external variables that all of the
Node_WavePlayers within this SOUL patch need and then select which one is supposed to play on each instance individually (haven’t tried it yet, not sure how it would work).
…In this case, if a
WavePlayer needs to select a random sound from a group at runtime, the externals list gets increasingly more entangled.
Other workaround that I’ve thought of is to wrap each external file into a simple processor reader and append a tag to processor type for each instance, e.g.
Node_Wave_Thunder, etc. But that seemed like an unreasonable duplication of code for the compiler. And the bigger problem with this approach is it would make it impossible for multiple
WavePlayers to read the same external sources from different positions.
If it would be possible to hold external variables in the top graph and pass them in to the instances of
WavePlayer, maybe that would solve this. Although I’m not sure if that wouldn’t produce more issues.
TLDR: Is the
MinimumViablePiano's approach my best bet at this point?
P.S. ExternalDataProvider also doesn’t solve the issue, as it provides data for the whole patch, not for individual instances of a processor within the patch. Technically I could compile multiple instances of the same patch each with its own manifest file, which would contain only required external variables and then route them together externally in the host, but that doesn’t make it simpler, or more elegant and requires even more recompiling of the same thing for just a variable change.
P.P.S. It’s possible I am completely overthinking this