Most played recently?

I have been trying to figure out for a while how to create a certain playlist and would be more than grateful for some help.

Basically, I find that for whatever reason songs go in and out of fashion for me, so for example I will like a song from 1997 for a month, and then not play it for ages.

What I am unable to do is to isolate that period of time where I like the song, I want to be able to make a smart playlist that chooses the most played songs in a given period of time, say 2 weeks. I thought I had it briefly but it turned out that I had just gotten it to select the songs from my top 25 most played. Another problem for any potential problem solvers is that I do not use a ratings system.

Thanks for any help you can give.

by chelseatom on Apr 06, 05 | 11:15 am


Unfortunately, iTunes does not store the Play Date/Time of every time you've listened to a song... it only stores the Date Added and the Date/Time Last Played.

It sounds like what you're looking for is something that would only count the plays that occurred within a specific time period. The best iTunes can do is give you the most played songs in you entire library that were last listened to within that time period.

by ChuckEye on Apr 07, 05 | 2:16 pm

Once a week open up the iTunes OEM smart playlist "Recently Played." Select All (Ctrl-A) those songs and choose "New Playlist from selection." Name that playlist with the date.

Now at the end of the month go back and make a smart playlist that selects songs that appear on "All" that month's saved playlists. For example, "1Apr", "8Apr", "15Apr", "22Apr", and "29Apr".

That will give you a list of songs you played several times that month. You can mess with the "recently played" list, making that a shorter or longer stretch of time, or with the frequency that you save the playlists.

Pretty kludgy, huh?

by talking_animal on May 11, 05 | 4:06 pm

Couldn't he just make a playlist that consist of songs not played in the last so many days? I do that and it gives me songs that I've overlooked or rated 3 or less that don't get much play.

by Bakari on May 11, 05 | 4:48 pm

I'd like to see a smartplaylist that shows me the most played songs in the last (week/month/whatever), more for curiousity than anything. I can't think of any way it can be done, though, for the reason ChuckEye pointed out.

by synecdoche on Jun 11, 05 | 3:27 am

Is there some kind of script that could be written. Maybe when a song is played, iTunes will record the date/time played in a text file or spreadsheet. Then the script pulls information to count the number of times played in the last X days. If this is plausible, it's too sophisticated for my AppleScripting abilities.

by Esqwatch2 on Aug 01, 05 | 11:49 pm

Esqwatch2, that'd be great! There must be a way to do it. The Audioscrobbler plugin sends the song played data out, and I think attaching a date to that would be a simple enough task, but beyond that I have no clue how to do it. I am sure somebody out there knows though! If anyone has any ideas, please help! :)

by synecdoche on Aug 03, 05 | 2:05 am

This is exactly what I'm looking for. There must be a way to do this, with multiple playlists linking to each other, but I don't know how. I've been reading all over the net about ultimate "auto-rating" playlists to see if they can do this, but so far no luck. Anyone?

by poocat on Aug 04, 05 | 10:56 am

I agree with Bakari. To solve this I think all you need to do is make a playlist that says something like
last played in the last week
last played is not in the last 2 weeks. or a less accurate but simple list would be last played in the last week sorted by most oftenly played.

however, this would not include songs that you've played again. i suppose like someone else suggested earlier that you could make a new playlist each week consisting of the songs in this playlist.

anyway, i do agree though, i want a similar playlist. lots of my songs i have added long after my original songs. I want a playlist that sorts by amount of times played vs how long ago it was added. i dont think that is TOO complicated, times played vs time. BUT, i have windows anyway, I havent been able to find ANY plug ins or anything for windows, except one, a script to show what you are currently playing in itunes on your blog or w/e. *sigh*

by misscali on Aug 06, 05 | 7:33 am


You could make up a SPL with the condition, "Date Added" "is in the range" "2/6/05" and "8/6/05" and limit to "25" "songs" selected by "most often played." That would give you the most often played tracks that you added in the last six months. Then next February you could make up another list with new dates to sort the songs you'll have added in the six months from now until then.

Or, if you export your iTunes data to Excel (use the File|Export Song List feature), you can make up all kinds of fancy formulae to sort your tracks by and then reimport them into iTunes as ordinary playlists.

Fiddling with your iTunes data in Excel can provide hours of enjoyment to the housebound, especially making pretty-colored charts of the songs iTunes has played.

by talking_animal on Aug 06, 05 | 10:55 am


I think you are on to something here. Is there some way to auto-export once a song has been played. Maybe create a SPL of the last 1 song played. Then somehow auto export to Excel, manipulate, and auto-import back to iTunes. In any case, how do you import an Excel file back as a playlist?

by Esqwatch2 on Aug 06, 05 | 12:13 pm

I made a little progress. Down load the iTunes to AppleWorks zip here:
This allows you to export a given list into a database file with about every field except last played. I can add the field but I don't know how to export those particular data points into the database.

Here's the cool part. I tested this with a playlist of about 100 songs. I created a SPL defined as last 1 song played then sent it to the database also. The last song I played was represented twice on the database. So If we could somehow add the last played field, each song could be represented multiple times, filter database to last 30 days, total number of plays, select top 40, and import to iTunes as a playlist (script is included in zip file for this last import).

Is there a way to automate the execution of scripts? iTunes would have to fire the export script after each time the "last 1 song" pl is updated.

by Esqwatch2 on Aug 06, 05 | 3:40 pm


Here's my kludge. Your mileage may vary, of course.

I sync my iPod with iTunes at a maximum once per day. So I would make up a set of SPLs, each one with the condition, song played in the last "x" days, where each SPL has a different value for x. Then when I sync the iPod, I also export the appropriate SPL to a file. For example, if I haven't synched in two days, I export the "two-day" SPL.

Then, the next time my allergies act up and I can't leave the house, I can import all those files into a relational database (think MS Access or FileMaker) that would organize all plays in a one-to-many database with the song being the one and the many being the plays.

In fact, that part you could write up in VB or any other scripting language: import a file named "Plays 20050806" (e.g.) into a table named "Plays."

Then you could just write a query that would pull, as you suggest, top 40 tracks by total plays x last 30 days. That could be saved as a text file then imported back into iTunes. Or a query that calculates (total plays) / (days since first added) and takes the top 40 tracks from that, as misscali suggested.

You could probably automate the whole thing on the database side, so when you launch iTunes, there's a playlist waiting to be imported.


by talking_animal on Aug 06, 05 | 6:42 pm

My favorite way to archive "what I'm listening to now," however, is the following.

I have a SPL of the last 80 top-ranked (4 or 5 stars) songs I've played. That works out to the top-ranked songs I've heard over the last two days. Then there's a nested SPL that draws a random selection of 79-minutes-worth of that first SPL. About once a month I save that last one in an ordinary playlist. The 79m limit lets me burn an audio CD from the list no problem.

Hard to believe, maybe, but for me it works as an accurate sampling of what I was listening to at the time. If you use an "Ultimate Playlist" approach to your music (see <http://smartplaylists.com/comments.php?id=902_0_1_0_C>) as I do, then this approach might work for you, too.


by talking_animal on Aug 06, 05 | 6:51 pm

yeah, Ive tried exporting playlists, I get gibberish ie /dict/array/dict/array/dict/integer , about 50,000 rows of ones... :|. I just highlight everything and copy and paste. seems to work fine.

What I really meant was I want to make a playlist with the songs that have been played the most compared to how long I've had them. This is a much better list than the most played list I think, because, all of my current songs will be on it, as well as my favorite songs from the 90's that I play all the time.

I suppose I could do it in excel, was actually planning on doing so, however, seems like a lot of work updating, and I have no idea how to eh, reinsert the playlist, with the new order or new sorting style. (am I making sense? I'll give an example if not)

by misscali on Aug 06, 05 | 11:32 pm

Miss Cali, here's the way to export and import track listings from iTunes. I've added a formula you can start with to calculate your hottest songs, as you mentioned last week.

Step 1: Right-click on your iTunes library and choose the "Export Song List..." option. Make sure you save it as Text type (.txt).

Step 2: Start the Excel application. Open up the exported song list from step 1. Excel will then open up a txt-file importing wizard; just click Finish.

Step 3: Wonder at the giant chart of your songs you've just opened up. Go to cell Z1 and type "MC Score". Then go to cell Z2 and type this formula:


This divides the track's play count by the length of time it's been added to iTunes. I use the log functions to compress everything, otherwise the songs you added in the last week will always float to the top. Plus, using logs almost guarantees that songs played only once won't rise to the top of the list.

Step 4: Copy the formula to each row of the table. I select the whole area to which I want the formula copied and use the Edit | Copy Down command.

Step 5: Select the entire table, including the headers in row 1. Use the Date|Sort command to sort everything on the MC Score in descending order.

Step 6: Select the header row and the first 25 songs from column A to column Y. These should be your top 25. Choose the Edit|Copy command to copy them to the clipboard.

Step 7: Open up Word and paste that data in using the Paste Special command and the option for "unformatted text."

Step 8: Save the Word document as txt (Tab delimited) format. The reason for using Word is that Excel plops quote marks into the tab-delimited format, and that throws off iTunes.

Step 9: Go back to iTunes and choose File|Import. Find the txt file you saved in Word and select it; your new Top 25 playlist should now be listed in the big list of playlists.

Hope this helps!


by talking_animal on Aug 07, 05 | 3:21 pm

well, first, I thank you very much for your help, and second, I seem to not know as much about excel that I had thought. Also, I never would have thought to extract it as a text file. :S

anyway, I seemed to extract it fine, at least I thought, but the formula gives -436.084 for every entry. It seems to be because most of the information (including play count and dates) are in row D. They basically all look like this: <key>Play Date</key><integer>-1089849553</integer>

I've never used logs before, so not really sure how to fix this, but I'm pretty positive the way my library was exported was not right. Also, not sure how to sort by date...you mean just data, sort right? that's alphabetical though so wasnt sure if that was what you meant. thanks again ^_^

by misscali on Aug 08, 05 | 1:48 am

Ai! What a drag. It sounds like you are still exporting the playlist from iTunes in xml format. When I use the txt format I get a very comprehensible table, with song names in column A, artist in col. B, etc. My suggestion is to check again how you are exporting the list.

by talking_animal on Aug 08, 05 | 10:44 am

ahh there we go, got it to work. yay! lol. thanka very much mister.

by misscali on Aug 08, 05 | 10:52 pm

it seems like an easier way to do this would be to have a monthly script that went through the whole library and added tags to a field for how many times a song had been played in the previous month.

let's say you add a song in march and really loved it in june and july. at this point the field might look like:


that script would run at the end of every month.

a companion script might ask you for a starting month and finishing month and build you a playlist of the songs that had been played that month, sorted or restricted by how many times they had played in that period.

you can also do this with an SPL ("[comments] [contains] 2005/06:" + "[comments] [contains] 2005/07:") but it won't be very smart - not really a hot list.

by chromo on Sep 06, 05 | 1:30 pm

Sounds good, chromo, but what about those of us who don't have a REAL personal computer (i.e. a Mac) and have to suffer the lack of applescript?

That's why I'm kludging around with MS Excel, because my crack habit has prevented me from accumulating the cash I've needed to buy a Mac.

by talking_animal on Sep 06, 05 | 11:39 pm

habits can be hard to break. sadly, i know zilch about the scriptability of itunes for windows. maybe someone has already written a trojan to do it for you! check your email.

no but really, i guess itunes doesn't play well with visualbasic?

by chromo on Sep 07, 05 | 12:02 am

I was browsing around the web, looking for the answer to this exact question, so its nice to know that there are people out there like me wanting to do this stuff!

I don't have an answer unfortunately. It seems the best thing to do would be to have a program that periodically exported the play counts, created the appropriate playlist by comparing the various exported files and then imported them back into itunes - but I'm not clever enough to do it.

I like talking_animal's rating system. Sounds like fun, would be great if you could do all this automatically.

Something about playlists which come up with the all-time greatest songs in your collection however is that once a song is on that list, its hard to get off it if you listen to that playlist often. Each time you listen to the list, all those songs' play counts go up.

But I'll keep looking here in case someone comes up with something. Cheers.

by westius on Sep 23, 05 | 8:26 pm


You make a good point. I see this happening, where I open iTunes, see the top-rated list, then play those artists/albums that I've heard and loved so often.

That's why smart folks make SPLs like this one:

My Rating is 4-5 stars
Limit to 79 minutes by least often played

by talking_animal on Sep 24, 05 | 1:18 am

This is true, good idea. After browsing thru this site I got some good ideas for such "unplayed" playlists.

It is frustrating that the ipod updater doesn't dynamically update "most played" or "unplayed" playlists (discussed elsewhere) - especially at times when you may be away from itunes for a long period of time - Ill be away for a month over Xmas.

That said, it can add an element of surprise to your "most played" list when you get back. Also, if you are dilligent enough to export the playcount information every month/year/whatever period you're interested in, the fact that the date of play is not recorded means that you wont know what is in your "Hottest 25 of November 2005" playlist until you actually manipulate your outputs from Nov and Oct.

So I still dont have an answer for how to do this, but Im looking on the bright side.

by westius on Oct 26, 05 | 9:24 pm

You must be logged in to post comments.


try this
red line

red line
red line
sites we like
red line


Powered by pMachine