Re: [linux-audio-dev] [LAD] GNU OCTAL range advice

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] [LAD] GNU OCTAL range advice
From: James McCartney (asynth_AT_io.com)
Date: Wed Mar 29 2000 - 05:41:13 EEST


on 3/28/00 7:19 PM, David O'Toole at dto_AT_qwsi.net wrote:

> However, someone suggested that this wasn't the way to go about it. He
> told me that going from -1.0 to +1.0 gave less precise calculations than
> using "the full range" of the float, i.e. -32768 .. 32767. But I thought
> floating point numbers avoided this somewhat; doesn't the point just
> "float" according to where your precision is needed?
>
> So my questions are:
>
> 1. Is using the larger range of the float better?

We just went over all the pros and cons here. You might look back.

No matter what scaling you use you get 24 bits of resolution with a 32 bit
float. There is no advantage to using the range +/-32K over using +/-1.0
when you are using a float. You will lose some bits when adding values.
However floats have a large enough signal to noise ratio that losing a
number of low order bits will be inaudible by a large margin. You can't
afford as much to lose bits using integer formats, because your signal to
noise ratio is amplitude dependant.

A float's signal to noise ratio is independant of amplitude, unlike integer
formats and is always 144 dB. A 24 bit integer has 144 dB SNR only for a 0
dB amplitude signal. Quieter signals have lower signal to noise ratio for
integer formats.

A floating point number has unlimited dynamic range for any practical
purpose due to the exponent. 24 bit integers have a maximum 144 dB dynamic
range.

> 2. Are there drawbacks involved in either approach? What are you all
> doing in your projects?

I use 32 bit floats and a range of -1 to +1.

--- james mccartney james_AT_audiosynth.com <http://www.audiosynth.com>
SuperCollider - a real time synthesis programming language for the PowerMac.
<ftp://www.audiosynth.com/pub/updates/SC2.2.7.sea.hqx>


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Mar 29 2000 - 06:22:48 EEST