Problem with Midi Channel Display in RTAS

I’m converting to Juce from a previous version of my midi synth plugin that had a separate custom RTAS implementation in the past. Here is the situation: I create two ProTools (PT) instrument tracks. On one I insert an instance of the old plugin. On the other I insert the new plugin built with Juce/RTAS. I create a Midi Track. When I click on the output box of the I/O section of the Midi Track there are two possible destinations – the new plugin and the old (they have different names). When I hover over the old plugin I get a dropdown menu listing chan 1 through chan 16 of the destination midi instrument’s midi channels for the old plugin. All is well. When I hover over the new Juce plugin’s output box it just says channel 1 without showing the dropdown box of 16 midi channels to choose from.

There must be someplace where the host (PT) queries the RTAS plugin for the list/format of Midi channels for a midi plugin but I have not been able to find this. Where do I define that the Plugin has 16 midi channel inputs? What am I doing wrong. Of course this would be different from the audio I/O configuration. How do I get the dropdown list of 16 midi channels to be displayed.

I’m using Protools 10.2 commercial build, running on Mac OSX 10.7.5, using a couple months old version of Juce tip (how do I find something like a Juce build number?)

The problem is that in juce_RTAS_Wrapper.cpp the EffectInit function has a line:

            midiBufferNode->Initialize (1, true);

The first argument “1” is a midi channel mask. As we see it is hard wired to 1. Changing this to:

            midiBufferNode->Initialize (0xffff, true);

Makes all 16 midi channels available as possible destination for a Midi track in ProTools. This mask should probably be define in Juce AppConfig.h so that the juce_RTAS_wrapper.cpp does not need to be hacked or at least 0xffff should be the default rather than 1.

Goldarnit! Thanks very much, I’ll update it to 0xffff!