Plugin: Add support for channel number and channel category in VST3

AAX, VST3 and AU plugins can know the name of the track they are inserted in (provided the host supports it), using the updateTrackProperties() method. I would like to know if its possible to get the track number the plugin if inserted in?

EDIT: Yes you can for VST3 (cf this post), so I’d love if the feature could be added to Juce in the AudioProcessor::TrackProperties struct.

Unfortunately, that depends completely on the host. For REAPER, it helps to use a plugincando like:

Then it should be possible to get the number of channels with getTotalNumInputChannels() and getTotalNumOutputChannels(). However, not every host informs the plug-in.

How is getTotalNumOutputChannels() related to tracks?

I have seen hosts, that provide different views on the mixer, so the track number isn’t even consistent, that’s why I think it doesn’t exist, but I might be wrong.

I don’t know, but that’s how I got it working :slight_smile: In case I don’t set the plug-in can do, I doesn’t work with Reaper.
I might have to add, that I allow each combination of in/output configurations, and initialize my plug-ins with 64 channels in/outs (depending on the type of plug-in, it’s an Ambisonic plug-in suite).

Fair enough :slight_smile: seems I didn’t understand the question then…

Damn, I somehow read number of channels instead of track number -.- my bad! You all can just ignore what I wrote :smiley:

So actually after a bit of research, there is support for this in VST3, cf the following parameters that can be queried:

So you can get the channel index, the channel type ! I’ve modified the juce VST3 wrapper, and it works in reaper and cubase!

/** Keys used as AttrID (Attribute ID) in the return IAttributeList of
 * IInfoListener::setChannelContextInfos  */
/** string (TChar) [optional]: unique id string used to identify a channel */
const CString kChannelUIDKey = "channel uid";

/** integer (int64) [optional]: number of characters in kChannelUIDKey */
const CString kChannelUIDLengthKey = "channel uid length";

/** string (TChar) [optional]: name of the channel like displayed in the mixer */
const CString kChannelNameKey = "channel name";

/** integer (int64) [optional]: number of characters in kChannelNameKey */
const CString kChannelNameLengthKey = "channel name length";

/** color (ColorSpec) [optional]: used color for the channel in mixer or track */
const CString kChannelColorKey = "channel color";

/** integer (int64) [optional]: index of the channel in a channel index namespace, start with 1 not * 0! */
const CString kChannelIndexKey = "channel index";

/** integer (int64) [optional]: define the order of the current used index namespace, start with 1 not 0!
	For example:
	index namespace is "Input"   -> order 1,
	index namespace is "Channel" -> order 2,
	index namespace is "Output"  -> order 3 */
const CString kChannelIndexNamespaceOrderKey = "channel index namespace order";

/** string (TChar) [optional]: name of the channel index namespace for example "Input", "Output", "Channel", ... */
const CString kChannelIndexNamespaceKey = "channel index namespace";

/** integer (int64) [optional]: number of characters in kChannelIndexNamespaceKey */
const CString kChannelIndexNamespaceLengthKey =	"channel index namespace length";

/** PNG image representation as binary [optional] */
const CString kChannelImageKey = "channel image"; 

/** integer (int64) [optional]: routing position of the Plug-in in the channel (see ChannelPluginLocation) */
const CString kChannelPluginLocationKey = "channel plugin location";

Looks like there is something similar in the AAX SDK, but it says that it’s not sent to the plugin…

enum AAX_ENotificationEvent
	/** \brief (not currently sent) The zero-indexed insert position
	 of this plug-in instance within its track
	 <em>Data: \c int32_t</em> <br />
	 <em>Sent by: Host</em>
	AAX_eNotificationEvent_InsertPositionChanged = 'AXip',
	/** \brief  (const AAX_IString) The current name of
	 this plug-in instance's track
	 \compatibility Supported in Pro Tools 11.2 and higher
	 \compatibility Not supported by Media Composer
	 <em>Data: \c const \ref AAX_IString</em> <br />
	 <em>Sent by: Host</em>
	AAX_eNotificationEvent_TrackNameChanged = 'AXtn',
	/** \brief  (not currently sent) The current UID of
	 this plug-in instance's track
	 <em>Data: <tt>const uint8_t[16]</tt></em> <br />
	 <em>Sent by: Host</em>
	AAX_eNotificationEvent_TrackUIDChanged = 'AXtu',
	/** \brief  (not currently sent) The current position index of
	 this plug-in instance's track
	 <em>Data: \c int32_t</em> <br />
	 <em>Sent by: Host</em>
	AAX_eNotificationEvent_TrackPositionChanged = 'AXtp',
}; AAX_ENUM_SIZE_CHECK( AAX_ENotificationEvent );
1 Like