From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 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 246C41F5AE for ; Mon, 3 Aug 2020 13:41:43 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1k2aig-0007xv-Ig; Mon, 03 Aug 2020 13:41:38 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2aif-0007xg-33 for sox-devel@lists.sourceforge.net; Mon, 03 Aug 2020 13:41:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version :Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: 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=Ut44L6CHU7kz84e9heTqK4MBS3dc7oXEc+tKMJgav2Q=; b=VzH/uACFzn+X95TazkrlVPKJnN 34NfEERnfk/hm4FcxN3BPhCxpUqM/idirCuVOzPvPmYfbkMhbvUlHIpe9GgQ8v7H1CQsj+BTlM6rV QZvYzo2g6pmm3jwQD5bmJSsYrGi+yEnNXmD8jkT87mthMKCF9ruVPyfyeFzZ1L9KcTEQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=Ut44L6CHU7kz84e9heTqK4MBS3dc7oXEc+tKMJgav2Q=; b=FL1hHe3MGiA29MievmmTuRZGzm u0Koe0iHp/ocKEoEAeqSLQHMWze6ji3ZqZZfHFI/PPf8OA5jdLvmj/IRhtoTvDsFcr9McVcQ0mi9d ldKM9MtLE+ig/WweuIRVCLA8aviY3jJNT/ARkRmSV0OUB2lOuJyYmXGmHl+1Ou1uPZPk=; Received: from unicorn.mansr.com ([81.2.72.234]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1k2aic-007nBV-NW for sox-devel@lists.sourceforge.net; Mon, 03 Aug 2020 13:41:37 +0000 Received: from raven.mansr.com (raven.mansr.com [IPv6:2001:8b0:ca0d:8d8e::3]) by unicorn.mansr.com (Postfix) with ESMTPS id 915FE15360; Mon, 3 Aug 2020 14:41:24 +0100 (BST) Received: by raven.mansr.com (Postfix, from userid 51770) id 82EFF21A6F2; Mon, 3 Aug 2020 14:41:24 +0100 (BST) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Pander References: <20200731093801.23548-1-normalperson@yhbt.net> <20200731093801.23548-10-normalperson@yhbt.net> Date: Mon, 03 Aug 2020 14:41:24 +0100 In-Reply-To: (pander@users.sourceforge.net's message of "Mon, 3 Aug 2020 14:44:14 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Headers-End: 1k2aic-007nBV-NW Subject: Re: [PATCH RESEND 9/9] Added average power spectrum for stat -freq -a 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 Cc: Eric Wong , sox-devel@lists.sourceforge.net Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: sox-devel-bounces@lists.sourceforge.net Pander writes: > On 8/2/20 12:52, M=E5ns Rullg=E5rd wrote: >> M=E5ns Rullg=E5rd writes: >> >>>> + if (stat->fft_average) { >>>> + for (i =3D 0; i < samples / 2; i++) /* FIXME: should be <= =3D samples / 2 */ >>>> + fprintf(stderr, " %f %f\n", ffa * i, re_average[i] / l= en); >>>> + } >>> I don't understand the idea here. Unless I'm mistaken, this prints the >>> power spectrum averaged over however many FFT blocks happen to fit in >>> the input chunk, which could be none. >> Oh, and the "average" it calculates is bonkers too. > It provides an average of only full blocks, as partly filled blocks mess > up the average. Yes, of course, but I can't see the value of printing the average (even if calculated correctly) of some unspecified number of blocks. If audio data is supplied in small chucks, most calls won't fill even one FFT block, so you'll be printing a lot of zeros. > This is still in development and I plan to continue with it soon, > especially providing a test set demonstrating its value. Can you > please elaborate on what you mean with bonkers here? You're dividing the spectrum by the number of samples processed. That doesn't make sense. -- = M=E5ns Rullg=E5rd _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel