From owner-freebsd-multimedia Wed Jul 18 8:46: 4 2001 Delivered-To: freebsd-multimedia@freebsd.org Received: from mail.numachi.com (numachi.numachi.com [198.175.254.2]) by hub.freebsd.org (Postfix) with SMTP id 8550037B40C for ; Wed, 18 Jul 2001 08:46:01 -0700 (PDT) (envelope-from reichert@natto.numachi.com) Received: (qmail 19729 invoked by uid 3001); 18 Jul 2001 15:45:59 -0000 Received: from natto.numachi.com (198.175.254.216) by numachi.numachi.com with SMTP; 18 Jul 2001 15:45:59 -0000 Received: (qmail 71822 invoked by uid 1001); 18 Jul 2001 15:45:59 -0000 Date: Wed, 18 Jul 2001 11:45:59 -0400 From: Brian Reichert To: Christoph Kukulies Cc: multimedia@freebsd.org Subject: Re: writing a sine to a .wav Message-ID: <20010718114559.Q49286@numachi.com> References: <200107181542.f6IFgtl63993@gilberto.physik.rwth-aachen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200107181542.f6IFgtl63993@gilberto.physik.rwth-aachen.de>; from kuku@gilberto.physik.rwth-aachen.de on Wed, Jul 18, 2001 at 05:42:55PM +0200 Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Jul 18, 2001 at 05:42:55PM +0200, Christoph Kukulies wrote: > Does anyone know of a function (API) or whatever that allows for generating > .wav data (or .mp3) data out of mathematical functions like sin(x),sin(2x), > sin(3x) etc. Well, sox(1) seems to be the switchblade knife for sound file conversion, and it can accept 'raw' and 'textual' data. .dat Text Data files These files contain a textual representation of the sample data. There is one line at the beginning that contains the sample rate. Subse- quent lines contain two numeric data items: the time since the beginning of the sample and the sample value. Values are normalized so that the maximum and minimum are 1.00 and -1.00. This file format can be used to create data files for external programs such as FFT analyzers or graph routines. SoX can also convert a file in this format back into one of the other file formats. I have no idea if that's useful for you, though... > -- > Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-multimedia" in the body of the message -- Brian 'you Bastard' Reichert 37 Crystal Ave. #303 Daytime number: (603) 434-6842 Derry NH 03038-1713 USA Intel architecture: the left-hand path To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message