iTunes smart playlist question

Discussion in 'Mac Apps and Mac App Store' started by kixx, Sep 15, 2013.

  1. kixx macrumors member

    Joined:
    Aug 16, 2010
    #1
    Hi,

    I have several manually ordered playlists. Is there a way to create a smart playlist based on the first X songs in each playlist.

    I create playlist for new 2013 songs i add to my iTunes. I move new songs or songs that i recently favour to the top playlist.

    I cant really use "newly added" function as sometimes i move songs from bottom of the playlist to the top.


    Many thanks!
     
  2. Partron22, Sep 16, 2013
    Last edited: Sep 16, 2013

    Partron22 macrumors 68000

    Partron22

    Joined:
    Apr 13, 2011
    Location:
    Yes
    #2
    You might be able to achieve what you want by adjusting song ratings using Applescript.
    It turns out those 1-5 stars in the song rating column, really go from 1 to 100.
    0-19 is zero stars
    20-39 is 1 star etc.
    Point is, if you sort your songs by rating, a song rated 23, will be sorted ABOVE a song rated 22, despite both having 1 star.

    Sadly, the Smart playlist dialog only deals with stars, not the 0-100 numbers, so that won't get you where you want. But if you wrote a script to assign a rating of 17, or the # of stars a song has plus 7, or some similar scheme, you could easily write another script that looks for songs with such odd rating numbers, and puts them in a New playlist for you.

    Here's a little Applescript I wrote to test out the behavior of finely rated songs:
    Code:
    set trackname1 to "Rhode Island Freakout"
    set trackname2 to "Rolling Black Water"
    set trackname3 to "I Lost My Sugar In Salt Lake City"
    
    tell application "iTunes"
    	activate
    	set rating of track named trackname1 to 21
    	set rating of track named trackname2 to 23
    	set rating of track named trackname3 to 24
    	-- set played count of every track of the playlist named "Meditations" to 16
    	return rating of track named trackname2
    end tell
    Obviously, you'll need to change the trackname variables to reflect songs that are in your library.
     
  3. kixx thread starter macrumors member

    Joined:
    Aug 16, 2010
    #3
    Thank you for taking your time to write out the code. But i am not familiar with coding at all.

    Also, i am constantly updating and changing the order of songs in the playlist. So having to manually changing the names in the code sort of defeats the purpose, as i can manually drag first X songs into a new playlist.


    Is there no other ways of doing so?
     
  4. Rantipole macrumors 6502

    Rantipole

    Joined:
    May 24, 2004
    Location:
    Boston
    #4
    As long as you're manually moving songs you favor to the top of the playlist, maybe you can just take a few extra seconds to rank them all as 5 star? And the ones you move down, rank lower than 5? Then make the smart playlist to only look at the 5 star songs. It is another manual step, but at least you don't have to make yet another playlist.
     

Share This Page