iPlug2 Forum

MIDI device selection and how to get a pointer to IPlugAPPHost

EDIT: nevermind, just found it. Just do exactly the same thing that is done in IPlugAPP: create a member variable mAppHost and get a pointer to the IPlugAPPHost in the constructor of your plugin. mAppHost = (IPlugAPPHost*) info.pAppHost; and you’ve got access to everything.

I’m having some trouble figuring out how to get access to the MIDI device configuration of a Plugin. There’s some options in the File->Prefrences dialog that I’d like to access, but I haven’t been able to figure out how get the same functionality from within my Plugin class.

Specifically, I’d like to detect the device string and only enable some options when a specific device string is found (my plugin is intended as a GUI for a hardware synth). It would also be useful to make the same adjustments (IN/OUT channel selection) directly in the app. Can anyone provide me a pointer to where I can access these parameters?

What I need appears to be in IPlugAPPHost, but there’s only a private pointer to that in IPlugAPP.

1 Like

[Oh you worked it out] Here is how you can do that. We probably need to add more methods to IPlugAppHost to interrogate the devices. If you add things and make a PR we’ll consider them