High Definition Audio

Discuss Play, an open source multi-format audio player.
Post Reply
asb
Posts: 2
Joined: Tue Apr 29, 2008 9:29 am

High Definition Audio

Post by asb » Tue Apr 29, 2008 9:31 am

Hi there,

I am using Windows+Foobar in a high end(ish) audio system and considering migrating to MAC very soon.

I have tested your player and so far it works fine and have the important functions I wanted. I am very happy that there is an alternative to I-Tunes for MAC.

I have one question. As you know the trend to high definition audio downloads are growing very rapidly. I have also bought some of the 24bit/96khz studio master songs in FLAC format and they sound great. But most of my collection is 16bit FLAC.

As I play mixed music, one song can be 16/44.1 and the next 24/96. Does Play adjust the bitrates (16bit and 24bit) automatically? You have written that "Play processes all audio using 32-bit floating point precision". Does that mean that we don't need any adjusting?

The DAC (Digital Analog Converter) side also needs to be explored, if it is done automatically.

Thanks in advance and keep up the good work.

User avatar
sbooth
Site Admin
Posts: 2445
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: High Definition Audio

Post by sbooth » Tue Apr 29, 2008 3:06 pm

Play converts all audio samples internally to 32-bit floats, regardless of the number of bits originally used for the sample size. This is mainly so DSP effects can be applied, but it also simplifies the code somewhat.

There is no adjustment required on the user end; audio is passed to the output device as 32-bit floating point numbers, and the audio hardware converts from floats to whatever native format it needs.

User avatar
Fuga
Posts: 391
Joined: Mon Jun 05, 2006 8:30 pm
Location: Texas

Re: High Definition Audio

Post by Fuga » Tue Apr 29, 2008 3:44 pm

I'm not a hi-end guy but my system ain't bad by any means (Dual turntable, Stanton cartridge, Onkyo amp, Polk Audio speakers (some of the originals, 27 years old, need refurbishing!). I have noticed this new app and do plan to play this weekend. Might interest you?

Hear

http://www.macobserver.com/article/2008/04/08.11.shtml

asb
Posts: 2
Joined: Tue Apr 29, 2008 9:29 am

Re: High Definition Audio

Post by asb » Tue May 20, 2008 11:57 am

Thanks for the reply. Another two questions:

1. How about the sample rate changes? Does it adjust them automatically or manually? eg. one song 44.1kHz, next one 96kHz

2. Regarding playlists: Can one song appear in multiple playlists?

User avatar
sbooth
Site Admin
Posts: 2445
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: High Definition Audio

Post by sbooth » Tue May 20, 2008 2:42 pm

asb wrote:1. How about the sample rate changes? Does it adjust them automatically or manually? eg. one song 44.1kHz, next one 96kHz

2. Regarding playlists: Can one song appear in multiple playlists?
1. It adjusts automatically. The only caveat is that songs of different sample rates cannot be played back gaplessly.

2. Yes.

doplay
Posts: 12
Joined: Sat May 24, 2008 11:27 pm

Re: High Definition Audio

Post by doplay » Sun May 25, 2008 12:43 am

Hi!

I'm a long-time mac-user and I've been asking myself the same question as the orignal poster, and it really seems to be an interesting one (aka sample rate changes).

My observation is that sample rate changes are in fact influencing (negatively) the final sound quality. That is, when the file played in iTunes (or Play) has a different sample rate than the soundcard (as set in Audio Midi Setup) it sounds worse than it could.

I found that a change from 44.1 (song played) to 88.2 (soundcard) is better than to 48 khz or 96 khz. 96 khz sounds ok., probably because it is higher, but 88.2 khz (exactly double 44,1 khz) sounds a little bit clearer and more precise. However, as I also have many recording in 48 khz, that sound best when played at 48 or 96 khz, the best compromise seems to be 96khz/24bit (no question about 24 bit).

I think the core of the problem is the quality of the resampling algorithm used by the system.

doplay
Posts: 12
Joined: Sat May 24, 2008 11:27 pm

Re: High Definition Audio

Post by doplay » Mon May 26, 2008 1:54 am

I may be a little late in this thread, but anyway, I have put up an example on rapidshare (http://rapidshare.com/files/117618773/r ... _.rar.html). It's a small piece from a cd (one minute). I have included the original (16bit, 44.1khz) and a version of the same, but resampled at very high quality to 96 khz.

It's just to illustrate that the way the system "automatically adjusts" the sampling rate is not the best there is.

When you play both, the first one gets resampled by the system, the second one is left alone (provided you have set your audio output to 96khz).
I think you can hear that the difference is not great, but surely noticable. The 96 khz file sound smoother, more vibrant, with more detail.

I don't know what the conclusion is. Convert all cds to 24/96khz? Oh no --v--f!!xx!

User avatar
sbooth
Site Admin
Posts: 2445
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: High Definition Audio

Post by sbooth » Mon May 26, 2008 5:36 am

I think a lot of this is system-dependent. On my MacBook Pro, in the Audio Midi properties for the system output device I can select 44.1, 48, or 96 at 2 ch 16 bit, 2 ch 20 bit, 2 ch 24 bit. Someone using and external DAC along with an external clock would surely have different options.

As far as I know once you select one of those output sample rates it becomes the hardware's "native" rate. So sending streams at any other rate will trigger a sample rate conversion in software. Maybe the issue you have is with the quality of the default sample rate converter?

doplay
Posts: 12
Joined: Sat May 24, 2008 11:27 pm

Re: High Definition Audio

Post by doplay » Mon May 26, 2008 6:04 pm

Yes, I think you're absolutely right in the assessment of the situation. It's system dependent, but at the same time it's universal, because nowadays almost everyone has high definition audio with their computers with soundcards that sound best at their highest sampling rate, while probably more than 90% of the music is in the cd-sampling-rate of 44.1khz. So many people are confronted (if i can call it that) with this issue, if they care about sound. On the other hand, the difference it makes is rather subtle, but I came across it even though I don't have a high end system by any means (I have a G5 with a M-Audio Transit soundcard). I ended up converting 3 or 4 of my CDs to 24 bit / 96 khz, then forgot about it. Anyway, I wouldn't mind if there was a tick-box in the Audio Midi Preferences for high-quality sample rate conversion, and I wouldn't mind sacrificing 20 - 30 % of cpu use to it. It's the same kind of little difference that drew me to use play (btw. thank you! for it) because mp3s just sound better with it.

doplay
Posts: 12
Joined: Sat May 24, 2008 11:27 pm

Re: High Definition Audio

Post by doplay » Mon Jun 02, 2008 11:33 pm

A little update: After some investigating, I found that this is an issue that seems to be taken seriously by some serious people. Most interesting was the following thread on Apple developer: "Quality of CoreAudio SRC (SRC = Sample rate converter)" http://lists.apple.com/archives/coreaud ... 00272.html).
Basically, iTunes was criticized for its bad src, which makes it undesirable for a real "stereophile" (this is the name of the magazine where an article appeared that first pointed at the problem), but it turns out that iTunes at least tries to do something about it. It sets up its own converter in the best quality available, but
1. even this doesn't sound very good (that's my opinion, on Leopard the quality has been improved according to the same thread, but i'm still using Tiger. When I compare it to 'Play', which uses the default, probably medium quality, converter, I can't say I find iTunes better (with upsampling 44.1, 48 -> 96)), iTunes sounds a bit clearer, but also more strained, even distorted, where Play sounds just fuzzy. Anyway, both open source offline converters i tried, 'ssrc_hp' and 'sndfile-resample' (Secret Rabbit Code), sounded much much better.
2. it fails to notice when the hardware-rate is changed (e.g. by the user in audio midi setup) which leads to a second, medium quality conversion chained after the first one which makes the result sound bad some more.
I verified that this is still the case with iTunes 7.6.2: When one samples iTunes with Activity Monitor one can see two BufferedAudioConverter Functions running at the same time (whereas with play there's only one).

User avatar
sbooth
Site Admin
Posts: 2445
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: High Definition Audio

Post by sbooth » Tue Jun 03, 2008 2:00 am

This is very interesting.

I wonder if there is a better solution on the PC?

doplay
Posts: 12
Joined: Sat May 24, 2008 11:27 pm

Re: High Definition Audio

Post by doplay » Tue Jun 03, 2008 9:59 am

I don't know anything about the PC, sorry. On the thread I mentioned someone from Apple wrote:
(1) We have made some significant improvements to the sample rate converter in Leopard - so if you want re-evaluate it, that would be very helpful. We've also added a new property to allow for the selection of different algorithms when doing SRC, including the provision of a new mastering quality converter ('bats') that we believe is very good. So, aside from the caveats that Stephen provided, we would certainly expect to see some improvements here.
So, there are likely to be improvements on the Mac side.

As I understand it, an app has to specifically request these new qualities (mastering quality), and as these are Leopard only, I would
like to know if one can use these new converters in an app and still stay compatible to Tiger.

rsdio
Posts: 7
Joined: Mon Jun 23, 2008 10:27 pm

Re: High Definition Audio

Post by rsdio » Mon Jun 23, 2008 10:42 pm

As I understand it, an app has to specifically request these new qualities (mastering quality), and as these are Leopard only, I would
like to know if one can use these new converters in an app and still stay compatible to Tiger.
It depends upon what you mean. You cannot use the new converters at all on Tiger because they're not there. But the API itself is available on Tiger, it's just that the highest quality level is only available on Leopard. You can certainly use the next highest quality level from Tiger. So it's merely a matter of writing an app which requests the appropriate level, checking for error codes, and falling back to an available quality level.

Another thing to consider is that the highest quality SRC may not run in real time, particularly on older machines. So you can't listen to a song through the SRC. In those cases, the only option is to convert in advance and play the new files.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest