How can I route 4 incoming audio streams to stereo? (-Via a simple plugin?)

Hey,

Does anyone have a plugin or method to achieve this?
I’m exploring route Pin Connections more, and holy shit it’s awesome (…but certainly bewildering). :+1:

I want to ‘collapse’ 4 audio streams into 2 (-back into plain stereo), as indicated here with yellow lines:


However, I currently assume what I actually need is a plugin that has 4 input pins and 2 output pins specifically, as poorly shown here:

So, does anyone have a simple LV2 or Lua DSP script that does this?
If not, then I can probably just make one. :slight_smile:

Also, if there’s another way for doing this, then please let me know!

Cheers,
-J

Take a look at the LSP mixer family; they seem to be quite flexible. This one, for example, looks like it can do the trick:
https://lsp-plug.in/?page=manuals&section=mixer_x4_stereo

1 Like

Hi,
I am not expert in this area, but it seems that musing around with « pin connection », it would be possible to reach your goal.
By inserting a track and send output 1 and 2 on input 1 and output 2 and 4 in input 2 of the track, it should make the trick.
Maybe you will have to make a real time « bounce » of the audio. Meaning: press « record » and let the audio be printed on the aux track?
Just how I would get out of it on my side.
Regards.

1 Like

Correct.

One way is to add ACE Cross Fade (comes with Ardour) and set the x-fade to the center (A/B = 0.5).

1 Like

They’re a cool set of plugins no doubt! But unfortunately I’m using old-ish macOS software on my main mixing/editing machine… : / Still, I downloaded and installed their LV2 version(s) cause I thought maybe Ardour would/should(?) be able to use LV2 regardless…? Alas, I got:

Screen Shot 2026-06-25 at 9.49.16 AM

But it’s okay, because I wanted something simpler for this purpose anyways.


Unfortunately nothing I tried worked. As @x42 confirmed, a simple plugin to go from 4 → 2 is required, or something like the ACE Cross Fade. :+1:

The setup I’m looking for is for general mixing work without bouncing anything. The idea is to duplicate a stereo input into a pair of stereo outputs, then affect one stereo pair one way, the other pair another way, and ultimately sum the pair back together.

I realized that I want to do this not for something like parallel compression, but for TRUE mid/side processing, thus: have one pair be the true mid (i.e. shared) info., one pair be the true side (i.e. un-shared and stereo) info., and then process each however I wish, and then sum them back into stereo when finished. :grin:

[Side-note:
‘Old-school’/standard “mid/side” processing is kind of a ‘scam’ (-how the idea is sold to people vs what is actually happening), and I could and should probably do an entire video on it one day… :expressionless: But something like RJ Studio’s True Mid/Side plugin does what all mid/side processing should be doing in my opinion. -or at least as an option. (Although, I don’t know what witchcraft he used to make his plugin work the way it does. I’ve been thinking about this a lot lately… :face_with_spiral_eyes:)]


Thanks! ACE Cross Fade did work, but understandably lowers the summed volume…

So I ultimately just ended-up creating some relatively simple 2 → 4 and 4 → 2 Lua DSP scripts instead. :grimacing: :+1:

The Ardour Lua DSP reference info. is pretty sparse, but as it suggested right off the bat, I was able to cobble some working scripts together using some examples (-incl. x-fade.lua)!


~Thank you all for your input!

Cheers,
-J

1 Like

Nice. I’m happy that you were able to help yourself!

Could you share that script? I had it on my ToDo list to write that script for you, but you were faster.

Indeed! Effectively it’s really just a simplified version of ACE Cross Fade and ACE A/B Switch. One can just carefully rip out all the gain interpolation.

The hardest part is coming up with a name for it :slight_smile:

1 Like

~Of course!

And your to-do list should have much better stuff on it than this, haha. :melting_face:
Thanks though. :grimacing:

I chose to use dsp_run for simplicity in this case. -Same for copy_vector as nothing more complicated seemed necessary. They seem to work as intended. :grin: :+1:

For me, I think these names will do… at least for the time being:

“Channels: 2 → 4”

ardour {
    ["type"]    = "dsp",
    name        = "Channels: 2 → 4",
    category    = "Utility",
    license     = "N/A",
    author      = "J.K.Lookinland",
    description = [[Duplicate stereo inputs to quad outputs, i.e.:
Inputs 1/2 -> Outputs 1/2 and 3/4]]
}

function dsp_ioconfig ()
    return {
        connect_all_audio_outputs = true,
        { audio_in = 2, audio_out = 4 }
    }
end

function dsp_run (ins, outs, n_samples)

    -- Route inputs 1/2 -> outputs 1/2 and 3/4:
    ARDOUR.DSP.copy_vector(outs[1], ins[1], n_samples)
    ARDOUR.DSP.copy_vector(outs[2], ins[2], n_samples)
    ARDOUR.DSP.copy_vector(outs[3], ins[1], n_samples)
    ARDOUR.DSP.copy_vector(outs[4], ins[2], n_samples)

end

“Channels: 4 → 2”

ardour {
    ["type"]    = "dsp",
    name        = "Channels: 4 → 2",
    category    = "Utility",
    license     = "N/A",
    author      = "J.K.Lookinland",
    description = [[Sum quad inputs back to stereo, i.e.:
Inputs 1/2 and 3/4 -> Outputs 1/2]]
}

function dsp_ioconfig ()
    return {
        connect_all_audio_outputs = true,
        { audio_in = 4, audio_out = 2 }
    }
end

function dsp_run (ins, outs, n_samples)

    -- Start with routing inputs 1 and 2:
    ARDOUR.DSP.copy_vector(outs[1], ins[1], n_samples)
    ARDOUR.DSP.copy_vector(outs[2], ins[2], n_samples)

    -- Mix-in inputs 3 and 4 to the outputs:
    ARDOUR.DSP.mix_buffers_no_gain(outs[1], ins[3], n_samples)
    ARDOUR.DSP.mix_buffers_no_gain(outs[2], ins[4], n_samples)
    
end

Obviously with the latter script summing identical stereo pairs will result in a +6db boost. So this is really only made for other, mixing trickery, e.g. (in my case) splitting a stereo pair into the more-true mid/shared content, and the more-true side/unique content, editing them separately how you will, then summing them back together. :+1:

~Lots of experimentation with routing/pin-connections this week which is fun… :face_with_spiral_eyes: :grin:

-J

1 Like

Thanks. I like the nice and simple approach.

I’d love to see them enforce the GPL in court :slight_smile:

" 2 → 4" can be done with pin-connections. but I assume dropping the plugin is more ergonomic.

Since all processing uses float, it won’t clip internally, and there’s always “ACE Amp” and mixer fader. So long as you’re aware of the gain, it’s all fine.

Eventually I think I’ll just add a generic 2 N → N plugin that retains gain, but meanwhile your scripts will come in handy.

1 Like

Hahaha… :joy:
I laughed really hard when I actually thought about it.
It was a placeholder, basically.

I should’ve put N/A, because it really doesn’t fucking matter in this case.


Ah, fuck it, I’m going to amend it.
It’s just a comment anyway, -not ‘properly’ published, eh?

> Violating the GPL already. :roll_eyes:
I just hope I won’t sue myself one day. :grin:

-J