Find out which node is updating its parameters?


#1

Quick question. I’m trying to find out which node in my graph is currently having its parameters updated. I can use an AudioProcessorListener to notify me when any of my node’s parameters have changed, but I would really like to get the nodeId so I know exactly what plugin/node has triggered the listener callback. Any ideas?


#2

Perhaps I should start the ball rolling then! I was thinking of deriving my own AudioProcessor class so that I can assign the unique nodeID to it, but this will result in me have to cast back to AudioProcessor all the time which I find a little messy? Anyone got any better ideas, perhaps I’m missing an obvious approach? I could also create a whole new wrapper class for my AudioProcessors and expose the AudioProcessor object? I can see different ways to do this, but I’m concerned that I might be going about it arse over head…


#3

For now I’ve created an OwnedArray of AudioprocessorListeners. I create a new one for each node and pass the current nodeID to it. Whenever the callback is triggered by a change to a node parameters it reports the nodeID for the plugin that has had it’s parameter changed. Seems to work pretty well. I’m trying to create a primitive midi learn mechanism so I’m using the demo host as a test bed. I’ve added a midiInputCallback to the device manage that handles all incoming CC messages. My plan is that the user must enter learn mode, tweak a plugin control, and then have it mapped to MIDI. I think I’m a little closer now, but I’d still like to hear other peoples thoughts on my approach.