Thursday, January 8, 2009

How to: Scan for Explicit Lyrics in your mp3 collection

So your going to DJ somewhere and they do not want you to play any explicit songs at the event. But here's your problem. You have a huge collection of mp3s and you have no idea what songs have explicit lyrics.
Well here's some simple steps to get your mp3s sorted out.

tagscanner

First of all you may want to make sure all your mp3s are id3 tag enabled. You can do this by using TagScanner http://www.xdlab.ru/en/index.htm but most likely they are.

itunesfriend_ui

Now all you have to do is Download ItunesFriend which will scan your itunes library and ad lyrics into the id3 mp3 tag
http://groups.google.com/group/itunesfriend?pli=1

After its done scanning your music run this script and it will scan the lyrics for each song and if it has any explicit lyrics in it it will right explicit in the comment tag of your mp3 id3 tag. If you have comments already in the comment section of the tag it will wright explicit at the end of whatever comment was in. If you want to start fresh and have no comments in your comment tags for all your songs you may use Tagscanner to do so.

Ok your almost done. Just copy this into notepad and save it as Explicit.js
/* 	Rename me to Explicit.js
Double Click in Explorer to run
Down below replace
badword1|badword2|badword3
with your own badwords ad more with a | between the words
Script by Otto - http://ottodestruct.com */

var iTunesApp = WScript.CreateObject("iTunes.Application");
var tracks = iTunesApp.LibraryPlaylist.Tracks;
var numTracks = tracks.Count;
var i;
for (i = 1; i <= numTracks; i++)
{
try {
//get the track and lyrics from the track
var currTrack = tracks.Item(i);
var mylyrics = currTrack.Lyrics;

// look for bad words
var badFound = mylyrics.match(/badword1|badword2|badword3/i);

// flag the track as Explicit
if (badFound != null) {
var myComm = currTrack.Comment;
if (myComm.match(/explicit/i) == null)
currTrack.Comment = myComm + " Explicit";
}
} catch(er) {// in the rye
}
}

Now while iTunes is open run the script you saved and it will start scanning your mp3s lyrics for explicit lyrics you specified. If you have a huge collection it may take a while depending on the size of your collection and the speed of your computer.

The only bad part about the script is that it does not have a progress bar so i left mine open for a couple of hours to make sure it scanned my huge collection of over 20 thousand songs.

You can kind of tell when its done by arranging your library by comments and seeing if the word explicit in the comments tag pops up in any new songs.

And that's it!

8 comments:

  1. Thanks for sharing, please keep us posting about this info. I'd like to read it more.

    ReplyDelete
  2. Good work, keep us posting, you are very good writer.

    ReplyDelete
  3. Do you know where to find paid templates for my blog, i got website on the same cms like yours.

    ReplyDelete
  4. I saw many blogs but yours is awsome, bookmarked for future referrence.

    ReplyDelete
  5. It is always pleasure to read your website, will back here soon

    ReplyDelete
  6. It's big pleasure to read your posts, will back here soon

    ReplyDelete
  7. Hey! I simply wanted to say your site is one of the nicely laid out, most inspirational I've come across in quite a while. Thx! :)

    ReplyDelete
  8. I want to start blogging too, what do you think, which blog platform is good for noob?

    ReplyDelete