Forums

How to add two add two correlated signals, but NOT have comb filtering...

Started by sparafucile17 August 20, 2008
I have two audio signals that are correlated but one of them is a delayed
version of the first signal (let say by 10ms).  Now I want to sum them
together, but of course, this produces a nasty comb filter.  

So the first thing that sprung to mind was to allpass the "first" signal
to approximate the 10ms delay of the second.  This works good because I can
tolerate some combing but at higher frequencies. (say > 200Hz)  By
trial-and-error, I found that one sos allpass could effectively eliminate
one comb "tooth".  So all is good, right?

Well no actually, because I also want to preserve the time delay
relationship after summation.  This is key for my application.  When the
combined signal comes out of a loudspeaker, I want one sound to come 10ms
after the other.  

o   Let Signal A be a periodic snare hit at 100ms intervals
o   Let Signal B be a periodic snare hit at 110ms intervals
o   Both signals start at the same time: T=0

After summation I want to see TWO snare hits happening very closely
together and NOT one large snare hit.

The problem with the Allpass method, is that in approximating a 10ms
delay, I have effectively added a 10ms for frequencies less than 200Hz only
what is exactly what I was trying to avoid!!!

----------------------------------------------

Any ideas on how to sum two delay signals, preserve the delay, but NOT
have comb filtering?  Any idea or suggestion is welcome.


Jeff
sparafucile17 wrote:
> I have two audio signals that are correlated but one of them is a delayed > version of the first signal (let say by 10ms). Now I want to sum them > together, but of course, this produces a nasty comb filter. > > So the first thing that sprung to mind was to allpass the "first" signal > to approximate the 10ms delay of the second. This works good because I can > tolerate some combing but at higher frequencies. (say > 200Hz) By > trial-and-error, I found that one sos allpass could effectively eliminate > one comb "tooth". So all is good, right? > > Well no actually, because I also want to preserve the time delay > relationship after summation. This is key for my application. When the > combined signal comes out of a loudspeaker, I want one sound to come 10ms > after the other. > > o Let Signal A be a periodic snare hit at 100ms intervals > o Let Signal B be a periodic snare hit at 110ms intervals > o Both signals start at the same time: T=0 > > After summation I want to see TWO snare hits happening very closely > together and NOT one large snare hit. > > The problem with the Allpass method, is that in approximating a 10ms > delay, I have effectively added a 10ms for frequencies less than 200Hz only > what is exactly what I was trying to avoid!!! > > ---------------------------------------------- > > Any ideas on how to sum two delay signals, preserve the delay, but NOT > have comb filtering? Any idea or suggestion is welcome.
<grouch mode> This is an amusing dilemma. If you mean what you say, then you don't know what you're talking about. :-) To quote you again: o Let Signal A be a periodic snare hit at 100ms intervals o Let Signal B be a periodic snare hit at 110ms intervals o Both signals start at the same time: T=0 Signal A occurs at t = 0, 100, 200, ... 100*n, ... Signal B occurs at t = 0, 110, 220, ... 110*n, ... If you don't mean than, then you don't mean what you say. A simple delay of n seconds is a shift register or circular buffer that is n*(sample rate) stages long. No approximations. Jerry -- Engineering is the art of making what you want from things you can get. &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
> ><grouch mode> > >This is an amusing dilemma. If you mean what you say, then you don't >know what you're talking about. :-) To quote you again: >o Let Signal A be a periodic snare hit at 100ms intervals >o Let Signal B be a periodic snare hit at 110ms intervals >o Both signals start at the same time: T=0 > >Signal A occurs at t = 0, 100, 200, ... 100*n, ... >Signal B occurs at t = 0, 110, 220, ... 110*n, ... > >If you don't mean than, then you don't mean what you say. > >A simple delay of n seconds is a shift register or circular buffer that >is n*(sample rate) stages long. No approximations. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533; >
Hmm... yes, I may have used a bad example. What I meant to say that Signal B always is 10ms delay from Signal A. So, using you're timing nomenclature: Signal A occurs at t = 0, 100, 200, ... 100*n Signal B occurs at t = 0, 110, 210, ... (100*n) + 10 And for arguments sake, lets assume that the duration of the snare hit is 30ms in length. That means there will be some overlap when both signals are summed. Here is what I would want to see: After sum: @ T=100:110, my orginal Signal A snare hit @ T=110:130, a snare hit that has *MORE* amplitude than original @ T=130:140, my orginal Signal B snare hit Again what I'm trying to avoid is that when both signals are present and being summed, a comb effect occurs effectively REDUCING the amplitude. Sorry, for my inconsistent post. It was after a long day of hair-pulling on this subject.... - Jeff
sparafucile17 wrote:

> Any ideas on how to sum two delay signals, preserve the delay, but NOT > have comb filtering? Any idea or suggestion is welcome.
It is not clear exactly what you are trying to achieve. The comb filtering is a direct result of the delay. Remove the delay, and the comb filtering goes away. Preserve the delay and the comb filtering stays. You can't keep one and eliminate the other, except within some limited frequency band(s) by manipulating the phase, which you have apparently already tried and rejected. Greg
sparafucile17 wrote:
>> <grouch mode> >> >> This is an amusing dilemma. If you mean what you say, then you don't >> know what you're talking about. :-) To quote you again: >> o Let Signal A be a periodic snare hit at 100ms intervals >> o Let Signal B be a periodic snare hit at 110ms intervals >> o Both signals start at the same time: T=0 >> >> Signal A occurs at t = 0, 100, 200, ... 100*n, ... >> Signal B occurs at t = 0, 110, 220, ... 110*n, ... >> >> If you don't mean than, then you don't mean what you say. >> >> A simple delay of n seconds is a shift register or circular buffer that >> is n*(sample rate) stages long. No approximations. >> >> Jerry >> -- >> Engineering is the art of making what you want from things you can get.>> > > Hmm... yes, I may have used a bad example. What I meant to say that > Signal B always is 10ms delay from Signal A. So, using you're timing > nomenclature: > > Signal A occurs at t = 0, 100, 200, ... 100*n > Signal B occurs at t = 0, 110, 210, ... (100*n) + 10 > > And for arguments sake, lets assume that the duration of the snare hit is > 30ms in length. That means there will be some overlap when both signals > are summed. Here is what I would want to see: > > After sum: > @ T=100:110, my orginal Signal A snare hit > @ T=110:130, a snare hit that has *MORE* amplitude than original > @ T=130:140, my orginal Signal B snare hit > > Again what I'm trying to avoid is that when both signals are present and > being summed, a comb effect occurs effectively REDUCING the amplitude. > > Sorry, for my inconsistent post. It was after a long day of hair-pulling > on this subject....
No problem. I just didn't want to address the wrong issue. I still don't see what you want the delay to do. (I don't think you mean correlated in the technical sense, but I may be wrong.) Have you listened to the two snare hits summed? There's a comb-filter effect when a drummer plays that way. The difference is that the sounds are produced by a physical mechanism and are therefore not absolutely identical. The comb-filter effect is part od the difference in timbre between a single violin and a whole violin section. It's part of the way we hear music, so simple summation might sound natural. If it doesn't, the best cure is a secand snare sample. Jerry -- Engineering is the art of making what you want from things you can get.
>sparafucile17 wrote: > >> Any ideas on how to sum two delay signals, preserve the delay, but NOT >> have comb filtering? Any idea or suggestion is welcome. > >It is not clear exactly what you are trying to achieve. The comb >filtering is a direct result of the delay. Remove the delay, and the >comb filtering goes away. Preserve the delay and the comb filtering >stays. You can't keep one and eliminate the other, except within some >limited frequency band(s) by manipulating the phase, which you have >apparently already tried and rejected. > >Greg >
Greg, Yes I guess I am trying to defy physics once again... I just thought there might be an approach to summing delayed correlated signals, maintain the delay, and somehow UNDO the combing amplitude effects. I've just been tinkering around with adding an IIR comb filter to sorta "fill-in" the holes produced by the standard FIR comb (original prob), with little success. Yes I did reject the limited frequency band approach because, as I said, it removed the time delay that I want to preserve. After realizing this, it seems like it's not worth allpasses and I might as well time delay signal B to remove the comb. In the end I may be stuck here and will have to tradeoff delay for good magnitude response as you indicated. But I figure I'd float this out there for all the group, in case there is a innovative approach to the problem. Thanks, Jeff
Jerry Avins wrote:
(snip)

> Have you listened to the two snare hits summed? There's a comb-filter > effect when a drummer plays that way. The difference is that the sounds > are produced by a physical mechanism and are therefore not absolutely > identical. The comb-filter effect is part od the difference in timbre > between a single violin and a whole violin section. It's part of the way > we hear music, so simple summation might sound natural. If it doesn't, > the best cure is a secand snare sample.
Back to the coherence question again. Two violins won't be tuned exactly the same on the time scale required for a concert. If you electronically generate violin sounds and combine them, they might be coherent. It would seem that this problem would come up more often in electronically generated music. -- glen
well I think the comb filtering and time delay are orthogonal views of
the same thing related by the FT and therefore you can't have one
without the other...

it is also interesting to consider therefore that complicated
reverberation in a room MUST also imply a very complicated and messy
frequency response..

and again you can't have one without the other..

Mark
glen herrmannsfeldt wrote:
> Jerry Avins wrote: > (snip) > >> Have you listened to the two snare hits summed? There's a comb-filter >> effect when a drummer plays that way. The difference is that the >> sounds are produced by a physical mechanism and are therefore not >> absolutely identical. The comb-filter effect is part od the difference >> in timbre between a single violin and a whole violin section. It's >> part of the way we hear music, so simple summation might sound >> natural. If it doesn't, the best cure is a secand snare sample. > > Back to the coherence question again. > > Two violins won't be tuned exactly the same on the time > scale required for a concert. If you electronically > generate violin sounds and combine them, they might be > coherent. It would seem that this problem would come > up more often in electronically generated music.
That is why I suggested using two snare samples instead of repeating the one. All non-coherent sources do, though, is make the cancellation notches move around. I suspect that's good. Aren't comb filters used to create "chorus"? Jerry -- Engineering is the art of making what you want from things you can get. &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
sparafucile17 <sparafucile17@hotmail.com> wrote:
>> >><grouch mode> >> >>This is an amusing dilemma. If you mean what you say, then you don't >>know what you're talking about. :-) To quote you again: >>o Let Signal A be a periodic snare hit at 100ms intervals >>o Let Signal B be a periodic snare hit at 110ms intervals >>o Both signals start at the same time: T=0 >> >>Signal A occurs at t = 0, 100, 200, ... 100*n, ... >>Signal B occurs at t = 0, 110, 220, ... 110*n, ... >> >>If you don't mean than, then you don't mean what you say. >> >>A simple delay of n seconds is a shift register or circular buffer that > > Again what I'm trying to avoid is that when both signals are present and > being summed, a comb effect occurs effectively REDUCING the amplitude.
The comb effect is inherent to what you're trying to do. If you want to avoid this, use two non-correlated samples instead of one. You might have a chance by distorting the phase of one of the snares with some kind of all-pass filter; this reduces correlation between the two samples, but will not be very obvious to the human ear. Ico -- :wq ^X^Cy^K^X^C^C^C^C