Similar Artists 2.1 - Updated 28/12/2012

Post a reply

Visual Confirmation

To prevent automated access and spam, you are required to confirm that you are human. Please place a check mark next to all images of monkeys or apes. If you cannot see any images, please contact the Board Administrator.

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: Similar Artists 2.1 - Updated 28/12/2012

Re: Similar Artists 2.1 - Updated 28/12/2012

Post by dnats » Fri Jun 14, 2013 3:13 pm

Hi trixmoto,

Thanks for this extensions, it's great as my library grows.
I have two requests I wonder if you can make?
First, I would like to have "create a radio" function. You know how you can type in an artist on last.fm and it will start to play right away with similar artist? It would be great if you could have like a button to open a search box and you can type in a desired artist/song and it would start playing.

Second, this is more of a functionality fix. The randomize playlist function need a tweaking to only randomize new fetched songs instead of randomizing the whole existed playlist. Right now, it's kind of problematic because it also randomize songs that already played. So I think you should tweak this function.

Re: Similar Artists 2.1 - Updated 28/12/2012

Post by dbuechner » Tue Jan 22, 2013 10:21 am

Dear Trixmoto,

I still get the WriteLock before ReadLock error on around every second or third time I'm running your script. It's really annoying because I have to restart MM every time. For some Artists (for example Rage against the Machine) its almost impossible to run the script. I have uploaded the log file to my dropbox.
http://dl.dropbox.com/u/2710090/SimilarArtists.log

I'm using Windows 8 (32-bit), MM 4.07.150 and the Version 2.1 of your script.

Thanks,
Daniel

Re: Similar Artists 2.1 - Updated 28/12/2012

Post by trixmoto » Fri Dec 28, 2012 7:46 am

Thank you very much, very kind.

Re: Similar Artists 2.1 - Updated 27/12/2012

Post by lumper5 » Thu Dec 27, 2012 7:52 pm

trixmoto wrote:New version (2.1) is now available to download from my website. Changes include...

- Fixed ReadLock/WriteLock errors
- Added option to ignore recently played tracks


Excellent. Thank you. You should have a paypal donation from "lumper5" .

BTW, I had to expand the size of my OPTIONS area in MediaMonkey to see the additional option box for Ignore Recent. Noting this in case someone else installs it and doesn't see it immediately.

Re: Similar Artists 2.1 - Updated 27/12/2012

Post by trixmoto » Thu Dec 27, 2012 12:01 pm

New version (2.1) is now available to download from my website. Changes include...

- Fixed ReadLock/WriteLock errors
- Added option to ignore recently played tracks

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by trixmoto » Wed Dec 26, 2012 6:04 pm

I've added this to my list, I'll see what I can come up with.

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by lumper5 » Wed Dec 26, 2012 3:20 pm

rovingcowboy wrote:So its not wanting them from 10 minutes ago its a option for it to remember whos simular to who and then not play the same songs for a period of 24 hours so you could start and stop the playing several times in one day and not get the same songs, and at the same time limit the number of artists that each artist can be considered simular too.

Is that more of what your wanting. :)


Not quite. Almost. I like the way the playlists get populated. The issue (for me) is when you have the option to have the playlist autoload the next batch on the last song, too often I'm getting another batch of the same artists I just heard and too many of the exact same songs. Here's an example:

Let's say that I'm Currently playing: Joy Division - Love Will Tear Us Apart

which, let's say, last.fm says is similar to:
Bauhaus, David Bowie, Cocteau Twins, New Order

Let's say for this example that the only Joy Division song I have is "Love Will Tear Us Apart". And, so, the script encues:

Cocteau Twins
David Bowie
Bauhaus
New Order

Now, advance ahead, and now New Order is playing and so the script is going to look for similar artists. There's a good chance that the script will encue Joy Division into now playing. And since in this example, I only have "Love Will Tear Us Apart", I may hear this exact song 4 songs later.

Now, I have played with grabbing more songs from last.fm, making the generated similar playlists bigger (I'm currenlty pulling 13 artists at a time). Evenso, too often, I have the same song played too frequently when you have a smaller pool of similar artists.

It seems that the most logically way is to *optionallY* filter recently played songs (and, perhaps, recently played artists) from those items that get transfered into the cue, those that are automatically loaded and encued. Let those songs live in the "Similar Artists" playlists, but filter them based on recent history.

I don't know how to make this much clearer.

I've not yet had an instance where I've heard the same song 3 times in the same 39 songs (a multiple of 13), but I"ve had the same song cued twice a number of times while using the script for the last few months. I have approximately 13,000 tunes in the library but nearly 1/6 of them are where I have one song by an individual artist or band.

Thanks.

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by rovingcowboy » Wed Dec 26, 2012 2:53 pm

So its not wanting them from 10 minutes ago its a option for it to remember whos simular to who and then not play the same songs for a period of 24 hours so you could start and stop the playing several times in one day and not get the same songs, and at the same time limit the number of artists that each artist can be considered simular too.

Is that more of what your wanting. :)

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by lumper5 » Wed Dec 26, 2012 2:46 pm

rovingcowboy wrote:
lumper5 wrote::D This is a fantastically useful and truly marvelous script. Thank you. One suggestion - and forgive me if this has already been raised, as I may have missed it when scanning the forum - I think a useful option would be to exclude recently played songs when automatically encueing the tracks. I've run in to situations where some of my lesser known artists pretty much are only similar to each other and if I have only a few tracks from them, I get into a situation where songs are repeating too frequently. Perhaps the easy way would be to ignore tracks that already exist in the now playing playlist history. Or, temporarily store these artists in memory and avoid repeating artists /songs for xx amount of time up an hour or some such? That little tweak would be super handy. Perhaps there's already a way to finesse that?


So your wanting a line in the script tnat would allow you to pick an option of only finding simular artists from songs ( played > 10 minutes) ago is that something like your wish?


No - that's not it at all. I've found that sometimes the same song gets played maybe 10-15 songs later because X artist is similar to Y and when Y plays, it's now similar to X and so when the script encues related artists upon playing Y, there's a chance that the same song by X will play again. So, I would ask that:

a. have an option to filter out recently played songs
b. have an option to filter out recently played artists

- that would ensure that songs /artists would not play too frequently.

Make sense?

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by rovingcowboy » Wed Dec 26, 2012 2:39 pm

lumper5 wrote::D This is a fantastically useful and truly marvelous script. Thank you. One suggestion - and forgive me if this has already been raised, as I may have missed it when scanning the forum - I think a useful option would be to exclude recently played songs when automatically encueing the tracks. I've run in to situations where some of my lesser known artists pretty much are only similar to each other and if I have only a few tracks from them, I get into a situation where songs are repeating too frequently. Perhaps the easy way would be to ignore tracks that already exist in the now playing playlist history. Or, temporarily store these artists in memory and avoid repeating artists /songs for xx amount of time up an hour or some such? That little tweak would be super handy. Perhaps there's already a way to finesse that?


So your wanting a line in the script tnat would allow you to pick an option of only finding simular artists from songs ( played > 10 minutes) ago is that something like your wish?

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by lumper5 » Wed Dec 26, 2012 2:22 pm

:D This is a fantastically useful and truly marvelous script. Thank you. One suggestion - and forgive me if this has already been raised, as I may have missed it when scanning the forum - I think a useful option would be to exclude recently played songs when automatically encueing the tracks. I've run in to situations where some of my lesser known artists pretty much are only similar to each other and if I have only a few tracks from them, I get into a situation where songs are repeating too frequently. Perhaps the easy way would be to ignore tracks that already exist in the now playing playlist history. Or, temporarily store these artists in memory and avoid repeating artists /songs for xx amount of time up an hour or some such? That little tweak would be super handy. Perhaps there's already a way to finesse that?

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by trixmoto » Tue Oct 30, 2012 8:25 am

I've no idea then, there's nothing obvious in there, it seems to be in the middle of a search. I'll add it to my list to try and investigate more, when I have time.

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by rockportrait » Tue Oct 30, 2012 8:15 am

Yep, that was the end of the logfile. I tried waiting longer then reloading the file into Notepad, but nothing further was added.
Eventually I did the three-finger salute to close MediaMonkey.

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by trixmoto » Tue Oct 30, 2012 8:00 am

Everything looks fine there, the long replace lines are my best attempt at doing some fuzzy matching with SQL, which is far from fuzzy in itself. Is that the end of the logfile?

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by rockportrait » Sat Oct 27, 2012 4:29 am

OK, after a few minutes I chose to open the log, and this is what we get. I assume those very long "REPLACE" query lines are not supposed to look like they do.

Code: Select all
#CREATE TABLE IF NOT EXISTS TrixSongRank (ID INTEGER PRIMARY KEY, Rank INTEGER)
#DELETE FROM TrixSongRank
#SELECT Id FROM Artists WHERE Artist='Judas Priest'
@http://ws.audioscrobbler.com/2.0/?method=artist.getSimilar&api_key=6cfe51c9bf7e77d6449e63ac0db2ac24&artist=Judas+Priest
@http://ws.audioscrobbler.com/2.0/?method=artist.getTopTracks&api_key=6cfe51c9bf7e77d6449e63ac0db2ac24&artist=Judas+Priest&limit=100
#SELECT Songs.ID FROM Songs,ArtistsSongs WHERE Songs.ID=ArtistsSongs.IDSong AND ArtistsSongs.PersonType=1 AND ArtistsSongs.IDArtist=1505 AND Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(UpperW(Songs.SongTitle),'&','AND'),'+','AND'),' N ','AND'),'''N''','AND'),' ',''),'.',''),',',''),':',''),';',''),'-',''),'_',''),'!',''),'''',''),'"','')='BREAKINGTHELAW'
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (124994,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125002,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125011,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125134,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125275,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125301,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125349,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125371,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (157754,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (166235,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (168067,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (173011,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (191447,100)
#SELECT Songs.ID FROM Songs,ArtistsSongs WHERE Songs.ID=ArtistsSongs.IDSong AND ArtistsSongs.PersonType=1 AND ArtistsSongs.IDArtist=1505 AND Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(UpperW(Songs.SongTitle),'&','AND'),'+','AND'),' N ','AND'),'''N''','AND'),' ',''),'.',''),',',''),':',''),';',''),'-',''),'_',''),'!',''),'''',''),'"','')='PAINKILLER'
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (124996,99)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125063,99)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125097,99)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125262,99)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125352,99)
#SELECT Songs.ID FROM Songs,ArtistsSongs WHERE Songs.ID=ArtistsSongs.IDSong AND ArtistsSongs.PersonType=1 AND ArtistsSongs.IDArtist=1505 AND Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(UpperW(Songs.SongTitle),'&','AND'),'+','AND'),' N ','AND'),'''N''','AND'),' ',''),'.',''),',',''),':',''),';',''),'-',''),'_',''),'!',''),'''',''),'"','')='LIVINGAFTERMIDNIGHT'
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (124999,98)


.
. Code is too long, so I am cutting it here and showing you the last few lines after this.
.


#SELECT Songs.ID FROM Songs,ArtistsSongs WHERE Songs.ID=ArtistsSongs.IDSong AND ArtistsSongs.PersonType=1 AND ArtistsSongs.IDArtist=11249 AND Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(UpperW(Songs.SongTitle),'&','AND'),'+','AND'),' N ','AND'),'''N''','AND'),' ',''),'.',''),',',''),':',''),';',''),'-',''),'_',''),'!',''),'''',''),'"','')='WHITEHEATREDHOT'
#SELECT Songs.Id,Songs.SongTitle FROM ArtistsSongs,Songs LEFT OUTER JOIN TrixSongRank ON Songs.ID=TrixSongRank.ID WHERE Songs.ID=ArtistsSongs.IDSong AND ArtistsSongs.PersonType=1 AND ArtistsSongs.IDArtist=11249 AND (Rating<0 OR Rating>55) GROUP BY Songs.SongTitle ORDER BY TrixSongRank.Rank DESC,Random()
#SELECT Id,Artist FROM Artists WHERE Artist='Accept'
@http://ws.audioscrobbler.com/2.0/?method=artist.getTopTracks&api_key=6cfe51c9bf7e77d6449e63ac0db2ac24&artist=Accept&limit=100
#SELECT Songs.ID FROM Songs,ArtistsSongs WHERE Songs.ID=ArtistsSongs.IDSong AND ArtistsSongs.PersonType=1 AND ArtistsSongs.IDArtist=6365 AND Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(UpperW(Songs.SongTitle),'&','AND'),'+','AND'),' N ','AND'),'''N''','AND'),' ',''),'.',''),',',''),':',''),';',''),'-',''),'_',''),'!',''),'''',''),'"','')='BALLSTOTHEWALL'

Top

cron