13
0

VST3: Ignore MIDI channel count for a bus

Assume that simply the presence of an Event bus indicates
that MIDI is supported.

This fixes Arturia synths, among others.
see also  https://forum.juce.com/t/vst3-event-bus-channel-count/25051
This commit is contained in:
Robin Gareus 2020-09-24 18:38:44 +02:00
parent 68ee66a4ee
commit 86be01c0f9
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 13 additions and 2 deletions

View File

@ -1386,11 +1386,17 @@ VST3PI::count_channels (Vst::MediaType media, Vst::BusDirection dir, Vst::BusTyp
bool is_sidechain = (type == Vst::kAux) && (dir == Vst::kInput);
if (media == Vst::kEvent) {
/* MIDI Channel count -> MIDI input */
#if 0
/* Supported MIDI Channel count (for a single MIDI input) */
if (bus.channelCount > 0) {
_io_name[media][dir].push_back (Plugin::IOPortDescription (bus_name, is_sidechain));
}
return std::min<int32> (1, bus.channelCount);
#else
/* Some plugin leave it at zero, even though they accept events */
_io_name[media][dir].push_back (Plugin::IOPortDescription (bus_name, is_sidechain));
return 1;
#endif
} else {
for (int32_t j = 0; j < bus.channelCount; ++j) {
std::string channel_name;

View File

@ -61,8 +61,13 @@ count_channels (Vst::IComponent* c, Vst::MediaType media, Vst::BusDirection dir,
}
#endif
if (media == Vst::kEvent) {
/* MIDI Channel count -> MIDI input */
#if 0
/* Supported MIDI Channel count (for a single MIDI input) */
return std::min<int32> (1, bus.channelCount);
#else
/* Some plugin leave it at zero, even though they accept events */
return 1;
#endif
} else {
n_channels += bus.channelCount;
}