Where is JucePlugin_IsSynth set? How do I say my plugin is an instrument not an effect?

I see in the boilerplate code for PluginProcessor.cpp a number of compile-time flags like JucePlugin_IsSynth and JucePlugin_IsMidiEffect and JucePlugin_WantsMidiInput being tested.

But where do these get set?

Is there some external config file somewhere? Or do I manually set these in the code? Or is it better / OK to just take these out altogether and hardwire the assumptions and return value of producesMidi() and isMidiEffect() etc?

I’m working with FL Studio. And, right now, my plugin is being accepted as an effect, but not as an instrument.

It’s basically a MIDI processor, which should sit like any other instrument reading from the time-line of MIDI events, but rather than producing sound, it fires off transformed MIDI output which can be picked up by another instrument.

Should I basically copy the Arpeggiator example as how to deal with these flags? (It seems to just hardwire the values.)

Hey interstar,

These get stored in AppConfig.h and are set by the Projucer. I believe the easiest way to change any of these settings is through the Projucer as well, in your Projucer project you can click on the gear at the top left and it will reveal many options which set these flags for you.

Hope it helps.

1 Like

OK. I see the AppConfig.h in the file directory of my original code.

But it doesn’t seem to be in the list of files visible in Projucer. Nor in the project in Visual Studio.

Still, I assume it’s there.

However, even with the JucePlugin_IsSynth in effect, FL Studio doesn’t seem to accept the plugin as a synth. And tells me “You tried to load an effect plugin into a channel. Load the plugin juce_vst_test1 into the mixer instead”

Any idea what actual information a VST host looks for to tell which kind of VST it is?

Well, not sure about FL studio.
But I can tell you where to find the option in the Projucer. You have to click on “Project Seting” (the little pink cog wheel). Then you get to the menu, where you can set the “Plugin is a Synth” option. See also attached screenshot.

1 Like

Additional to the flags, that you set via the AppConfig (and which is queried by the host through the SDK functions), some hosts also have assumptions about the configuration.

I.e. it could be, that you have audio input channels defined, and FL studio says, that is not a synth in that case, regardless of the flag… or any other combination, that FL studio doesn’t expect.

Good luck

OK. I’ll check that.