View Single Post
  #14   Report Post  
Posted to rec.audio.tech
David Nebenzahl
 
Posts: n/a
Default subtract one WAV file

spake thus:

David Nebenzahl wrote:

spake thus:

wrote:

When I invert a WAV and mix it with itself, I don't get silence.
Anyone know why?

Sure.

Unless the inverted copy is EXACTLY in sync and EXACTLY the
same, sample-for-sample, you WON'T get silence.


Yes, but if the OP is inverting a file and mixing it with itself, that
means it *should* be an exact inverse copy, and hence the mix should
result in silence.


No., read what the original poster actually said, please:

"What is the easiest way to subtract one WAV file from
another? I want to compute the amount of noise over a
comm system. "

He is NOT "inverting a file and mixing it with itself". He clearly
states is taking a WAVE file, sending over a comm system
and wants to compare the output with the input.

Only if you take a WAV file, simply copy it with no intermediate
loss or delay, then do what you're talking about, will you end up
with silence.


But that's exactly what he did; not with the two files he originally
asked about, but with one file he inverted with itself as a test. Can't
you read? Must you always try to complicate things, rather than simplify?

Be all that as it may, the invert-and-sum is NOT the way I would
do what the OP wants. What I would do is probably a whole lot
more sophisticated than he wants. I would take the two WAVE
files, cross-correlated them, which would give you the impulse
response of the COMM channel. Take the complex FFT of that,
and you have the transfer function of the COMM channel, complete
with noise.

Or, if he just wants to know how much noise the comm channel
is adding, assuming the noise is signal-independent, then simply
ship silnce over the comm link, and the result IS the noise added
by the comm channel.


Why second-guess the O.P.? Why not just answer his question, which was
pretty clear: "What is the easiest way to subtract one WAV file from
another?". Why impose your pedantry on it? Why assume they're an idiot,
and only you know what they *really* want?

Why? Because it's the Usenet Way.


--
Pierre, mon ami. Jetez encore un Scientologiste
dans le baquet d'acide.

- from a posting in alt.religion.scientology titled
"France recommends dissolving Scientologists"