[Request] Add PluginHostType::isProTools()


#1

PluginHostType doesn't have a isProTools() function. May you add it?


#2

Until they add it, you may use the 'wrapperType' member in your AudioProcessor: if and only if it says RTAS or AAX, then you are in ProTools


#3

Thank you, yfede!

Haven't even thought about wrapperType in this context. Only used it to detect standalone operation so far.

It's a trivial one liner to create PluginHostType::isProTools(), so I did that.


#4

While Pro Tools only runs RTAS/AAX, there are other hosts that do as well (ie. Media Composer).

If ROLI is going to update PluginHostType, I'd suggest adding:

- Specific Pro Tools versions to the HostType enum (ie. ProTools11, ProTools12) as there are for other hosts

- Same for Media Composer 

- add isProTools() and isMediaComposer()

we're also up to Nuendo 7 now, and Live 9...

 


#5

Yeah, mine was just a suggested workaround until the isProTools() job was done


#6

Given the huge amout of hosts out there, I seem to remember that JUCE team mostly rely on user submissions for the entries in PluginHostType, so I think all of you are going to get that code updated faster if you provide those one-liners here for them to integrate right away (I vaguely remember there was a dedicated topic for that, too)


#7

 all of you are going to get that code updated faster if you provide those one-liners here for them to integrate right away

yes!


#8

I really enjoy writing down theorems and state that they are almost trivial to solve without providing a hint. Gives me the thrills! My friends call me Fermat...

 

Less exciting, but closer to the facts: I wasn't at my computer when I replied.

All that's missing in PluginHostType is

bool isProTools() const noexcept          { return type == DigidesignProTools; }

The part for detecting Pro Tools is already implemented, it just can't be accessed from outside. PluginHostType is an extremely simple class to understand. The only snag: To extend getHostType() one needs the corresponding host to be installed. That's the reason for the call of user submissions in the past.

Btw. I'd suggest to change the enum item named DigidesignProTools to ProTools as well, since Digidesign is not accurate anymore.

@frankfilipanits: I like your suggestions. You might need to provide the line to detect Avid Media Composer in getHostType(), since the good folks at ROLI probably don't have it on their machines (I also don't have it).


#9

The part for detecting Pro Tools is already implemented, it just can't be accessed from outside.

It can be accessed, you'd just write PluginHostType().type == PluginHostType::DigidesignProTools

But sure, I'll add the convenience method too, it makes things more readable.


#10

Totally overlooked that type is public. Thanks for adding the convenience method.