sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Mikko Olkkonen <molkko@gmail.com>
To: sox-users@lists.sourceforge.net
Subject: Re: remove known sample from audio
Date: Wed, 26 Sep 2018 16:49:31 +0300	[thread overview]
Message-ID: <CANWtmUBbTG1F1rMOzyBXRjc5h-iLCASsSdD=w8JvfJkW+xX24A@mail.gmail.com> (raw)
In-Reply-To: <20180925194254.GA13391@www.stare.cz>


[-- Attachment #1.1: Type: text/plain, Size: 3379 bytes --]

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

Jan, Thanks for your comments. That wikipedia Spill article describes my
issue very well. That is, you got my request exactly right (despite my
signal vs sample terminology hassle). Anyway, I have two mics (
https://www.piksu.com/eps/tmp/mic1.wav  and
https://www.piksu.com/eps/tmp/mic2.wav) and audible spill in both. I want
to remove the spill from both. I am able to remove the spill in this
specific case (with outstanding results) for example for mic1.wav with
commands
sox mic2.wav mic2id.wav pad 0.0115 0 vol -0.13
sox -m -v 1 mic1.wav -v 1 mic2id.wav mic1clean.wav stat
i.e. by inverting the other mic and mixing that _at suitable_ point in time
and suitable power to the signal to be cleaned. The problem is that finding
those values ("point in time" 0.0115 and power/"volume" -0.13) is
cumbersome. Basically, I am after a command to find one given signal
embedded in another given signal. Finding means finding the starting point
in time and the volume of the to-be-removed signal.
regards, Mikk00


On Tue, Sep 25, 2018 at 11:10 PM Jan Stary <hans@stare.cz> wrote:

> On Sep 25 12:26:36, molkko@gmail.com 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
>
>
>
> _______________________________________________
> Sox-users mailing list
> Sox-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users
>


-- 
Terveisin, Mikko
+358-40 506 6146

[-- Attachment #1.2: Type: text/html, Size: 4824 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

  reply	other threads:[~2018-09-26 13:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-25  9:26 remove known sample from audio Mikko Olkkonen
2018-09-25 19:42 ` Jan Stary
2018-09-26 13:49   ` Mikko Olkkonen [this message]
2018-09-26 18:16     ` Jan Stary
2018-09-26 18:35       ` Jan Stary
2018-09-27  6:24       ` Mikko Olkkonen
2018-09-27  9:48         ` Jan Stary

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-users

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANWtmUBbTG1F1rMOzyBXRjc5h-iLCASsSdD=w8JvfJkW+xX24A@mail.gmail.com' \
    --to=sox-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).