sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* MS->LR conversion: why does order matter with gain?
@ 2020-05-30 18:46 Jeff Learman
  2020-05-30 18:52 ` Jeff Learman
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Learman @ 2020-05-30 18:46 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1: Type: text/plain, Size: 522 bytes --]

I'm converting mid-side to LR.  Originally I used this:

sox $MS $LR gain -0.5 : remix -m 1,2 1,2i

but found that the result does not have an important property of mid-side:
when summed to mono, the effect does not cancel out.
I changed it to this:

sox $MS $LR remix -m 1,2 1,2i : gain -0.5

and it works as expected.  Why is there a difference?  Note that there is
no clipping going on in either case.  My intuition says that MS->LR is
linear, so gain applied before or after should have the same effect.

Thanks!
Jeff

[-- Attachment #1.2: Type: text/html, Size: 729 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: MS->LR conversion: why does order matter with gain?
  2020-05-30 18:46 MS->LR conversion: why does order matter with gain? Jeff Learman
@ 2020-05-30 18:52 ` Jeff Learman
  2020-05-30 19:40   ` Jeff Learman
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Learman @ 2020-05-30 18:52 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1: Type: text/plain, Size: 730 bytes --]

Well I bet I didn't really mean to use negative gain!  But I think that
shouldn't affect the question.

On Sat, 30 May 2020 at 14:46, Jeff Learman <jjlearman@gmail.com> wrote:

> I'm converting mid-side to LR.  Originally I used this:
>
> sox $MS $LR gain -0.5 : remix -m 1,2 1,2i
>
> but found that the result does not have an important property of mid-side:
> when summed to mono, the effect does not cancel out.
> I changed it to this:
>
> sox $MS $LR remix -m 1,2 1,2i : gain -0.5
>
> and it works as expected.  Why is there a difference?  Note that there is
> no clipping going on in either case.  My intuition says that MS->LR is
> linear, so gain applied before or after should have the same effect.
>
> Thanks!
> Jeff
>
>

[-- Attachment #1.2: Type: text/html, Size: 1198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: MS->LR conversion: why does order matter with gain?
  2020-05-30 18:52 ` Jeff Learman
@ 2020-05-30 19:40   ` Jeff Learman
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Learman @ 2020-05-30 19:40 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1: Type: text/plain, Size: 925 bytes --]

Never mind!  Colon abuse!  I meant to chain effects but instead I used
multiple effect chains.

On Sat, 30 May 2020 at 14:52, Jeff Learman <jjlearman@gmail.com> wrote:

> Well I bet I didn't really mean to use negative gain!  But I think that
> shouldn't affect the question.
>
> On Sat, 30 May 2020 at 14:46, Jeff Learman <jjlearman@gmail.com> wrote:
>
>> I'm converting mid-side to LR.  Originally I used this:
>>
>> sox $MS $LR gain -0.5 : remix -m 1,2 1,2i
>>
>> but found that the result does not have an important property of
>> mid-side: when summed to mono, the effect does not cancel out.
>> I changed it to this:
>>
>> sox $MS $LR remix -m 1,2 1,2i : gain -0.5
>>
>> and it works as expected.  Why is there a difference?  Note that there is
>> no clipping going on in either case.  My intuition says that MS->LR is
>> linear, so gain applied before or after should have the same effect.
>>
>> Thanks!
>> Jeff
>>
>>

[-- Attachment #1.2: Type: text/html, Size: 1668 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-30 19:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-30 18:46 MS->LR conversion: why does order matter with gain? Jeff Learman
2020-05-30 18:52 ` Jeff Learman
2020-05-30 19:40   ` Jeff Learman

sox-users@lists.sourceforge.net unofficial mirror

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/sox-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 sox-users sox-users/ https://public-inbox.org/sox-users \
		sox-users@lists.sourceforge.net
	public-inbox-index sox-users

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.audio.sox
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.audio.sox
	nntp://news.gmane.io/gmane.comp.audio.sox
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/sox.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git