From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6130 216.105.38.0/24 X-Spam-Status: No, score=-3.4 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 0974C1F453 for ; Wed, 26 Sep 2018 13:50:02 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1g5ACS-0003r1-Hw; Wed, 26 Sep 2018 13:49:56 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1g5ACQ-0003qc-M6 for sox-users@lists.sourceforge.net; Wed, 26 Sep 2018 13:49:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=7s2mqq7cOh+7zRhJrd0TfROTemUeR54AZOlBmNL9xfU=; b=mWOgpcrjQuIdsBMbJidrarlID Qhe6+6DDyrj2I3iBPcar7gMw8sCFH/2ML/smy5kM44HrG78IyJxz6j/ziZxaKWFBKJm+g6CjbKjWs zVZaHbklzyZhTVdcIq89BQsIZI1I3knolqbE6KP5B7Xn7oDiwMC4zrBKaLVtlwjuqQMUw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=7s2mqq7cOh+7zRhJrd0TfROTemUeR54AZOlBmNL9xfU=; b=ObLXS5iRphZ/ZrHSQapzHmdErQ A7k6Ll7+k7N8m6SX0hBsvMvUGh9NRVuH35LRlacmX1+G4lYXiNUVyirMYLaYz3u0Tar7wiMGDMiB5 UJn401hqBJvWUrGS+rDlrCXZL7NDObstn18Pc+y/umfvrI3S1B73qIh06wVl3+KLVlcc=; Received: from mail-lj1-f174.google.com ([209.85.208.174]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) id 1g5ACN-00BVKd-3w for sox-users@lists.sourceforge.net; Wed, 26 Sep 2018 13:49:54 +0000 Received: by mail-lj1-f174.google.com with SMTP id m84-v6so25235901lje.10 for ; Wed, 26 Sep 2018 06:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=7s2mqq7cOh+7zRhJrd0TfROTemUeR54AZOlBmNL9xfU=; b=VaVQw1uW3mSwYXS3OImGvUs2hyUR+APCoA0VSriP9K2x8muj3NLeuf8rkA0uaRuj01 mjUHZnZ0RImjr3SMkHylFpfe3Gvs1FSZfmfoa1KpWKw2YKwMiWHwXci83GTCll+XW5ar jHr0r0SEi+LGbAKkVBe9bTSKuWSJA0XvEZpi44bXUOrzOC4YzIBnn00rkrA4SMK1lcl+ DUf46vT/Nky9AS1UweJpQ7V9JoF1iNrxnq7bgA05qiSKZ2LEGmWnQN92YpRqYslto6/9 CVQ6bkXNOmBkwrms+jU8wUugOH2Zq9bqq3ki3Lg9SnG+fgvEvsa/IKZ0UEAsYOAQZZiN Mrlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=7s2mqq7cOh+7zRhJrd0TfROTemUeR54AZOlBmNL9xfU=; b=EAVW75qi/WdE9X7s8LPAfite3me2TtQ2pJ5Jx36NGhV806h1o0C5s5SKe0/vpnJ+Zb K0dRsuzDMyVKSEZNhIzPkA93zZIA+kdCQ14xX2uNiH8DOVqdfUDXhOIbXelryTvEPAMx XHVlVxcEeyBKv6F7jvl5ne/lMgOpPqyfPTVwgmROV49PY6aO/2cPQ9borfyF9tvq4W2I 4yjDU/9ciGz54Tgz66WUvxVulsP4j2u2uQc8eb+eVGv+FrRR64/aaWVRhpThKqkHF5bT a6G1ahnzFKWeCmEHStlhbvXOn/rOQZ0xZdxs9cC4XzqMI+BKxhlOedxatpGmIfn0Id3Q 3f5w== X-Gm-Message-State: ABuFfoiCd1gGcLVVhd0xl+8P3P8r+GG8uCO22LQFixXknPvIqG/IMyVZ FduN6hcbqpVb9TE7IV1hsexrB8IspQOWUHQTY+jYYSlb X-Google-Smtp-Source: ACcGV60S55Pu2F/XV9jUZGoPRoLl0vcWT44sAHJ+AyAmBROukn/TorzN34t2smiRyLrn0ZNJJWL4/6DHoz3LyuzdFTQ= X-Received: by 2002:a2e:7406:: with SMTP id p6-v6mr4883344ljc.5.1537969783817; Wed, 26 Sep 2018 06:49:43 -0700 (PDT) MIME-Version: 1.0 References: <20180925194254.GA13391@www.stare.cz> In-Reply-To: <20180925194254.GA13391@www.stare.cz> From: Mikko Olkkonen Date: Wed, 26 Sep 2018 16:49:31 +0300 Message-ID: To: sox-users@lists.sourceforge.net X-Headers-End: 1g5ACN-00BVKd-3w Subject: Re: remove known sample from audio X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-users@lists.sourceforge.net Content-Type: multipart/mixed; boundary="===============6840668438068168048==" Errors-To: sox-users-bounces@lists.sourceforge.net --===============6840668438068168048== Content-Type: multipart/alternative; boundary="000000000000a3c9eb0576c67e61" --000000000000a3c9eb0576c67e61 Content-Type: text/plain; charset="UTF-8" >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 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 0 vol > > 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 0 vol - // 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 --000000000000a3c9eb0576c67e61 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
>First of all, by &qu= ot;sample", you mean "signal",
>not some one sample value, right?

Jan, Thanks for your comments. That wiki= pedia Spill article describes my issue very well. That is, you got my reque= st exactly right (despite my signal vs sample terminology hassle). Anyway, = I have two mics (https:/= /www.piksu.com/eps/tmp/mic1.wav=C2=A0 and=C2=A0 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 examp= le 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
<= /div>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 f= inding those values ("point in time" 0.0115 and power/"volum= e" -0.13) is cumbersome. Basically, I am after a command to find one g= iven signal embedded in another given signal. Finding means finding the sta= rting point in time and the volume of the to-be-removed signal.
r= egards, 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 wr= ote:
> What is the best way to subtract a known sample from given audio i.e.<= br> > 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 a= re
> available.

Do you also have knownsample_delay_gain.wav ?

> pad delay and the vol parameter are known _roughly_ (X =3D~10ms,
> Y=3D~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 me= thod
> is very cumbersome:
> repeat {
> come up with some guessed X and Y
> sox knownsample.wav knownsample_delay_gain.wav pad <X> 0 vol -&l= t;Y> // is
> also inverted
> sox -m -v 1 original.wav -v 1 knownsample_delay_gain.wav final.wav sta= t
> } 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 oth= er
> instrument is audible in each recording. I want to remove the "wr= ong
> instrument" from each recording and have clean audio for both ins= truments.

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.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Jan



_______________________________________________
Sox-users mailing list
Sox-us= ers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/s= ox-users


--
Te= rveisin, Mikko
+358-40 506 6146

--000000000000a3c9eb0576c67e61-- --===============6840668438068168048== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============6840668438068168048== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users --===============6840668438068168048==--