Re: remove known sample from audio

Jan Stary <[email protected]>
Newsgroups gmane.comp.audio.sox
Message-ID <[email protected]>
On Sep 25 12:26:36, [email protected] wrote:
> What is the best way to subtract a known sample from given audio i.e.
> extract/reconstruct the original.wav from final.wav when final.wav has been
> created with commands:
> 
> sox knownsample.wav knownsample_delay_gain.wav pad <X> 0 vol <Y>
> sox -m original.wav knownsample_delay_gain.wav final.wav

First of all, by "sample", you mean "signal",
not some one sample value, right?

> original.wav is not anymore available. knownsample.wav and final.wav are
> available.

Do you also have knownsample_delay_gain.wav ?

> pad delay and the vol parameter are known _roughly_ (X =~10ms,
> Y=~0.1)

So you want to reconstruct original.wav from the mix
AND one of the originals - that's quite different than reconstructing
from just the mix.wav (which I doubt would be possible).

> PS1, I can reconstruct the original with the process below but this method
> is very cumbersome:
> repeat {
> come up with some guessed X and Y
> sox knownsample.wav knownsample_delay_gain.wav pad <X> 0 vol -<Y> // is
> also inverted
> sox -m -v 1 original.wav -v 1 knownsample_delay_gain.wav final.wav stat
> } until RMS amplitude reported by stat has reached local minimum

You said you no longer have original.wav, but you are using it here.
So what's there to reconstruct?

> PS2, The original problem is a two musical instruments recorded
> simultaneously in the same space. They have their own mics but the other
> instrument is audible in each recording. I want to remove the "wrong
> instrument" from each recording and have clean audio for both instruments.

https://en.wikipedia.org/wiki/Spill_(audio)
This should be your starting paragraph, not PS2.

So show us the files: the mix (final.wav) and
the non-delayed bleeding instrument (knownsample.wav).
Also, name them more plainly (guitar, trumpet, mix - or whatever).

It will be much easier to help you then.


	Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.