MIDI in/out pins not appearing in AudioPluginHost


#1

I’ve created a simple plugin project via Projucer, but the red MIDI in/out pins aren’t showing up. I tried both VST3 and AU. I checked the MIDI in/out/effect boxes in the settings (see screenshot). I made no other changes to the code, it’s just a vanilla blank auto-generated plugin.

Am I missing something? I was able to do this a few years ago but I forgot what I did differently back then. I’m getting back into JUCE now and this has puzzled me for the last few hours. Any help/hints are appreciated!

17%20PM


#2

If I create a new plug-in project in the Projucer and enable the “Plugin MIDI Input” option and re-save, then I can open the plug-in in the AudioPluginHost and it has a MIDI input pin.

Are you sure you’re instantiating the most recent version of the plug-in? Perhaps it’s picking up an older build which doesn’t have MIDI input enabled.


#3

Thanks for trying it out.

I tried it again with a new project and it works now. But it only works if I set the MIDI in/out settings as soon as the Projucer project is created (and before I save/launch Xcode). Once I’ve saved and launched then it seems making changes in Projucer has no effect. Is this the intended behaviour? I tried cleaning the build folder, deleting the vst/au builds, and refreshing the list in AudioHostPlugin but it seems no matter what the new settings don’t get updated. Is there something I need to do to force the new Projucer settings to be applied (other than just saving / relaunching the IDE)?

Steps the reproduce the issue:

  1. Create a new plugin project in Projucer
  2. Leave all settings as default and save/launch Xcode
  3. Build the project in Xcode and open the plugin in AudioPluginHost. Notice it has 2 green ins and 2 green outs (audio), as expected.
  4. Go back to the Projucer settings and select “Plugin MIDI Input” under “Plug Characteristics”
  5. Save/Launch Xcode again and re-build
  6. Re-open the plugin in AudioPluginHost and notice it doesn’t have the red MIDI input.

Alternate steps (this is the only way I got it to work):

  1. Create a new plugin project in Projucer
  2. Before launching XCode select “Plugin MIDI Input” under “Plug Characteristics”
  3. Build the project in Xcode and open the plugin in AudioPluginHost. Now in addition to the audio (green) I/O there’s a red MIDI input pin (as expected).
  4. At this point if you go back to Projucer and remove the “Plugin MIDI Input” checkbox the MIDI pin still remains. It’s like the setting is ignored once you’ve built the plugin once. (unless I’m missing some way to force the settings to update)

Thanks again for your help.


#4

I’m not seeing that behaviour, if I change the flags and re-save the project in the Projucer then the MIDI pins appear and disappear as expected. Are you sure you’re loading the most up-to-date build of the plug-in? Maybe try changing the background colour of the editor to be sure that it’s the latest.


#5

Yeah the plugin is being updated correctly (I can change the label text for example and see it update). Any changes I make in Xcode directly get reflected properly when I reload the plugin. It’s only settings I make in Projucer that don’t seem to have any effect.

Can you tell me a little more about what actually happens when you change settings in the Projucer UI and click “save and launch xcode”? In other words, what causes macros like “JucePlugin_IsMidiEffect” to get set? Where can I find that definition? Maybe this way I can double check that its value matches the setting in Projucer so I can see if it got saved properly.

Thanks again for helping out.


#6

JucePlugin_IsMidiEffect is defined in the AppConfig.h header, which is normally located in the JuceLibraryCode, next to the .jucer project file. In that folder, Projucer also creates the JuceHeader.h header, which includes AppConfig.h, and that you should include in your own code.