Replace a node in an AudioProcessorGraph?


#1

Does anyone know of an eloquent (and quick) way to replace a node in an AudioProcessorGraph. In my graph I would like to replace one node with a new filter but I don’t want to lose all the connections. I want the new filter to be positioned in the same place in the graph as the previous one, with the same connections. Any suggestions?


#2

You could implement a “wrapper” node that forwards it to a pointer to a filter, and expose a member that lets you change the filter.


#3

Thanks, good thinking. In the end I was able to do it by taking a copy of the existing graph as xml, then remove my filter, add a new one with the same ID and reconnect where necessary. Works pretty well, but your approach might be a better option in the long run.