From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Graff Newsgroups: gmane.comp.audio.sox Subject: Re: (no subject) Date: Wed, 25 Jul 2007 13:31:58 -0400 Message-ID: <20070725173158.97392B2709@lorax.ldc.upenn.edu> References: <20070725170221.75576BE031@joseph.doink.com> Reply-To: sox-users@lists.sourceforge.net NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1185384733 12069 80.91.229.12 (25 Jul 2007 17:32:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Jul 2007 17:32:13 +0000 (UTC) Cc: graff@ldc.upenn.edu To: sox-users@lists.sourceforge.net Original-X-From: sox-users-bounces@lists.sourceforge.net Wed Jul 25 19:32:12 2007 Return-path: Envelope-to: gcas-sox-users@gmane.org X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.0.4 In-Reply-To: Your message of "Wed, 25 Jul 2007 10:02:21 PDT." <20070725170221.75576BE031@joseph.doink.com> X-Spam-Score: 1.0 (+) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 1.0 FORGED_RCVD_HELO Received: contains a forged HELO X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.8 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: sox-users-bounces@lists.sourceforge.net Errors-To: sox-users-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.comp.audio.sox:1220 Archived-At: Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by lo.gmane.org with esmtp (Exim 4.50) id 1IDkiU-0006Pl-Ac for gcas-sox-users@gmane.org; Wed, 25 Jul 2007 19:32:06 +0200 Received: from sc8-sf-list1-new.sourceforge.net (sc8-sf-list1-new-b.sourceforge.net [10.3.1.93]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id 9D6E912103; Wed, 25 Jul 2007 10:32:05 -0700 (PDT) Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1IDkiO-0000IG-VB for sox-users@lists.sourceforge.net; Wed, 25 Jul 2007 10:32:01 -0700 Received: from lorax.ldc.upenn.edu ([158.130.16.184]) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1IDkiN-0001Up-Fu for sox-users@lists.sourceforge.net; Wed, 25 Jul 2007 10:32:00 -0700 Received: from lorax.ldc.upenn.edu (localhost.my.domain [127.0.0.1]) by lorax.ldc.upenn.edu (Postfix) with ESMTP id 97392B2709; Wed, 25 Jul 2007 13:31:58 -0400 (EDT) kevinc@doink.com said: > Is there a program which will convert a sound file into a text (.txt) > or comma separated value (.csv) file? I'm thinking that would be a > good route to go in order to import the data from a sound file into a > math manipulation program, e.g. octave, maxima, Matlab, Mathcad, > Gnumeric, etc. Someone else will probably know of existing tools for importing audio sample data into one or another math package, but if I had to convert from binary to ascii numerics, I'd probably use sox to convert the input file to a raw single-channel output of appropriate endian-ness, and run a perl one-liner to reformat the binary numbers into strings; e.g.: sox 1chn_pcm.wav -t raw - | perl -e 'while(read(STDIN,$_,2)==2){printf("%d\n",unpack("v",$_))}' > 1ch_pcm.txt (You probably want to elaborate the perl script to produce a different output format, depending on what your math package wants as input.) Dave Graff ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/