Skip to main content
Topic: Remove the difference of two audio streams (Read 923 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Remove the difference of two audio streams

Hi,

I have two audio streams maybe described as A + B  and A + C.
I want to obtain the similarity of both streams by removing their difference.
It means I want to get A only.

How could I do that? Is there a common filter etc. in any audio editor or do I need to program it by myself maybe in Matlab or C#.

Thanks in advance and Shine On, Frank

Re: Remove the difference of two audio streams

Reply #1
I assume you don't have B or C separately?  Then no, I can't see how.  Imagine that B and C were identical, then see why I think it's impossible.

Re: Remove the difference of two audio streams

Reply #2
B and C are definitive not identical.

Re: Remove the difference of two audio streams

Reply #3
If you sum them then you get 2A + B + C, which makes A more audible over B or C. Other than that you can only cancel A and be left with B - C.

Re: Remove the difference of two audio streams

Reply #4
if you can assume that B and C are not correlated at all, you can probably use some of these "extract center channel" algorithms (if A,B,C are all mono; otherwise you can do this separately for each channel), but even then it's a problem that doesn't have a well defined solution, it's going to be a guesswork and it will have some artifacts, etc.


Re: Remove the difference of two audio streams

Reply #6
Very interesting page, thank you Roseval.

Re: Remove the difference of two audio streams

Reply #7
Hi, I have two audio streams maybe described as A + B  and A + C.
I want to obtain the similarity of both streams by removing their difference.
It means I want to get A only.
How could I do that? Is there a common filter etc. in any audio editor or do I need to program it by myself maybe in Matlab or C#.
Thanks in advance and Shine On, Frank

I think this will work as long as the files sync exactly, down to the sample. (unless there's something I'm not thinking of.)

In Reaper put:

Track 1 stream 1 (A + B)
Track 2 stream 2 (A + C)

invert phase on track 2 using the invert phase button on the track.

Render

The result file will be stream 3 (B + C)

now put:

Track 1 stream 1
Track 2 stream 2
Track 3 stream 3

reduce all tracks exactly 6 db using track gain control

return track 2 to normal phase.
invert phase on track 3.

Render

Result should be stream 4: A only

Re: Remove the difference of two audio streams

Reply #8
In step 1 you get B - C, not B + C.

Re: Remove the difference of two audio streams

Reply #9
Thanks to all for their tries.

The variant with the vocals removing algo not did the job. (A+B as left channel and A+C as right channel). B and C can have a very high amplitude and a bigger frequency range than A.
Fortunately they are mono.

I already knew that there won't be an exact solution.

I thought about something like this:

Transform (A+B) to frequency -> (A+B)'   and  (A+C) -> (A+C)'.
Separate all equal fourier coefficients to D' and all different to E'.
Transform D' -> D  and E' to E.

The range of the coefficients that will be manupulated and the definition of "equal" may be some parameters.

Can this work?

Re: Remove the difference of two audio streams

Reply #10
Quote
Transform (A+B) to frequency -> (A+B)'   and  (A+C) -> (A+C)'.
Separate all equal fourier coefficients to D' and all different to E'.
Transform D' -> D  and E' to E.
From what I understand, center-channel "vocal isolation" works that way.    

Vocal removal is simply sample-by-sample L-R (or R-L) subtraction with no FFT or anything "tricky".     (Except there is sometimes filtering so the bass doesn't get subtracted-out).  

Re: Remove the difference of two audio streams

Reply #11
If you have prior knowledge  of what A should sound like or what you want it to sound like,  then you could SUBJECTIVELY equalize and gate, A plus B ,to diminish B and bring out A and eq A plus c to diminish c , and then sum those resulting tracks to produce an improved subjective A.

Re: Remove the difference of two audio streams

Reply #12
In step 1 you get B - C, not B + C.
You're right, it doesn't work.
It's hard for me to think this can't be done exactly, but you're right.

If
A = Vocal
B = Piano
C = Guitar

I try to think how phase inverted piano and phase inverted guitar can each be created separately to cancel to a composite of stream 1 (vocal and piano) and stream 2 (vocal and guitar), but I haven't been able to make it work. I can only exactly create them as piano and guitar together, with only one or the other inverted.

I'm the least technical here, just trying to do it with mid and side, also Audacity Vocal Remover.  I can remove the vocal perfectly by mixing stream 1 and stream 2 with one of the files phase inverted, and be left with only perfect sounding piano and guitar together (although only one inverted), but not end up with perfect Vocal only.

Does Diffmaker have a solution for this, or can it only create the difference as B - C also?

 

Re: Remove the difference of two audio streams

Reply #13
May I ask for some samples btw?
Just to see if I'd be able to find a trick.

Re: Remove the difference of two audio streams

Reply #14
O.K. I'll let  the cat out of thge bag with my very special problem.

A+B is the center channel of the English soundtrack of a movie and A+C is the French one.
What I want to get ist background music.
I tried a bit with several audio SW in the past days. It's not the speach only but some FX that had to be removed and this is a bit harder. These are on all channels.
I'll take care for some shorter samples.

Re: Remove the difference of two audio streams

Reply #15
If only the speech is different, at best you get background music + effects.

Re: Remove the difference of two audio streams

Reply #16
Did you try Centre channel vocal iscolator.

Slightly off topic ,  A  can be made a separate part of a stereo field by panning A+B left and panning A+C right. Resulting in B left C right with A appearing  separate in the centre of the stereo field.

 
SimplePortal 1.0.0 RC1 © 2008-2019