How to detect number or name of track in the DAW


#1

Hello,
I just found out there is class PluginHostType, which allow to check in which DAW you opened your plugin.
So I wonder. Is there something that can tell you number or name of track on which you launched your plugin? I don’t need it to be universal, it would be enaigh if it work only for Logic Pro


#2

AudioProcessor has :

virtual void updateTrackProperties (const TrackProperties &properties)

So if you override that in your AudioProcessor subclass, you might get lucky with some hosts and that is actually called and provides some information. (But don’t count on it working…)


#3

Yes, as Xenakios says, updateTrackProperties() is the way to go. However, it is entirely optional for hosts to call this. So, it will work in some hosts, and not in others. And there is nothing JUCE can do about this.

Also, some hosts provide the track name, but not the track color.

So, you can see that support for this is at the whim of the host. But for those hosts that do call it, it works great!


#4

I can’t help but wonder what would happen in my favorite DAW (Jeskola Buzz) which doesn’t even have the concept of “tracks”. :yum: