DAW channel number/ID available in plugin?


#1

Hello,
As I plan to report data in several instances of my plugin, which will relate to several channels of my DAW (both saving to file & sending over OSC), it would be great if I could incorporate the DAW’s channel number or ID name in that report.
One option (which I successfully found out) is to keep track of the amount of AudioProcessor class instances (using a static, as all plugin instances share the same base), and keeping a unique class ID number per instance; but this method is based on the order of creation of my plugins, which can easily get confusing of course, especially if I re-open a saved DAW session…
Looking through the juce docs, the only thing that seemed to come near what I’m looking for is AudioProcessorGraph::NodeAndChannel (https://docs.juce.com/master/structAudioProcessorGraph_1_1NodeAndChannel.html#ab0ad32f6d0aa7608798726fc42eaa11f).
Looking at it in the prepareToPlay method, the member nodeID remains always at 0 and channelIndex of the first loaded plugin is 0, while the next loaded plugin gives some random high int (whatever DAW channel order chosen); so that also doesn’t seem to help here…
Would there be any way to do this?


#2

What about AudioProcessor::TrackProperties? You can use the name member to get the track name but it’s only supported in some DAWs AFAIK.


#3

Alright, thanks. Reaper doesn’t seem to pass the name through unfortunately… But I’m informed about the state of the plugin art then I guess!