Page 2 of 2

Re: 16 v 24 bit noise floor

Posted: Wed Jul 28, 2010 12:15 am
by hellosailor
OK, Steve, you'vre got me baffled.

Are you saying that in Aud 1.2.6 when I set the quality option (in the preferences) for 24 or 32 bit sampling, it will not use more than 16 bits? Or just that it uses the extra bit depth internally but can't...what, can't produce any sound files that maintain that quality?

I'm not understanding something here, obviously. Enlighten me?

Re: 16 v 24 bit noise floor

Posted: Wed Jul 28, 2010 12:37 am
by steve
For 16 bit data, there are 65536 discrete values.
For 24 bit data there are 16777216 discrete values.

If you have a 16 bit sound card, each sample value will be one of those 65536 values - in effect, the digital representation of the analogue wave will move in tiny steps with a maximum resolution of 1/65536 of full scale.

24 bit audio is capable of finer resolution (smaller steps). The smallest step for 24 bit data being 1/16777216 (or 0.00000006 of full scale)

If you record in Audacity with the "Quality" setting at 32 bit (float), then whether you have recorded at 16 bit, or 24 bit, each sample value can be represented exactly in the 32 bit format. However, if you recorded from a 16 bit device, then there will still be a maximum of 65536 discrete values for the audio samples.

The limitation that Portaudio currently imposes (on Windows) is that if you have a 24 bit sound card, you will get the same amplitude resolution as you would with a 16 bit sound card.

Audacity runs internally at 32 bit (float) precision, irrespective of what format the audio is.

Is that any more clear?

Re: 16 v 24 bit noise floor

Posted: Wed Jul 28, 2010 3:01 am
by hellosailor
Yup. Crystal now.

IOW if I had a 24-bit sound card (which I don't) and I piped in the analog audio form my LPs or tapes, right now I'd only get 16-bit approximations of the analog signal. Full of rounding errors and crudely done, some would say.<G>

But once the new code comes, if I got a 24-bit sound card, I would be able to get a finer conversion of my analog source material to a more faithful digital conversion.

OK, I didn't want to convert those last 200 tapes this week anyway.<VBG>

May the coders be blessed with inspiration while they labor away!

Re: 16 v 24 bit noise floor

Posted: Mon Jun 13, 2011 10:06 pm
by chris319
WASAPI is now available in PortAudio and it works quite well. I worked with the PortAudio WASAPI expert, Dmitry Kostjuchenko, performing thorough quality control on his WASAPI implementation. I recently used a recording program I wrote to record a symphony concert using WASAPI and it worked flawlessly. In exclusive mode WASAPI delivers bit-perfect true 24 bits and is native to Windows, so it doesn't require a custom ASIO compilation. At this time I can't think of a reason not to incorporate WASAPI into Audacity.

Re: 16 v 24 bit noise floor

Posted: Mon Jun 13, 2011 11:28 pm
by steve
chris319 wrote:At this time I can't think of a reason not to incorporate WASAPI into Audacity.
I can think of one good reason, which is that the number one priority for the Audacity developers is to get Audacity 2.0 out (and that is well overdue). I bet that some of the developers will be itching to implement full WASAPI support in Audacity as soon as 2.0 has been successfully released.

Re: 16 v 24 bit noise floor

Posted: Tue Jun 14, 2011 12:12 am
by chris319
As a programmer who is intimately familiar with the PortAudio implementation of WASAPI, I can say that implementing it would require less than one day of coding. WASAPI has been in existence for almost five years now, so I suppose one's definition of "well overdue" is relative.

Re: 16 v 24 bit noise floor

Posted: Tue Jun 14, 2011 12:37 am
by steve
chris319 wrote: WASAPI has been in existence for almost five years now
I see there have been a lot of bug fixes for pa_win_wasapi.c over the last 12 months. I'm not a programmer, (I'm just interested), in your opinion is support for WASAPI in Portaudio now reliable and substantially bug free? To put it another way, would you say that the chance of introducing new bugs into Audacity by implementing WASAPI support was low / very low / extremely low / non-existent?

I agree that this would be an excellent step forward, but I also know that the Audacity developers are very reluctant to introduce any new features at this stage. If you would like to address them directly there is a developers mailing list: http://audacityteam.org/contact/lists

Re: 16 v 24 bit noise floor

Posted: Tue Jun 14, 2011 2:18 am
by chris319
I recently used a recording program I wrote to record a symphony concert using WASAPI and it worked flawlessly.
I wouldn't have used it for a live symphony performance if I felt there were still issues with it, and it didn't disappoint (it was the PortAudio implementation of WASAPI). The bug fixes you see over the past year+ are the results of my QC efforts with Dmitry. So yes, I would say the PortAudio implementation of WASAPI is ready to go.

Re: 16 v 24 bit noise floor

Posted: Tue Jun 14, 2011 7:09 am
by steve
Great, that sounds really encouraging. May I encourage you to contact the developers via the -devel mailing list about this. If you wish to discus anything related to this with me off-forum, feel free to send me a PM (link below my name on the right).