Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Wrappers for MP3 CDs in iTunes?

Cliff posted more than 11 years ago | from the making-your-creations-compatible dept.

Media (Apple) 36

Nikopol asks: "iTunes is very good at dealing with MP3 CDs made by itself, but MP3 CDs made with other software (in this particular case, HP MyCD on a Win 98 computer) aren't recognized at all. The ability to make an MP3 CD available as a source in iTunes is due to an XML file iTunes puts on each MP3 CD it burns. Other MP3 CDs, lacking such file (in fact, I think this file is on a separate HFS+ partition), are bound to appear in ISO9660 form on the desktop...and those MP3 are then bound to be permanently stacked in the main iTunes library, thus voiding much of iTunes Dynamic Playlists usefulness. Is it possible, via a plugin or some trickery, to generate such XML file that would allow iTunes to see any MP3 CD as a source? In fact, such trickery would ideally be applicable not only to MP3 CDs, but to networked drives or folders too! (I know, I know...Rendezvous...but it isn't implemented widely yet!)"

cancel ×

36 comments

Sorry! There are no comments related to the filter you selected.

Auto-Run (4, Informative)

WatertonMan (550706) | more than 11 years ago | (#5533077)

iTunes is very good at dealing with MP3 CDs made by itself, but MP3 CDs made with other software (in this particular case, HP MyCD on a Win 98 computer) aren't recognized at all.

What do you mean they aren't recognized? I do this all the time and I've never had trouble. iTunes doesn't recognize it automatically when you put the disk in. So you do have to drag and drop the directories. Make sure under preferences you've not selected to copy the files to your iTunes directory automatically. They should play fine.

OSX doesn't "autoplay" CDs. This has been discussed many times. I personally see this as a good thing, given all the problems its caused me under Windows. I suspect if you wish you could create an Applescript to play the files in iTunes when a disk is mounted. I'm not sure how one would do this though. The CD preference pane allows you to run an Applescript when a Music CD is mounted, but I don't think that MP3 CDs count since they are basically just data disks. Probably what you'd want to do is attach an Applescript to the /Vol directory. You'll need to be administrator to do this.

Re:Auto-Run (3, Informative)

komor (659825) | more than 11 years ago | (#5533501)

> OSX doesn't "autoplay" CDs.
> I suspect if you wish you could create an Applescript to play the files in iTunes when a disk is mounted.

That's not true, at least on 10.2.
1. Look into System Preferences, click on CD/DVD icon.
2. Set a preference for "When you insert a music CD" to "Open iTunes".
3. Open iTunes, then open Preferences.
4. Set a preference for "On CD Insert" to "Begin Playing".

One flaw: when you insert a CD while iTunes is NOT launched yet, then it doesn't autoplay - iTunes is launched AFTER the CD is considered to be "inserted", so when iTunes launches the CD is already present and mounted.
But any consecutive CD inserted autoplays well.

Re:Auto-Run (3, Informative)

WatertonMan (550706) | more than 11 years ago | (#5533636)

That only autoplays *music* CDs. The CDs in question are MP3 CDs which are just data CDs filled with MP3 files.

That's why I said you may wish to tie an Applescript to Vol. I don't know if OSX allows you to attach a script to the Volume directory. But you can attach them to other directories such that they run when the contents change.

In this case you'd have an Applescript that might "buffer" the MP3's or just tell iTunes to play them.

That's all that iTunes is doing with the XML file they write to the data disk. It expects the XML file in a certain place and it contains the paths of the MP3s to play. In this case you are just emulating that functionality with a folder script.

Oh, when I was discussing "auto-play" I was talking about how under Windows even data CDs can exectue a script. This is why when you put in a CD it will often open up a window. Besides being a security nightmare this can be annoying. Apple allows you to autorun specific programs or scripts for PhotoCDs, Music CDs, and video DVDs. It *won't* do it for anything else.

Re:Auto-Run (2, Interesting)

komor (659825) | more than 11 years ago | (#5533702)

> That only autoplays *music* CDs. Uhm, I haven't got the idea, sorry. But hey, I can recall several disk images with some shareware software or system updates, that launched installer automatically, after mounting. So maybe there is some API to "autoplay" any volume mounted, just like in classic Mac OS and Windows?

Re:Auto-Run (2, Informative)

WatertonMan (550706) | more than 11 years ago | (#5533951)

I don't know what programs you are speaking of. I've never encountered this with 3rd party applications and believe such things are not allowed. Although Apple does it with some of their installers - so it is feasible. For instance the original Safari installer copied files and then unmounted the DMG file. I may be wrong but I believe this isn't possible with CDs. It appears to be a feature of the latest version of Disk Copy (which mounts DMGs) and is an undocumented feature Apple has used for some of its installers.

As for what I was speaking of, music CDs are the ones you buy from the store. They are in a custom format and aren't data files of the sort you are used to. OSX "fakes" a directory structure and information and makes it appear it is a regular volume. Further the CD pref pane allows you to take actions when you put the disk in your computer.

A MP3 music CD though is stored in a format different from the music CDs you buy at your local music store. They are stored in the same format that you might store a bunch of word processing documents on a CD with. The only difference is that the disk is filled with MP3 files. Now if iTunes writes a MP3 disk, it writes the MP3s and a bit of information that it can use to "fake it" so that the disk seems like a regular music CD - only one that holds many more songs. In reality though it is just a regular data CD.

The problem, as I understand it, is that music MP3 CDs of this sort made under Linux or XP aren't autoplayed by iTunes they way it autoplays a regular music CD. That's because that extra information it uses to "fake" a CD isn't present. So the person asking the question was asking how to emulate that feature.

As I mentioned above, the CD preference pane won't help because to the Finder it is a data-CD and not a music CD. There are two ways to do this. Either figure out the XML file iTunes writes and get your PC software to write it. (Unlikely). The other is to have an Applescript do all the work.

To do this you use Folder Actions. [apple.com] The folder in question is /Volumes, a normally invisible directory. This is the directory that OSX mounts all external file systems, such as external hard drives, network shares, and CDs. It then uses it to create those icons of disks on your desktop.

When you associate a folder action with that directory you can have an Applescript that does something whenever disks are mounted. In our case that might be to recursively scan the directory and send all MP3s to iTunes. What is nice (or not nice, depending upon how you look at it) is that you can do this for network sounds as well.

Folder Actions are one of the nicer features of OSX - although strangely one of the lesser known. You can do things like have it email files you drop in a particular directory. Its very nice. Combining it with Unix directories is very powerful.

Hope that helps. . .

Re:Auto-Run (2, Interesting)

WatertonMan (550706) | more than 11 years ago | (#5533986)

I did some more checking. Apparently Toast will write an autorun CD that runs under classic. (The mode that lets OSX run legacy software) The classic autorun will actually let you run OSX software. The problem is that if classic isn't running it won't work. (And for most people classic typically isn't running) That may be what you saw. Autorunning CDs was possible in System 9 but is not part of OSX. (Justifiably so given the security concerns)

Re:Auto-Run (1)

komor (659825) | more than 11 years ago | (#5534180)

No, I centainly didn't account Classic apps in my recall, don't treat my as a complete fool :-) Apparently you are right, that only Apple disk-images use the "autorun" feature, I don't remember it that precisely. Of course I understand the difference between Audio-CD, Data-CD (and MP3-CD, which is really a Data-CD). The only reason I started to comment on this topic is that you wrote "OS X doesn't autoplay CDs" which I misunderstood, so I think it's time to EOT for me :-)

Re:Auto-Run (1, Informative)

Anonymous Coward | more than 11 years ago | (#5535058)

those 'autorun' disk images can be easily created. all ya gotta do is create your disk image, then from the terminal type in:

hdiutil internet-enable -yes [path to DMG]

the 'self-destruct' only works once though. so if after copying the files and disposing of itself in the trash you drag the disk image back out and open it again, it will not copy the files and dispose of itself again unless you set it from the command line. similarly, to disable it you run:

hdiutil internet-enable -no [path to DMG]

from the command line.

Re:Auto-Run (1)

Nikopol (127002) | more than 11 years ago | (#5538090)

>To do this you use Folder Actions. [apple.com] The folder
>in question is /Volumes, a normally invisible directory.
>This is the directory that OSX mounts all external file
>systems, such as external hard drives, network shares, /
>and CDs. It then uses it to create those icons of disks on
>your desktop.

Yeah, I think Folder Actions are the solution. What I really want to do (and I realize I didn't state it clearly enough in my post) is to be able to see MP3 CD and network folders as a source in iTunes...

Ideally, a folder action would, upon the mounting of a MP3 CD, generate the configuration files needed for iTunes to see it as a source. That is, it has to generate the XML file dynamically...

Re:Auto-Run (1)

dOxxx (8571) | more than 11 years ago | (#5538154)

For instance the original Safari installer copied files and then unmounted the DMG file. I may be wrong but I believe this isn't possible with CDs. It appears to be a feature of the latest version of Disk Copy (which mounts DMGs) and is an undocumented feature Apple has used for some of its installers.

I believe you will find this particular feature of Disk Copy documented here: Internet-Enabled Disk Images [apple.com]

Re:Auto-Run (1)

geniusj (140174) | more than 11 years ago | (#5598851)

The self-copying DMGs you speak of are actually documented. They are called 'internet enabled' DMGs.. Check out http://developer.apple.com/ue/files/iedi.html.. Basically it boils down to: hdiutil internet-enable -yes file.dmg .. et voila!

Re:Auto-Run (1)

devonbowen (231626) | more than 11 years ago | (#5535217)

I've got a couple of music CDs that autolaunch classic apps. Drives me crazy. Anyone know how to disable this without turning off classic? I have even sometimes resorted to ripping the tracks and reburning the discs to get rid of the software portion. Yet another perfectly valid reason to be against DRM.

Devon

Re:Auto-Run (1)

ckd (72611) | more than 11 years ago | (#5540810)

I've got a couple of music CDs that autolaunch classic apps. Drives me crazy. Anyone know how to disable this without turning off classic?

Launch Classic. Run the Classic QuickTime control panel. Uncheck the autoplay boxes.

Re:Auto-Run (4, Informative)

macmurph (622189) | more than 11 years ago | (#5534520)

So you do have to drag and drop the directories. Make sure under preferences you've not selected to copy the files to your iTunes directory automatically.

If you hold down the option key while dragging the music to iTunes, it will do the opposite of what this preference is set to do. In other words, if by default, dragged music is copied to the iTunes folder, it will not get copied if the option key is held during the drag.

Dear Apple (-1, Flamebait)

Anonymous Coward | more than 11 years ago | (#5533102)

Dear Apple,

I am a homosexual. I bought an Apple computer because of its well earned reputation for being "the" gay computer. Since I have become an Apple owner, I have been exposed to a whole new world of gay friends. It is really a pleasure to meet and compute with other homos such as myself. I plan on using my new Apple computer as a way to entice and recruit young schoolboys into the homosexual lifestyle; it would be so helpful if you could produce more software which would appeal to young boys. Thanks in advance.

with much gayness,

Father Randy "Pudge" O'Day, S.J.

Dear Father O'Day (-1, Flamebait)

Anonymous Coward | more than 11 years ago | (#5533114)

Dear Father O'Day:

Thanks for your letter. Being Catholic myself, I know exactly what you're talking about! It has always been our plan here at Apple Computer Inc to revolutionize personal computing with our high-quality and highly gay products.

I'm happy to answer your letter by letting you know that YES we will be releasing an entire hLife ("homo-life") software line. You'll be able to recognize it in stores by the small stylized logo depicting a large cock entering a tight anus with an Apple logo on it. ("Suddenly it all comes together" indeed!).

Anyway, I hope you and other members of our community will join us on our mission, and purchase the exciting new hLife boxed set. Only the boxed set comes with translucent cock rings!

Sincerely,

Harry Rodman
Vice-president
Homosexual Liaison Services
Apple Computer, Inc.

Re:Dear Father O'Day (-1, Flamebait)

Anonymous Coward | more than 11 years ago | (#5533423)

Mod parent up!!!

Burn a CDRW (4, Informative)

Van Halen (31671) | more than 11 years ago | (#5533167)

This is by no means an ideal solution, but it has worked for me in the past [slashdot.org] . Simply import the MP3s from the original CD to your library (temporarily rename the library if you don't want the CD's files getting stuck in your main library). Then burn a MP3 CDRW from iTunes and use that for as long as you need it. Erase and reuse when you're done.

If you want to take it a step further, you can do what I did. I burned a MP3 CDRW with the songs I wanted and then looked at the resulting ContentsDB.xml file on the new CD. Then I took that file and edited it to match the file layout I wanted on my target CD, since I didn't want the default layout that iTunes creates. If you needed to do this a lot, I'm sure a perl script to automate it would be pretty easy to whip up.

Like I said, certainly not an ideal solution. Unfortunately I don't know of any way to do this without creating a second CD, but maybe someone else can come up with something better. Or maybe this will help someone think of a better idea.

HP MyCD (-1, Troll)

Dokushoka (570664) | more than 11 years ago | (#5533210)

HP who in the what now? Who cares. How many mac users have even HEARD of HP MyCD. This is a non-story slashdot =P

Re:HP MyCD (4, Informative)

questionlp (58365) | more than 11 years ago | (#5533403)

MyCD is a software package that Veritas produces [veritas.com] that OEM's out to CD-R/RW makers and brand as theirs. Pioneer bundles a version of MyDVD (the version I have is called something else but I can recall the name right now) with the DVD-R/RW drive that I bought and that they licensed from Veritas and re-laballed it as Pioneer's, though the Veritas logo is still floating around the app.

slight tangent but still.... (2, Interesting)

redwood2 (179115) | more than 11 years ago | (#5533290)

anyone out there know how [if its possible] to get
iTunes to burn a regular music cd with the track names and other id3 stuff on the cd so my sony car deck can read and display them?

thanks yall

Re:slight tangent but still.... (0)

Anonymous Coward | more than 11 years ago | (#5533338)

Yes. You just tell it to burn text info on the cd. it should work.

Re:slight tangent but still.... (1)

EddydaSquige (552178) | more than 11 years ago | (#5533931)

Yes. You just tell it to burn text info on the cd. it should work.

And how do you do that?

Re:slight tangent but still.... (1)

juniormaj (654084) | more than 11 years ago | (#5534076)

I think Toast has an option to burn with CD text, but I don't think iTunes does. I've never tried either of these because I don't have a CD player that supports CD Text.

AppleScript (2, Informative)

djupedal (584558) | more than 11 years ago | (#5534347)

Try these... [trinfinitysoftware.com]

Re:slight tangent but still.... (2, Informative)

Anixamander (448308) | more than 11 years ago | (#5536269)

The only way I found to do that is by burning with Toast. I did find an applescript that will take your current itunes playlist and send it over to Toast so all you need to do is click "Burn". That's the good news.

The bad news is it is a German applescript. The name of it is "Audio brennen mit Text." I believe I found it on Versiontracker. It is a read only script so I'm not sure exactly what it is doing behind the scenes (I have used it enough to know it doesn't appear to be doing anything malicious), but it always get the same error when i run it...that is to say, it does what it should (sets up toast with the itunes playlist in order) and then throws up an error alert that i just dismiss.

I haven't searched for it lately, maybe there is finally an English version out with all bugs squashed.

Hope this helps.

invisible file (3, Informative)

benh57 (525452) | more than 11 years ago | (#5533762)

The invisible plist file you see on Mac CDs is not really there. It is a virtual file created by the mac CDDA filesystem. Look at the CDs on a PC, you will see that it does not exist.

Re:invisible file (1)

punkmanandy (592682) | more than 11 years ago | (#5534878)

its on an hfs partion, which isnt read by the PCs.

Re:invisible file (4, Interesting)

jweatherley (457715) | more than 11 years ago | (#5535139)

*its on an hfs partion*

No it's not! The grandparent is correct, the XML file does not exist, it is faked by OS X. When you mount a CD there is only one volume and it contains the music and the xml file.<br>

Here's what you get - notice the file '.TOC.plist' lives in the same place as the tracks and also note that it contains references to www.apple.com making it unlikely to have been put there by whoever made the disc. Also note that the CD itself is pre-OS X...

bash-2.05a$ ls -la /Volumes/The\ Rocky\ Horror\ Show\ -\ Original\ London\ Cast/
total 771530
dr-xr-xr-x 2 unknown unknown 4224 Mar 18 07:38 .
drwxrwxrwt 5 root wheel 170 Mar 18 07:38 ..
-r--r--r-- 1 unknown unknown 3744 Mar 18 07:38 .TOC.plist
-r--r--r-- 1 unknown unknown 37154624 Mar 18 07:38 1 Science Fiction - Double Feature.aiff
-r--r--r-- 1 unknown unknown 63640496 Mar 18 07:38 10 Rose Tint My World.aiff
-r--r--r-- 1 unknown unknown 23030864 Mar 18 07:38 11 I??m Going Home.aiff
-r--r--r-- 1 unknown unknown 23120240 Mar 18 07:38 12 Superheroes.aiff
-r--r--r-- 1 unknown unknown 13331216 Mar 18 07:38 13 Science Double Feature.aiff
-r--r--r-- 1 unknown unknown 26114336 Mar 18 07:38 2 Damn It, Janet.aiff
-r--r--r-- 1 unknown unknown 35562320 Mar 18 07:38 3 Over At The Frankenstein Place.aiff
-r--r--r-- 1 unknown unknown 35813984 Mar 18 07:38 4 Sweet Transvestite.aiff
-r--r--r-- 1 unknown unknown 37098176 Mar 18 07:38 5 Time Warp.aiff
-r--r--r-- 1 unknown unknown 27617264 Mar 18 07:38 6 Sword Of Damocles.aiff
-r--r--r-- 1 unknown unknown 22332320 Mar 18 07:38 7 Hot Patootie.aiff
-r--r--r-- 1 unknown unknown 26502416 Mar 18 07:38 8 Touch-A-Touch-A-Touch-A-Touch Me.aiff
-r--r--r-- 1 unknown unknown 23701184 Mar 18 07:38 9 Once In A While.aiff
bash-2.05a$ more /Volumes/The\ Rocky\ Horror\ Show\ -\ Original\ London\ Cast/.TOC.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.
com/DTDs/PropertyList-1.0.dtd" >
<plist version="1.0">
<dict>
[snip XML...]

Re:invisible file (1)

beswicks (584636) | more than 11 years ago | (#5590339)

I don't normally do this but...

Do you mean 'references' to www.apple.com as in...
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd" >

This is the bit of an XML document that links it to the DTD, so that a program knows what 'type' it is. The reason that there is a URL to apple in there is that this DTD is held on apples server, as you would expect with a file format designed by apple for apple's operating system. How does this 'link' make the file unlikely to have been put there by 'whoever made the disc' with APPLES iTunes?

c.

Re:invisible file (1)

Xyde (415798) | more than 11 years ago | (#5596074)

Offtopic, I know but...

When a CD is mounted in OS X (10.2.4, anyway - 10.0 was .aiff, then 10.1 was .cdda, now we're back to .aiff), those files are not actually AIFF files. I found this out while trying to encode directly off the CD using FLAC. They have to be opened in QuickTime Player, and then you use the export command from there to make a real AIFF. For the file opened directly off the CD, QuickTime Player reports it as "16-bit Little Endian, Stereo, 44.1 kHz, 16 bits", but a QuickTime created AIFF is displayed as "None, Stereo, 44.1 kHz, 16 bits".

Interesting.

What are you talking about? (0, Troll)

djupedal (584558) | more than 11 years ago | (#5534005)

I've never seen this kind of 'fault'....I think this is user error, and not related to iTunes.

Networked playlists were possible for a short time (3, Informative)

PrimeWaveZ (513534) | more than 11 years ago | (#5535049)

But Apple revoked license to the API for the author of iCommune, a "device" plug-in that actually allowed for the browsing and playing of MP3s on remote volumes from within iTunes. I, personally, think that it is technically a "device," but Apple apparently did not. There goes that part of your idea. :/

AppleScript for OS 9 (1)

DougAdams (561100) | more than 11 years ago | (#5536766)

FYI: We have an AppleScript called MP3 CD to Library [malcolmadams.com] that works with iTunes in OS 9 -- some of the Finder scripting this script uses is not available in X.

Doug
Doug's AppleScripts for iTunes [malcolmadams.com]
RSS [malcolmadams.com]

here's how to do it from the shell (2, Informative)

klparrot (549422) | more than 11 years ago | (#5539667)

Requires some command line fun. Yay! Not sure how to automate this so that it occurs when you insert a CD, but here's what you can do manually.

I'm not sure what the XML file contains, since I don't have a CD burner on my iBook, but assuming you can generate the file, here's what you can do to make it sit side by side with the contents of the CD, without copying the CD to your hard drive.

  1. Insert your CD.
  2. Generate the XML file based on the CD's contents. Store it in an empty directory.
  3. Open up a Terminal window. I use bash as my shell, but I think tcsh would work the same.
  4. Type df then look at the entry that corresponds to your CD. Remember the /dev/diskXsY part.
  5. Type /usr/sbin/disktool -u diskX (where X is the number from the last step) and your CD will unmount.
  6. Type /sbin/mount_cd9660 -o union /dev/diskXsY path-to-folder-with-xml-file to mount your CD in the folder with the XML file.
You should now see the files on the CD and the XML file in the folder. You should be able to use the folder as an iTunes library.

When you want to eject the CD, you'll have to unmount it and eject from the command line; it's not under control of Disk Arbitration anymore, so your regular eject button won't (in my experience) work.

  1. Type /sbin/umount /dev/diskXsY to unmount the CD.
  2. Type /usr/sbin/disktool -e diskX to eject.
And you're done! Have fun!

Somebody Has a Straightforward Hack? (1)

Enkerli (554033) | more than 11 years ago | (#5540747)

Well, I get the same problem with MP3 CDs I made for my RioVolt. The CDs iTunes made automatically show up and can be played but for other CDs, I have to include them in the library, which is a drag (no pun intended). So, is there a straightforward way to add support for any CD containing MP3s?
TIA!
Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?