mid side encoder/decoder

Scope device files created using the Scope SDK

Moderators: valis, garyb

User avatar
Neutron
Posts: 2274
Joined: Sun Apr 29, 2001 4:00 pm
Location: Great white north eh
Contact:

Post by Neutron »

<a name="planetz-file"></a><a href="http://www.planetz.com/Pulsar/files/dev ... .dev"><img src="/forums/images/file_icon.gif" border="0" alt=" File"> File</a><BR> <a name="planetz-tag"></a>Price ($USD): 0<BR> <a name="planetz-tag"></a>Type: Utility<BR> _____________________________________<BR><BR> This is a simple mid / side encoder. the device has no controls at all

it seperates the middle and stereo parts of the signal. it is made by request. (roberflas)

the exact same module also re-encodes the signal to left and right channels

example of use. put effects on the stereo part of a signal to give it more air, but leave the mono part (bass) alone so it does not get any out of phase signal making it sound weak.

just put it in your "devices/effects/stereo/other" folder.

can be used as an insert.

<font size=-1>[ This Message was edited by: Neutron on 2004-06-19 23:46 ]</font>
rodos1979
Posts: 736
Joined: Sun Nov 17, 2002 4:00 pm
Location: Greece

Post by rodos1979 »

Hello! :smile:

I made the same thing using the modular but I came across one little "problem"... If you stick 2 MS modules one after the other, the resulting audio is 6dB lower than the original. The way to avoid this is to apply a 6dB of gain at the MStoLR decoding. Have a look at the modulars I posted

Could you make an additional module that is like the one you made but with 6dB of gain? And name them LRtoMS and MStoLR, for identifying them easily...

I do my job already with the modular, but it would be better to have a special module for that (because the modular takes a lot of space in the rooting window).

Thank you! :smile:
roberflas
Posts: 72
Joined: Sat Dec 13, 2003 4:00 pm
Location: España

Post by roberflas »

Hi, thank a lot for convert this device to new SFP software.
It really do the job good and easy.
It is a essential tool for mastering.
Thank you :smile:
User avatar
Neutron
Posts: 2274
Joined: Sun Apr 29, 2001 4:00 pm
Location: Great white north eh
Contact:

Post by Neutron »

well i know about the gain reduction, but i decided to make it as tiny as possible.

there may be a way to do it without any gain stage and not waste DSP, and still be able to use same device.

I can see how -6db could be a problem on the side channel since with most material (except old beatles records) it is allready quite low compared to center channel you could end up with only 29 bits of resolution out of the 32!

it would also be better to not add 6db before m/s to stereo the proper way to do it as far as i can figure is to add 3db on encode and 3db on decode

<font size=-1>[ This Message was edited by: Neutron on 2004-06-19 23:45 ]</font>
rodos1979
Posts: 736
Joined: Sun Nov 17, 2002 4:00 pm
Location: Greece

Post by rodos1979 »

I think I had tried the 3dB gain in both the encoding and decoding stage, and it didnt yield the same result if I remember right... I ll try it now again to see..
If it works, then why dont you add 3dB of gain to your device too?

:smile:
Music Manic
Posts: 1739
Joined: Wed May 15, 2002 4:00 pm
Contact:

Post by Music Manic »

So how do you route the output.If I want to M/S signal and turn down L/R channels how do I do it.Could you send picture please.
Thanks
Stige
Posts: 260
Joined: Sun May 25, 2003 4:00 pm
Location: Finland

Post by Stige »

On 2004-06-20 12:17, Music Manic wrote:
So how do you route the output.If I want to M/S signal and turn down L/R channels how do I do it.Could you send picture please.
Thanks
Good question. It would be handy if this device had 3 outputs: middle channel and L/R.
rodos1979
Posts: 736
Joined: Sun Nov 17, 2002 4:00 pm
Location: Greece

Post by rodos1979 »

I dont know what you mean but MS works like this:
you have the original stereo audio file consisting of the L and the R signal
the Mid is L+R (the middle contains both signals)
and the Side is L-R (their difference)

The decoding is the same process
L=M+S
R=M-S

If you take the mid portion out then the L and R channels are the same thing out of phase. If you add them to mono you get silence.
Music Manic
Posts: 1739
Joined: Wed May 15, 2002 4:00 pm
Contact:

Post by Music Manic »

So what's the point of this device?How do you get decoded signal when you're just streaming it into a stereo channel?To get the difference you need 3 channels don't you.What is your setup.
Thanks
samplaire
Posts: 2464
Joined: Tue Jun 05, 2001 4:00 pm
Location: Warsaw to Szczecin, Poland
Contact:

Post by samplaire »

Not exactly - one channel contains the signal which is the same on both channels (their sum) and the second contains the difference. How does it work? I don't know but to drive a car I don't need to know the engine construction :smile:
samplaire
Posts: 2464
Joined: Tue Jun 05, 2001 4:00 pm
Location: Warsaw to Szczecin, Poland
Contact:

Post by samplaire »

On 2004-06-20 12:17, Music Manic wrote:
So how do you route the output.If I want to M/S signal and turn down L/R channels how do I do it.Could you send picture please.
Thanks
I assume it this way:
Step1: separate the signal with the device.
Step2: open a mixer (MicroMixer) and connect the 2 Encoder outs with 2 mixer's mono ins.
Step3: open a second instance of the encoder/decoder and connect the mixers main outs with the enc/dec ins. The signal you get at the end should be the same as in the beginning.

Now you can move the mixer faders to achieve the desired results.

PS
I'm not at my computer so the way I see it is only my way of thinking. Correct me if I'm wrong
Shayne White
Posts: 1454
Joined: Tue Dec 11, 2001 4:00 pm
Location: California
Contact:

Post by Shayne White »

On 2004-06-21 12:11, samplaire wrote:
I assume it this way:
Step1: separate the signal with the device.
Step2: open a mixer (MicroMixer) and connect the 2 Encoder outs with 2 mixer's mono ins.
Step3: open a second instance of the encoder/decoder and connect the mixers main outs with the enc/dec ins. The signal you get at the end should be the same as in the beginning.

Now you can move the mixer faders to achieve the desired results.
That worked when I panned the "mono" channel to the left and the "stereo" channel to the right. I have NO IDEA how this thing works, but I now know how to operate it! It's really bizarre that it's able to carry L and R signals on one channel. Thanks Samplaire for the explanation!

I'm interested to see how I can use this in the future...at the moment I'm too dazed to know what effects to put on it. :smile:

Shayne
Melodious Synth Radio
http://www.melodious-synth.com

Melodious synth music by Binary Sea
http://www.binary-sea.com
samplaire
Posts: 2464
Joined: Tue Jun 05, 2001 4:00 pm
Location: Warsaw to Szczecin, Poland
Contact:

Post by samplaire »

On 2004-06-22 02:31, Shayne White wrote:
That worked when I panned the "mono" channel to the left and the "stereo" channel to the right.
Oops! I forgot to mention it :smile:
Shayne White
Posts: 1454
Joined: Tue Dec 11, 2001 4:00 pm
Location: California
Contact:

Post by Shayne White »

I've just played around with it some more...unfortunately, applying any effects to the "stereo" channel makes it lose the stereo image at once. So I tried mixing the "stereo" channel in with the original signal, applying a stereo delay to the "stereo" channel to make it stereo ( :smile: ) but since it was summing the L and R channels, some sounds got overamplified.

It really would be nice if the "mono" channel were its own channel (like it is now) and the "stereo" channel had separate L and R channels. Is there any way to do that? I just can't see myself using this plugin very much the way it is now.

Shayne
Melodious Synth Radio
http://www.melodious-synth.com

Melodious synth music by Binary Sea
http://www.binary-sea.com
samplaire
Posts: 2464
Joined: Tue Jun 05, 2001 4:00 pm
Location: Warsaw to Szczecin, Poland
Contact:

Post by samplaire »

Hi Shayne,

Look at Neutron's site for the description ( http://www.neutron7.com ). Find the Xenon CODEC.



_________________
Image Sir samplaire scopernicus

<font size=-1>[ This Message was edited by: samplaire on 2004-06-22 07:29 ]</font>
rodos1979
Posts: 736
Joined: Sun Nov 17, 2002 4:00 pm
Location: Greece

Post by rodos1979 »

On 2004-06-22 03:03, Shayne White wrote:
It really would be nice if the "mono" channel were its own channel (like it is now) and the "stereo" channel had separate L and R channels.
It is NOT a "stereo" channel! It is a mono track containing the *difference* between the original L and R. If you take out completely the Mid signal when decoding, you are left with a stereo file which contains on the Left channel: the Side track, and on the Right: the Side inverted.
There is NO WAY and NO USE in making it have separate L + R channels that contain the same thing but in 180degrees of phase difference.

Hope you make sense! :smile:
Music Manic
Posts: 1739
Joined: Wed May 15, 2002 4:00 pm
Contact:

Post by Music Manic »

So is it used for recording a stereo signal in M/S manner?Does it encode.
What i mean is that if I put a stereo wav file through it,what is it doing.
Thanks
samplaire
Posts: 2464
Joined: Tue Jun 05, 2001 4:00 pm
Location: Warsaw to Szczecin, Poland
Contact:

Post by samplaire »

It separates the signal into 2 channels:

- mono - the signal that is identical in both L and R channels in stereo signal
- the difference - the data that is different in both channels.

This is a tool for manipulating on a ready song/composition, when you have no way to return to separated tracks (or you got such file from your client) and , say, vocal part (which is in general mono, I say in general) is too loud comparing to the desired state. Or it lacks compression, or a bit of reverberation, delay etc.

So this is a mastering tool and it should be used very carefully because if you overuse it (or manipulate the levels too extremly) you can do worse to the song.

_________________
Image Sir samplaire scopernicus

<font size=-1>[ This Message was edited by: samplaire on 2004-06-23 08:50 ]</font>
rodos1979
Posts: 736
Joined: Sun Nov 17, 2002 4:00 pm
Location: Greece

Post by rodos1979 »

On 2004-06-23 08:42, samplaire wrote:
It separates the signal into 2 channels:
- mono - the signal that is identical in both L and R channels in stereo signal
- the difference - the data that is different in both channels.
Actually, this is not true... There is no way to achieve that...
I ll give you an example:
Lets say you ve got a Stereo Audio file, consisting of L & R signals.
The two signals contain the following:
L=x + a
R=x + b

x= the part of audio that is identical in both channels (what is perceived as the true Middle in the Stereo field)
a and b are parts that each one is only present in L or R signals respectively.
Samplaire, what you said is that MS encoding encodes the LR down to x and (a+b), which is not true.
M=L+R=(x+a)+(x+b)= 2x+a+b -> x+(a+b)/2
S=L-R=(x+a)-(x+b)= a-b

So it is an approximation of what you said (and what everybody wants), but still it has its uses! :smile:
samplaire
Posts: 2464
Joined: Tue Jun 05, 2001 4:00 pm
Location: Warsaw to Szczecin, Poland
Contact:

Post by samplaire »

hah! Maybe you are right but I think you made a mistake, too, Rodos :smile:
On 2004-06-23 20:27, rodos1979 wrote:
The two signals contain the following:
L=x + a
R=x + b
I belive it's slightly different:
L=1/2x + a
R=1/2x + b

Or even the ratio isn't that simple (I mean mono isn't 1/2x + 1/2x)
Why? Try to record a mono signal into a stereo input (to achieve 2 identical signals on both channels). Now bounce the recorded stereo file to 2 mono files (separate L and R). Now put ONE of the files in the sequencer and you'll observe that the resulting master volume is lower. So the L or R signal isn't 1/2x but it either is not 1x :smile:
Post Reply