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=-4.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS,T_DKIM_INVALID 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 2FB321F597 for ; Sat, 4 Aug 2018 02:13:15 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1flm44-00077A-RG; Sat, 04 Aug 2018 02:13:08 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1flm43-00076y-R4 for sox-devel@lists.sourceforge.net; Sat, 04 Aug 2018 02:13:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:To:From:Date: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=DgI349yYBmNRI4ro06HH9t515CNsWdQEFNRnLmYgkJA=; b=b9f1sknJNbO33cDZhuewIWcsDU 3bxZvxGLDJ9MxlAWwz4qAaULVyCIc/WtocZprdJNO4kxXJJjjYHzORtR3+n6tAOvK/pVfgRO3NC9j G/nGMC+H/ZgzHA6RHv8fL7ytBo1fkjnENSk23jf7kRThP/ETybIqL9vClSk+pYXk/ThM=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To: From:Date: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=DgI349yYBmNRI4ro06HH9t515CNsWdQEFNRnLmYgkJA=; b=hou+fO21cf5HK+ZWnyuhq9XT1V wcujPBFhDEhx9SYnJbWOhC++o84SwrBPh6fYp2hIbGFG7f8icL6TO8RNOzzp4X59LSYQieieSmNMc 2a8H9qayi4b2mxgXm/9xtZYLl+jhqUuOkkgJMaT8DZCKXs9/KPhYlxBQi+B/nMLzVCHs=; Received: from dcvr.yhbt.net ([64.71.152.64]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1flm41-008FeU-6u for sox-devel@lists.sourceforge.net; Sat, 04 Aug 2018 02:13:07 +0000 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 490181F597; Sat, 4 Aug 2018 01:53:11 +0000 (UTC) Date: Sat, 4 Aug 2018 01:53:11 +0000 From: Eric Wong To: sox-devel@lists.sourceforge.net Message-ID: <20180804015311.52i2c3qxhnh5hd2n@dcvr> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Headers-End: 1flm41-008FeU-6u Subject: Re: Merge Request to add 192kHz support for RIAA effect X-BeenThere: sox-devel@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-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: sox-devel-bounces@lists.sourceforge.net Sonny Ray wrote: > I don't know how merge request notifications work on SourceForge; if this > is spammy, apologies. I didn't even know that was a thing on SF. Anyways I prefer all messaging be done via email so we can still message each other in case the centralized system bites the dust. > Maintainers, please check out this Merge Request that adds 192kHz support > to the RIAA biquad EQ effect using poles/zeros from a trusted source. > > https://sourceforge.net/p/sox/code/merge-requests/5 Since I don't use JavaScript, I had to read the HTML source to figure out how to get the code from your git repo via fetch. So I added the following 3 lines to my .git/config and fetched it via "git fetch rayrrr" [remote "rayrrr"] url = https://git.code.sf.net/u/rayrrr/sox fetch = refs/heads/*:refs/remotes/rayrrr/* And your change appears to be: commit 12b80e89e6a5928cb5f715895d5950dfbac11e53 Author: Ray <7869818+rayrrr@users.noreply.github.com> Date: Wed Aug 1 23:45:59 2018 -0400 Add 192k sample rate support to RIAA biquad effect. diff --git a/src/biquads.c b/src/biquads.c index 29440a7a..b30fee97 100644 --- a/src/biquads.c +++ b/src/biquads.c @@ -340,7 +340,8 @@ static int start(sox_effect_t * effp) p->a2 = 1 - sin(w0); break; - case filter_riaa: /* http://www.dsprelated.com/showmessage/73300/3.php */ + case filter_riaa: + /* https://www.dsprelated.com/showmessage/73300/3.php */ if (effp->in_signal.rate == 44100) { static const double zeros[] = {-0.2014898, 0.9233820}; static const double poles[] = {0.7083149, 0.9924091}; @@ -359,14 +360,21 @@ static int start(sox_effect_t * effp) make_poly_from_roots(zeros, (size_t)2, &p->b0); make_poly_from_roots(poles, (size_t)2, &p->a0); } + /* https://diyaudio.com/forums/analogue-source/203706-error-self-riaa-5.html#post2865323 */ else if (effp->in_signal.rate == 96000) { static const double zeros[] = {-0.1141486, 0.9676817}; static const double poles[] = {0.8699137, 0.9966946}; make_poly_from_roots(zeros, (size_t)2, &p->b0); make_poly_from_roots(poles, (size_t)2, &p->a0); } + else if (effp->in_signal.rate == 192000) { + static const double zeros[] = {-.1040610965, 0.9837523263}; + static const double poles[] = {0.9328992971, 0.9983633125}; + make_poly_from_roots(zeros, (size_t)2, &p->b0); + make_poly_from_roots(poles, (size_t)2, &p->a0); + } else { - lsx_fail("Sample rate must be 44.1k, 48k, 88.2k, or 96k"); + lsx_fail("Sample rate must be 44.1k, 48k, 88.2k, 96k, or 192k"); return SOX_EOF; } { /* Normalise to 0dB at 1kHz (Thanks to Glenn Davis) */ Which all seems fine based on what I can infer from surrounding code (haven't tested). Thanks. I'll let Mans deal with taking it upstream. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel