Audio CD File System in the Works
Haiku developer Axel Dörfler has started to work on a CDDA file system for playing audio CDs for Haiku. CDDA-FS allows Haiku users to view and play music tracks from mounted audio CDs as if they were WAV files. CDDA-FS also supports CD-Text which means that information like album titles, artist names, and song titles available from the CD itself will be shown as file attributes, so that they can be viewed and edited in Tracker.
While CDDA-FS is not finished yet, it can already be used to play back CD contents as you can see from the screenshot. The file system is accompanied by a small test application "cdda_text" which also runs under BeOS and prints all information CDDA-FS can retrieve from the specified CD.

Comments
Re: Audio CD File System in the Works
Great! even better than BeOS.
Should add the screenshot to the "Screenshot Tour" page.
:)
Re: Audio CD File System in the Works
Please use lossless compressed formats as default: flac or ape (better), not wav. Help users to save up their disk space
Re: Audio CD File System in the Works
Please use lossless compressed formats as default: flac or ape (better), not wav. Help users to save up their disk space
If you want to rip/compress/import you should be using some application. If this audio CD filesystem did on-the-fly compression from raw audio data to FLAC, and you have an audio player read the FLAC files and uncompress from FLAC to raw audio data, to be able to play them, you have wasted a lot of CPU time for nothing.
The reason that you get WAV instead of some ".raw_track_data" type files, is that the conversion is a very simple and cheap operation, unlike conversion to a compressed format. WAV is a good match for the data on audio CDs, it's well-known and easy to support in audio players.
Remember that this is a filesystem, which lives in the kernel. It must small, stable, secure and not waste memory or CPU time. Any unnecessary work done in the kernel could potentially KDL the OS if there's a problem in the code, so it's a bad idea to do too much in there. It could also be bad for GUI responsiveness.
This is primarily a way to access read-only audio CDs in a convenient way, and to have the system keep track of the CD metadata that applications collect from CDDB etc, so applications don't have to build their own databases.
Re: Audio CD File System in the Works
you have wasted a lot of CPU time for nothing
untrue.
less than 5% of CPU even on slow (1st or 2nd gen Pentium) machines. and not for "nothing", but for saving space.
WAV is a good match for the data on audio CDs, it's well-known and easy to support in audio players
much more players supports mp3 :)
Remember that this is a filesystem, which lives in the kernel. It must small, stable, secure and not waste memory or CPU time. Any unnecessary work done in the kernel could potentially KDL the OS if there's a problem in the code, so it's a bad idea to do too much in there. It could also be bad for GUI responsiveness
You forgot, that a lot of FS supports transparent data compression.
NTFS for example
Re: Audio CD File System in the Works
less than 5% of CPU even on slow (1st or 2nd gen Pentium) machines. and not for "nothing", but for saving space.
That's not how I recall the Pentiums, but I suppose you could be right. We can probably argue all day on which is worse, disk waste or CPU waste.
The one true benefit I can see is dragging compressed files directly from CD to a USB player device, but I still don't think media codecs belong in the kernel.
It would be bad if FLAC is chosen, then some other people want APE or whatever, then there's suddenly demand for Audio CD codec preferences, and a few steps down that slippery slope Haiku isn't "void of unnecessary complexity" anymore. I would much rather leave it to applications to add an abundance of choice and unnecessary complexity, AKA third party opportunity.
much more players supports mp3 :)
Good point. Of course MP3 is out of the question.
We can't have a lossy format to begin with.
You forgot, that a lot of FS supports transparent data compression.
NTFS for example
I trust NTFS a lot more than I would any non-trivial media codec.
Re: Audio CD File System in the Works
Couldn't there be an option to encode the wav files to some other format if you drag them to the Desktop or even a prompt when you insert a disc?
"Would you like to listen to the cd or copy the files to your hard drive ?"
Re: Audio CD File System in the Works
One could present multiple compressed formats out of the box like this:
/Artist/wav/ Song 1, 2, ...
/Artist/flac/ Song 1, 2, ...
/Artist/mp3/ Song 1, 2, ...
/Artist/ape/ ...
/Artist/...
The old cdda filesystem had a folder hierarchy like this:
/Artist/cdda/ Song 1, 2, ... (zero size files, open CDPlayer)
/Artist/wav/ Song 1, 2, ... (these open in, e.g. SoundPlay)
/Artist/ReadMe
/Artist/settings
The new cdda filesystem has been simplified to
/Artist/ Song 1, 2, ... (in wav format)
Just the tracks and nothing else, and that's a good thing, IMO.
Re: Audio CD File System in the Works
Couldn't there be an option to encode the wav files to some other format if you drag them to the Desktop
As Tracker is the one that presents both source and target filesystems and does the actual copying, yes, it could offer to do conversion. That would be a lot better than doing this in the kernel, as Tracker can't take down the entire system and it can use the services of the Media Kit. But it's a clear case of feature creep. This isn't one of Tracker's essential services. If this would be added to Tracker, it becomes easier mentally, to add special case treatment for other things as well.
or even a prompt when you insert a disc?
"Would you like to listen to the cd or copy the files to your hard drive ?"
Any application could watch for volume mounts and offer to convert and copy. "HaiTunes".
Instead of optimizing for storage too early (IMO), you could have a disk space daemon kick in when available space gets low, which would offer to compress your wavs, etc.
You could make a flac daemon and userland filesystem that would make another CD appear, with the same songs in flac format.
It's not necessary to add these things to the in-kernel filesystem or to Tracker.
Re: Audio CD File System in the Works
Wav is proprietary
Flac is free
Daemons & "HaiTunes" way is not transparent way, therefore sucks :) Each OS have own fileformat for store audiosamples: wav, iff, aiff.
Why free OS not uses free Flac?
Re: Audio CD File System in the Works
I'm completely with Jonas on this - the wav is just basically a header to the raw data on the CD.
Haiku is not driven by politics - so proprietary/free distinctions are much less important than level of support. Wav is supported by many more players than flac, and is a better match for the physical format than needing to do constant compression/decompression on the fly.
A daemon that watches for CDs being mounted and offers to convert them to a various choice of formats does seem a pretty transparent approach to me. The CD filesystem should make the raw data on the CD accessible to applications. The best way to present the raw audio data is by wrapping it in a wav container.
Re: Audio CD File System in the Works
A simple way that conversion could be done with the current set up would be to add a "flac-o-matic" Tracker add-on. Then to rip a CD to flac, you would copy the wavs, select the files, and chose flac-o-matic from Tracker's add-ons menu. This also has the advantage that it would allow the conversion of any audio file to flac, not just those that come from a CD (like the .wav voice recording functions on cheap mp3 players, for example).
Re: Audio CD File System in the Works
Sorry, liilliil, but wav isn't proprietary.
Re: Audio CD File System in the Works
And what do you think about implementing CDDB or freedb service in this driver? Perhaps not in driver itself, but maybe some automatic system extension...
Re: Audio CD File System in the Works
I think Simon's right here - the idea is not to provide a method for ripping audio CDs to files, it's simply a method of presenting the CD Audio data to applications so that they can play it back with minimal effort. There is no space wasting going on since the file will most likely just be streamed straight from the CD, or at worst the whole track will be loaded into mem which is about 30-50MB or so.
If you dragged files from the CD to another disk location it might be nice to have some sort of popup for encoding the files under another format.
*Edit* I've really got to stop replying to posts rather than posting new comments. Damn it :)
Re: Audio CD File System in the Works
I haven't tested it, but there seems to be CDDB support in Haiku's CDPlayer which I think could easily update the cdda-fs database, if it doesn't already.
The CDDB utilities on BeBits.com are likely to work just as well with Haiku's cdda-fs as they did with BeOS's cdda-fs:
http://www.bebits.com/app/1535
http://www.bebits.com/app/1507
http://www.bebits.com/search?search=cddb
BTW, here's the original cdda-fs for BeOS:
http://www.bebits.com/app/157
(It's included in BeOS R5.)
Now that I think about it, it would be nice to have the system ask (or know/remember) what to do on insertion of certain media, like a blank CD-R, an audio CD or a digital camera. Something for Tracker, perhaps, or some other/new component?
Re: Audio CD File System in the Works
liilliil wrote:
Please use lossless compressed formats as default: flac or ape (better), not wav. Help users to save up their disk space
This makes no sense, as the file system in question is being read from a CD. It would be pointless, in fact it would be completely wasteful, to compress the files in memory only to have to decompress them when playing from the CD.
Therefore I will assume you don't understand what this file system is actually doing.
As for ripping the CDs to get mp3, flac or ape files to store on the hard drive, that is probably best left for special applications, not the OS itself.
Sorry if this sounds a bit harsh, I was just surprised people were trying to debate with you about compressing the CD audio on a CD file system, since it is a silly idea.
Re: Audio CD File System in the Works
I was just surprised people were trying to debate with you about compressing the CD audio on a CD file system, since it is a silly idea.
Not so silly, Ryan. In the classic BeOS you've got 2 branches of files: CDDA just for listening and wav for rip off audio tracks. All CD drives have DAC and you can listen to your favorite tracks without using CPU, system bus & soundcard
Waves are created just for ripping. If you can to rip & compress tracks at once, in transparent BeOS manner, why not to do so?
Re: Audio CD File System in the Works
Not so silly, Ryan. In the classic BeOS you've got 2 branches of files: CDDA just for listening and wav for rip off audio tracks. All CD drives have DAC and you can listen to your favorite tracks without using CPU, system bus & soundcard
Right. Well at least the soundcard would be involved, but directly from the CD drive. Otherwise how would you hear it ;)
But I'm not sure how this filesystem handles that. Maybe the CDDA works that way when played from the CD Player application.
Waves are created just for ripping. If you can to rip & compress tracks at once, in transparent BeOS manner, why not to do so?
OK, I understand now. I don't think the waves were created just for ripping. I think they were created because they are easier to use, and it isn't hard to turn the audio files on CDs into waves.
I just think that an average user would pop the CD in, see the nice names on the WAV files provided by the CDDB, and would play those files directly. Therefore the compression would be wasteful. I am pretty technical and when I put CDs in a BeOS system in the past, I just played the wav files, and didn't try to copy them, so I don't think this is unheard of.
In addition where would the compressed versions of the files be stored? In memory? Then we waste memory. On disk? Then we have to keep track of them and maybe delete them if the user didn't want a copy. Plus ripping is a pretty CPU-intense activity. That "5"% you mention can ONLY be for playing compressed files, not compressing them. I wouldn't be happy if I popped in a CD and had to wait 30 seconds (or probably longer) while compressed versions of the files were created.
Maybe the "compress on copy" functionality others talked about would be nice.
But I still think this sort of feature is too complicated and not of the BeOS nature that I understand.
Re: Audio CD File System in the Works
Waves are created just for ripping. If you can to rip & compress tracks at once, in transparent BeOS manner, why not to do so?
Are you sure they're not created as the sound source to feed through the audio mixer? How would you subject audio from CDDA to the BeOS/Haiku media kit otherwise? I suspect it's the quickest, easiest, best performance way to get CDDA into a format that can be decoded by the media kit.
Re: Audio CD File System in the Works
I've never really understood why it is, in Marco/Be's original cdda-fs, that the zero-size files in /Disc/cdda/ are typed "CDDA files" and presented in that folder. Those files do not provide BeOS applications with access to the raw CDDA data, AFAIK, and they are only ever used as cues to the CDPlayer on which track to start playing, which goes about its business with simple SCSI commands to change tracks and start/stop/pause the playback. The analog signal gets sent over that legacy cable from your CD device to a connector on your audio card.
I think that most contemporary computers are strong enough not to need that cable solution anymore, and it does simplify both the user experience (no subfolders in a cdda-fs volume, one file type instead of two) as well as simplify the way to write media players, since you don't have to have write code for interfacing with CD hardware any more. Instead you can focus on fileformats/codecs and interface.
I've done 50/50 listening and ripping over the years, and I like doing both. The cdda-fs works great doing either. I admit that it's easy to forget to compress those wav files when you have a lot of disk space, but that is easily fixed. You can use any tool you like to compress them, or do as I do, just delete them and copy them back when you need them. One of these days I'm going to start making a music library application of some sort.
Re: Audio CD File System in the Works
I think that most contemporary computers are strong enough not to need that cable solution anymore, and it does simplify both the user experience (no subfolders in a cdda-fs volume, one file type instead of two) as well as simplify the way to write media players, since you don't have to have write code for interfacing with CD hardware any more. Instead you can focus on fileformats/codecs and interface.
I agree - I pretty much *never* use those little audio cables that connect from the CDROM/DVDROM to the sound card any more - many OSes now support direct DAE which allows the sound to feed through the sound system of the OS as opposed to playing it directly to the sound card. This is preferred for most people as they can then attenuate, equalize, and otherwise distort/mix their CD audio as desired/expected.
I had assumed this was what Axel's CDDA provided - but maybe I'm wrong.
Re: Audio CD File System in the Works
many OSes now support direct DAE which allows the sound to feed through the sound system of the OS as opposed to playing it directly to the sound card. This is preferred for most people as they can then attenuate, equalize, and otherwise distort/mix their CD audio as desired/expected.
(DAE! Right, I wasn't clear on the terms. CDDA = Compact Disc Digital Audio, including the standard of PCM-encoded audio, and spelled out in the classic Compact Disc logo. DAE = Digital Audio Extraction. I don't know if that's an official term. I couldn't find a definite answer on Wikipedia.)
Oh yeah, in line with what Urias said, using the wavs for playback I don't have to mute or change the CD volume independently of the volume of the system-level audio mixer: Media preferences/Audio Settings/Audio Mixer. I suppose I could instead adjust the line-out level of the card mixer, but the Deskbar volume icon is connected to the system-level mixer, so it's more convenient to just use that.
BTW, using the wavs (or whatever format) you get the weird bonus of being able to play multiple songs of the CD simultaneously and backwards, should you get the urge to do so, as long as the system can manage and you're not bothered by the noise of your device. :} Not that this matters much anymore, but it was a cool demo back in the 90's.
About "transparency", or seamless integration - like if Tracker would offer to compress files for you when copied from CD to HD - this always comes at a cost, stability, source code maintainability, etc. I believe Microsoft has tried hard to integrate a lot of things and it has cost them in security. Of course, this integration may also be the key to their massive success. The unixes have instead often gone for very clean separation which while technically better has shown less popular. I think we can take the golden path between the extremes, but we've got to be cautious and understand the implications of design decisions.
Re: Audio CD File System in the Works
I believe Microsoft has tried hard to integrate a lot of things and it has cost them in security. Of course, this integration may also be the key to their massive success.
This is definitely a debatable point. I think their massive success is mostly due to a lot of luck, being in the right place at the right time, and then exploiting their monopoly position. If anything the integration was an effort to exploit their monopoly to create monopolies in other areas beyond the operating system and office suite. The best example being Internet Explorer.
Anyhow my point is, just because Windows is the dominant OS doesn't mean we should strive to emulate it. Not that Windows does everything badly, I'm not that much of a anti-Windows bigot (.NET has some good points, and DirectX seems like a good game library.) But if we are to emulate anyone I say we emulate Mac OS X and maybe some Linux distros, like Ubuntu (which I must say I like a lot, in fact I'm using it now.)
But I still definitely not convinced that this audio compression thing should be a feature of the OS. Maybe a feature of a media player included with the OS (like Windows Media Player or iTunes), but not a feature of Tracker. There are just too many options for ripping audio, and I feel we should keep Tracker simple.
Re: Audio CD File System in the Works
Do you mean a convert feature like Soundplay's one? Really useful tool, but it's limited to the mediakit translators, Haiku has a wider format support, but seems that SP won't run on it, at least the last time I tried it.
Or a tracker add-on like Massive Picture Converter? Just open selected files with it, select destination folder and convert options, finished.
Re: Audio CD File System in the Works
I think a Tracker add-on is the way to go (as I've mentioned) - especially now Tracker only shows addons relevant to the type of the files selected so there's less danger of getting a hugely bloated add-ons menu. This could be done by an independent developer though, doesn't haven't to be something for Haiku to do.
Re: Audio CD File System in the Works
CDDA-FS support is great improvement to Haiku, thanks!
Janet Kellman, [url removed]