Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support audio processing with more than 2 channels #5108

Open
PhysSong opened this issue Aug 1, 2019 · 6 comments · May be fixed by #7459
Open

Support audio processing with more than 2 channels #5108

PhysSong opened this issue Aug 1, 2019 · 6 comments · May be fixed by #7459

Comments

@PhysSong
Copy link
Member

PhysSong commented Aug 1, 2019

Some plugins require more than 2 channels for its audio input/output. Here are some common use-cases:

  • Stereo sidechain compressor: requires 2 stereo inputs
  • Drum kits: some drum kit VSTs can use multiple outputs for multiple samples, for examples, stereo out 1 for kick, stereo out 2 for snare

However, there are some difficulties which come from the internal structure of the LMMS core:

  • LMMS uses interleaved stereo formats while external plugins like VST, LADSPA, Zyn, and LV2 expect non-interleaved format.
    For audio outputs and file outputs, the interleaved form might be beneficial. However, I think it's not for internal processing.

Features that can be implemented:

@JohannesLorenz
Copy link
Contributor

The question is also how to visualize that. I find the classical mixer window not suited for more than 2 channels, but I'd prefer a graph where each plugin is a node and you can connect to the inputs by using arrows ("edges"). What do the others think about the visualization?

LMMS uses interleaved stereo formats while external plugins like VST, LADSPA, Zyn, and LV2 expect non-interleaved format.

True, but why is this more difficult with 6 channels than with 2?

@DomClark
Copy link
Member

Another issue I can see is fitting this around the instrument's built-in effect chain, which is only able to process a single stream of audio. Should we offer the option of multiple effect chains, one for each stereo channel pair, or should we disable the effect chain for multiple-output instruments, in the same way we disable envelopes for single-streamed instruments?

What do the others think about the visualization?

I like the idea of a graph, and this seems to be a feature that other DAWs offer (FL Studio's Patcher comes to mind, but I'm sure there are others). I don't think this should be a replacement for the current mixer though - it could easily get disorganised and unmanageable for large projects.

@Spekular
Copy link
Member

A sane default would be to apply the same chain to each stream, no? Additional flexibility would be great too, of course, but being unable to use effects on a plugin at all seems rather limiting.

@DomClark
Copy link
Member

Certainly that would be ideal, but that may be difficult or impossible to implement. Playing each stream through the same chain won't work (imagine, say, a reverb effect where the input comes from a different source every 256 samples...). Having a single UI controlling multiple chains could be tricky, and some plugin types don't support this (in particular, though perhaps not limited to, VST2, and some inflexibly-written VST3 plugins).

Another possible solution may be to add a "simple mode" to plugins with multiple stereo channel pairs, where all the outputs get mixed down to two channels, at which point the audio can be processed as normal.

@Spekular
Copy link
Member

Spekular commented Aug 25, 2019

Ah, sorry, I meant "the same" as in equivalent. So adding a reverb to the instrument effect chain would "internally" add one reverb for each channel with their models linked to the same view/controller in the UI. I'm probably in over my head when it comes to this topic though so maybe that wouldn't work.

@michaelgregorius
Copy link
Contributor

In Reaper each mixer strip can have an arbitrary number of channels. If there are more than two channels the level meters just become narrower and show the level of each channel.

With regards to the plugins I think one has to take the perspective from the plugins capabilities. Each plugin has a certain number of input and output channels that it can process and output to. Therefore if you put a plugin on a strip you can define which mixer channels feed to its inputs and where the output channels should go.

If you open a plugin in Reaper you can click a button to open the mixer matrix for the plugin:
Reaper-Plugin-Button

This opens the mixer matrix:
Reaper-Channel-Plugin

By default it has the following mappings for the input:

  • 1 -> 1
  • 2 -> 2

The same applies to the outputs. If you click the "plus" icon you can expand the input and output channels that are shown for selection:
Reaper-Channel-Plugin-Expand

I guess LMMS would need something similar if it wants to support channels with more than stereo information, e.g. surround, sidechaining, etc. If I remember correctly Ardour also provides a mixer matrix.

I think the effect chain of the internal instruments could be kept as it is. I assume that each instrument has no inputs and two outputs. Therefore they are inherently stereo and should be able to deal with stereo plugins because they already know how to deal with them right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants