
Do most music CDs have 12 tracks?This might sound like some wild conspiracy theory, but I'm looking at my music collection and it sure seems like most of them have exactly 12 tracks, no more, no less. Is there some marketing reason this would be the case, or am I witness to some great conspiracy? :-) Don't panic! There's no magic to it. A music CD can hold 60-70 minutes of music and the average pop song is about 5 minutes long. Do the math and you'll see that gives you about 12 songs per CD. But I figured I'd do a bit of math here too. I have about 425 CDs in my music library, a wide range of genres, from country to classical, jazz to blues, and here's what I found: 428 albums analyzed The results:
That is, 65 of the 428 albums have 10 tracks, 56 have 12 tracks, 50 have 11 tracks, 41 have 9 tracks, and so on. Percentage-wise, this means that less than 15% of my 428 tested CDs have exactly 12 tracks, but averaging everything out, yes, the average music CD has 12.54 tracks. So there's your answer. No conspiracy theory involved! :-) How I did these calculationsFor those of you who would like to analyze your own iTunes library, here's how I did these calculations. I popped open a Terminal window on my Mac, moved into my "iTunes Music" folder within my "Music" folder, and... $ find . -type d -mindepth 2 -print | wc -l
428 The predicate "-type d" is directories, so that tells me the number of Cds, and $ find . -type f -mindepth 2 -print | wc -l
5369 That's the number of individual tracks across all those CDs. This means, by the way, that the average CD in my library, at least, has 12.54 tracks. So maybe there is some sort of conspiracy! To figure out how many tracks there are per CD is a bit more tricky. To accomplish this, I actually wrote a short shell script: #!/bin/sh
cd "/Users/taylor/Music/iTunes/iTunes Music" for directory in $( find . -type d -mindepth 2 -print | sed 's/ /_-_/g' ) exit 0 When run it lists tracks and albums: $ tracks-per-song.sh | head
14 tracks: ./10,000 Maniacs/MTV Unplugged 12 tracks: ./10cc/Greatest Hits 1972-78 10 tracks: ./Acoustic Alchemy/Blue Chip 9 tracks: ./Acoustic Alchemy/Red Dust & Spanish Lace 9 tracks: ./Acoustic Alchemy/Reference Point 12 tracks: ./Adrian Legg/Mrs. Crowe's Blue Waltz 6 tracks: ./Al Di Meola/Elegant Gypsy 9 tracks: ./Al Di Meola, Paco de Lucia & John McLaughlin/The Guitar Trio 11 tracks: ./Al DiMeola/Splendido Hotel 11 tracks: ./Al Jarreau/All I Got When I comment out the echo line and just output the number of tracks as a number with the wc command, I can easily slip the script into a typical collation sequence: $ tracks-per-song.sh | sort | uniq -c | sort -rn
65 10 56 12 50 11 41 9 25 8 24 15 etc etc etc Classic Unix command line stuff! :-)
Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Simpy.
Categorized:
Shell Script Programming
, Unix and Linux Help
, d) None of the Above
(Article 6682)
Tagged: apple itunes, music cds, shell script programming Previous: How do I put music on my Apple iPod? Next: How do I force Boot Camp to boot into Mac OS X? Subscribe!
Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.
Rather amazingly, there are no comments on this article yet.
I have a lot to say, but ...
I do have a comment, now that you mention it!
|
Search
Find just the answers you seek from among our 1700+ free tech support articles by using our Lijit search engine.
Help!
Subscribe to
Ask Dave Taylor!
Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.
Articles and Reviews
Auctions and Online Shopping Blogs and RSS Feeds Building Web site traffic Business and Management Cell Phones and Mobile Phones CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above HTML and CSS Mac OS X Help MySpace, Facebook, Twitter and Social Network Help Pay Per Click (PPC) Search Engine Optimization Shell Script Programming Sony PSP, MP3 Players, Etc. The Writing Business Unix and Linux Help Video Game Tips and Help Windows Help
Recent Entries
Join the List!
Book Links
|