* Merge Request to add 192kHz support for RIAA effect
@ 2018-08-02 5:03 Sonny Ray
2018-08-04 1:53 ` Eric Wong
0 siblings, 1 reply; 2+ messages in thread
From: Sonny Ray @ 2018-08-02 5:03 UTC (permalink / raw)
To: sox-devel
[-- Attachment #1.1: Type: text/plain, Size: 294 bytes --]
I don't know how merge request notifications work on SourceForge; if this
is spammy, apologies.
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
[-- Attachment #1.2: Type: text/html, Size: 496 bytes --]
[-- Attachment #2: Type: text/plain, Size: 202 bytes --]
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
[-- Attachment #3: Type: text/plain, Size: 158 bytes --]
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Merge Request to add 192kHz support for RIAA effect
2018-08-02 5:03 Merge Request to add 192kHz support for RIAA effect Sonny Ray
@ 2018-08-04 1:53 ` Eric Wong
0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2018-08-04 1:53 UTC (permalink / raw)
To: sox-devel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-04 2:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-02 5:03 Merge Request to add 192kHz support for RIAA effect Sonny Ray
2018-08-04 1:53 ` Eric Wong
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).