Implementation of ladspa 1421

Hi there,

I would like to suggest implementation of ladspa 1421, matrix_ms_st_1421.

It is used for a certain microphone configuration (Mid-Side) that allows you to vary the width of the stereo field from mono to unnaturally wide.

There would be one or two simple controls. A “Width” slider and possibly a “Wet/Dry” slider.

The Width slider would be variable from 0 to 2. 0 is full mono. It gets more stereo width as you approach 1. It gets unnaturally wider than stereo as you go beyond 1 towards 2.

The Wet/Dry slider defaults 1, but is unnecessary if I am understanding it correctly.

Width would work with keyframes, so that you can start with wide stereo, and narrow it as the video zooms in on a subject. In that regard, you would almost zoom in the audio as well.

https://www.mltframework.org/plugins/FilterLadspa-1421/

I understand that this will not be a popular feature request, but it would be great if it could be implemented.

In the mean time, I am going to work on it, but I am practically clueless when it comes to how this works. Chance of success is low.

BTW, I did check the roadmap before posting, and didn’t see anything related to this.

Thanks!

You can do this with your installation depending on which OS and how it was done. Basically, go into the Shotcut program folder followed by share/shotcut/qml/filters. Copy the folder of the audio_delay filter to a name like audio_ms_stereo. Then, edit the QML files accordingly. It should be fairly obvious how to do it without extensive knowledge of the language.

However, I am concerned that this filter works as expected with the way the ladspa is integrated into MLT, which is generic. The docs say, “MLT will create the number of plugins that are required to support the number of audio channels.” MLT works primarily with mono filters. I think it will create an instance for left and right that output respectively to left and right only. But you can try it.

I checked the MLT code, and it appears that it does support stereo plugins. It creates multiple instances as needed to make filter channels match the project/output channel count. For example, with melt -debug output I see for the audio delay filter (ladspa.1192):
[filter ladspa.1192] Plugin Initialized. Channels: 1 Copies: 2

And for Matrix: MS to Stereo
[filter ladspa.1421] Plugin Initialized. Channels: 2 Copies: 1

I agree that a Wet/Dry parameter is not logical to include in this filter. That is a generic parameter available to all LADSPA plugins in MLT.

I would love to be able to test this. Do you have a sample MS file that you would be willing to share?

Thank you for the input. I got the filter to appear in Shotcut. Now just to make it work!

I do not have a sample, but I will get some. My plan was to try to get this to work, and then purchase a microphone setup.

But, I just ordered a budget mid-side microphone. I will get you audio samples as soon as it arrives.

I’ll take some city sounds, and some nature sounds. If there are any other samples that you would like, I would be happy to get those as well.

Thanks!

Alright, I have some demos!

Here is the file. 400Mb MP4, so you can see what you are hearing.

The first segment is 1:05 of city sounds on a windy day. You can hear cars and truck going past, people passing while talking, a car that turns in front of the camera, and the bells at city hall in Savannah, Georgia.

The second segment is 1:30 of nature sounds on a day with light rain. Great egrets at a rookery. You can hear a honking bird that should fly a bit across the soundstage. There is a fly buzzing around the microphone. A train horn is heard far off in the distance, to the right.

The last segment is 1:10 of me playing guitar in my living room. Two quick fingerpicking segments. Both John Prine songs. The first is “Hello In There, Hello” and the second is “Long Monday.”

Sorry that the levels are all over the place. I didn’t want to touch the audio.

I haven’t had time to work on enabling the filter, but I’ll get to it-- if you don’t beat me to it first!

Thanks!

1 Like

I added this filter for the next version 24.06