1
votes

If I have a signal which is a mixture of sine and cosine waves with different frequencies I can easily extract one of them by designing a band pass filter with pass band frequency equal to my desired frequency.

What if I have to extract a signal that has more than one frequency components ?

For example if I have two audio signals. Obviously an audio signal contains many frequencies. Let the two audio signals be a1,a2.

Now I'm adding them like A=a1+a2;

Note that I'm not appending one audio to another. I'm adding their amplitudes.

For that I'm doing this :

[a1,fs1]=audioread('1.mp3');
[a2,fs2]=audioread('sample.mp3');
A=zeros(1,max(length(a1),length(a2)));
for i=1:length(a1)
    A(i)=a1(i);
end
for i=1:length(a2)
    A(i)=A(i)+a2(i);
end

Now I have a composite audio in variable A.

Now if I want to extract a1 from A how do I do that ? If it was a simple frequency range I would have extracted it very easily. But here both audio signals almost have same set of frequencies. Is it even possible t o extract like this ?

Thankyou :)

EDIT:

As asked for the fourier plots here I'm pasting them :

Plot 1

Plot 2

1
You could replace your for loops with A(1:length(a1)) = a1 and A(1:length(a2)) = A(1:length(a2)) + a2. Then what do you mean by extracting a1 other than some variation on A - a2? Do the two audio signals exclusively use different frequencies?Wolfie
Try running Fourier plots for each of the audio sources individually to analyze their spectrums, and share the results. This is not a simple filtering problem, but something that depends on the data you have and requires customized solutions.crazyGamer
As crazyGamer pointed out, it is not problem which you can easily address by applying an pass band filter. It sounds more like a blind source separation with a single microphone. There are some publications which you can find on google.Irreducible
@crazyGamer I've pasted the fourier plots by updating the question....Please have a look...Bharat

1 Answers

1
votes

If you have one reference signal s1 you can just subtract it from summary signal A and get target signal: s2 = A - s1.

But if you don't have one of those signal you can't get separate one. There are infinity number of compositions of different signals s1 and s2 that can create A like s1+s2. So it's imposible po separate them.