From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Desbonnet Newsgroups: gmane.comp.audio.sox.devel Subject: Re: Modification to spectrogram.c for log frequency axis and setting lower/upper chart frequency Date: Mon, 17 Feb 2014 11:36:35 +0000 Message-ID: References: <20140217061447.GA7537@dcvr.yhbt.net> Reply-To: sox-devel@lists.sourceforge.net NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4690628408809067765==" X-Trace: ger.gmane.org 1392636999 8153 80.91.229.3 (17 Feb 2014 11:36:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Feb 2014 11:36:39 +0000 (UTC) To: sox-devel@lists.sourceforge.net Original-X-From: sox-devel-bounces@lists.sourceforge.net Mon Feb 17 12:36:47 2014 Return-path: Envelope-to: gcasd-sox-devel@m.gmane.org Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.214.177 as permitted sender) client-ip=209.85.214.177; envelope-from=jdesbonnet@gmail.com; helo=mail-ob0-f177.google.com; X-Received: by 10.60.124.137 with SMTP id mi9mr19982991oeb.11.1392636995507; Mon, 17 Feb 2014 03:36:35 -0800 (PST) In-Reply-To: <20140217061447.GA7537@dcvr.yhbt.net> X-Spam-Score: -0.6 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jdesbonnet[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1WFMV6-0004V6-VQ X-BeenThere: sox-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: sox-devel-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.comp.audio.sox.devel:357 Archived-At: Received: from lists.sourceforge.net ([216.34.181.88]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WFMVD-0002ub-6A for gcasd-sox-devel@m.gmane.org; Mon, 17 Feb 2014 12:36:47 +0100 Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WFMV9-00050E-Sx; Mon, 17 Feb 2014 11:36:43 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WFMV8-000502-7o for sox-devel@lists.sourceforge.net; Mon, 17 Feb 2014 11:36:42 +0000 Received: from mail-ob0-f177.google.com ([209.85.214.177]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1WFMV6-0004V6-VQ for sox-devel@lists.sourceforge.net; Mon, 17 Feb 2014 11:36:41 +0000 Received: by mail-ob0-f177.google.com with SMTP id wp18so16706666obc.22 for ; Mon, 17 Feb 2014 03:36:35 -0800 (PST) Received: by 10.60.21.67 with HTTP; Mon, 17 Feb 2014 03:36:35 -0800 (PST) --===============4690628408809067765== Content-Type: multipart/alternative; boundary=047d7b471be26b1c5a04f298911e --047d7b471be26b1c5a04f298911e Content-Type: text/plain; charset=ISO-8859-1 Eric, Thanks for the feedback. Ya, good point re the low==high /0 problem. Forced low wrote: > Joe Desbonnet wrote: > > If this code is worth contributing please advise what are the next steps > > (if any). Consider this code contributed under whatever terms that are > > required to have it added to the project. > > You mentioned there was already an open feature request? uploading the > patch to the bugtracker should be a start. AFAIK, most of the sox > developers are busy at the moment with real-life stuff. > > I just cloned your blog and looked at it (a diff/cloned sox.git repo > would've been better), and it looks mostly OK... > Did you make sure log10_high_freq != log10_low_freq anywhere? Otherwise > you might divide by zero: > > float log_scale = (float)p->rows/(log10_high_freq - log10_low_freq); > > I'm only a simple C programmer and don't know the math behind > spectrograms, though. > > (*) not sure how pick sox devs are about trailing whitespace, > but other projects I work tend to be very picky :) > > > ------------------------------------------------------------------------------ > Android apps run on BlackBerry 10 > Introducing the new BlackBerry 10.2.1 Runtime for Android apps. > Now with support for Jelly Bean, Bluetooth, Mapview and more. > Get your Android app in front of a whole new audience. Start now. > > http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk > _______________________________________________ > SoX-devel mailing list > SoX-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sox-devel > --047d7b471be26b1c5a04f298911e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Eric,

Thanks for the feedback. Ya, good point= re the low=3D=3Dhigh /0 problem. Forced low<high when parsing cmd line = opts. Added diff to my git repository and updated ticket with link to the p= atch.

Regards,

Joe.
=


On Mon, Feb 17, 2014 at 6:14 AM, Eric Wong <normalperson@yhbt.net> wrote:
Joe Desbonnet <jdesbonnet@gmail.com> wrote:
> If this code is worth contributing please advise what are the next ste= ps
> (if any). Consider this code contributed under whatever terms that are=
> required to have it added to the project.

You mentioned there was already an open feature request? =A0uploading= the
patch to the bugtracker should be a start. =A0AFAIK, most of the sox
developers are busy at the moment with real-life stuff.

I just cloned your blog and looked at it (a diff/cloned sox.git repo
would've been better), and it looks mostly OK...
Did you make sure log10_high_freq !=3D log10_low_freq anywhere? =A0Otherwis= e
you might divide by zero:

=A0 =A0float log_scale =3D (float)p->rows/(log10_high_freq - log10_low_f= req);

I'm only a simple C programmer and don't know the math behind
spectrograms, though.

(*) not sure how pick sox devs are about trailing whitespace,
=A0 =A0 but other projects I work tend to be very picky :)

---------------------------------------------------------------------------= ---
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. =A0Start now.
http://pubads.g.doubleclick.net/gam= pad/clk?id=3D124407151&iu=3D/4140/ostg.clktrk
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourcefo= rge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

--047d7b471be26b1c5a04f298911e-- --===============4690628408809067765== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk --===============4690628408809067765== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel --===============4690628408809067765==--