Track Plugin Limited to 2 Channels - Is This Intentional?

Hi everyone,

I’m developing a custom plugin (AY chip emulator) that needs to output 5 channels when in
“separate mode” - stereo L/R plus three individual chip channels (A, B, C) for visualization
purposes.

The Issue

I implemented getNumOutputChannelsGivenInputs() to return 5 channels and verified it’s being
called correctly. However, the plugin was only receiving a 2-channel buffer, even though my override was returning 5.

Root Cause

I traced through the Tracktion Engine source and found this in tracktion_EditNodeBuilder.cpp
(around line 1225):

// If this plugin is on a track or clip and doesn't have a sidechain input we can limit the number of channels it uses
if (plugin.getOwnerTrack() != nullptr || plugin.getOwnerClip() != nullptr)
    if (! plugin.getSidechainSourceID().isValid())
        maxNumChannels = 2;  // <- Hard limit to stereo

This hardcoded limit overrides whatever getNumOutputChannelsGivenInputs() returns.

Questions

  1. Is the 2-channel limit intentional design? I understand the optimization for typical track
    plugins, but it seems to override the plugin’s explicit channel requirements.
  2. Is there an official way to indicate that a track plugin needs more than 2 channels?

The use case is legitimate - outputting extra analysis/visualization channels alongside the main
stereo output is common in audio plugins (e.g., sidechain monitors, spectrum analyzers with
separate frequency bands, etc.).

Thanks for any insights!

Yes, that is a design limitation that is currently being worked on in the `feature/multichannel’ branch, I don’t have an expected release date however. The short term solution is to wrap the plugin in a rack and route the additional outputs to another track. Or put the visualization plugin in the rack as well.