How to detect number or name of track in the DAW

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

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…)

2 Likes

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!

1 Like

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:

I’m interested too in getting in my AudioProcessor the track number, if track is in solo or if it’s in mute (obviously if it should be given by the daw), but I can see that the implementation of TrackProperties has only name and colour… there’s something I’m missing?

Name and color are the only properties that supports at the moment.

1 Like

Since it’s optional for both the host and the plugin to support the feature, nothing would happen.

1 Like

If you are targeting AAX, you can use the Pro Tools Scripting SDK for that.

1 Like

I supposed so and unfortunately the main daw I’m working on now is cubase, but I wanted to try anyway, really thank you :pray: