From: Eric Wong <normalperson@yhbt.net>
To: sox-devel@lists.sourceforge.net
Subject: Re: Merge Request to add 192kHz support for RIAA effect
Date: Sat, 4 Aug 2018 01:53:11 +0000 [thread overview]
Message-ID: <20180804015311.52i2c3qxhnh5hd2n@dcvr> (raw)
In-Reply-To: <CACVDyvHD037V9eWeyVJ4o+XGdSxV0y0L-MY5zjhdhfV072O=wg@mail.gmail.com>
Sonny Ray <sonnyray@gmail.com> 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
prev parent reply other threads:[~2018-08-04 2:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-02 5:03 Merge Request to add 192kHz support for RIAA effect Sonny Ray
2018-08-04 1:53 ` Eric Wong [this message]
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-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180804015311.52i2c3qxhnh5hd2n@dcvr \
--to=sox-devel@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).