ScrobblerDJ V2.20 - Updated 16/11/2013

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

ScrobblerDJ V2.16.1

Postby civiliza » Fri Sep 20, 2013 6:18 am

Another Corrected Version ScrobblerDJ V2.16.1

Fixed (properly this time) bug that showed up when Same Genre If Match Failed processing tried to find a genre match for a track with multiple genres.

Thanks for zooming in on the screen grab this time theweasel68, last time the text was just small enough for me to ignore it and go straight to the Line number - This time I was able to read it and thought "that shouldn't be there" - sure enough when I looked at the relevant area of code this morning it was a pile of (well, let's just say something unpleasant).

V2.15.2 fixed one part of the code line, but not all of it, furthermore there was a second bug lurking a few lines down.

Anyway, after (metaphorically) kicking myself a few times, I knuckled down and tested the changes by adding a second genre (Blues Rock) to a Gary Moore track and it successfully queued a ZZ Top track purely on Genre (bumped all my other filters up as high as they would go).

Apologies once again, Civ
civiliza
 
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

Re: ScrobblerDJ V2.16.1

Postby theweasel68 » Fri Sep 20, 2013 6:48 am

civiliza wrote:Another Corrected Version ScrobblerDJ V2.16.1
Thanks for zooming in on the screen grab this time theweasel68


You are welcome :) Already downloaded and testing by running in the background. Appreciate your great work! Cheers.
theweasel68
 
Posts: 32
Joined: Mon Sep 09, 2013 4:15 pm
Location: Austria

Re: ScrobblerDJ V2.16.1 - Updated 20/09/2013

Postby civiliza » Fri Sep 20, 2013 7:48 am

For my own personal amusement, I have hacked my copy of V2.16.1 so that a Target BPM of zero is always considered as equalling the current track's BPM.

This means that with a Target BPM of 0, each successive track's BPM is within +/- BPM Window % of the one before but there is no final BPM destination. - effectively a smoothing filter on BPM changes, and (hopefully) avoiding the exhaustion of all tracks within a particular BPM range.

With all the major changes that have been added in the last few days, it hardly seems worth creating yet another new version just for this one change, so unless anyone has a particular need for it, I'll make it a permanent change in any future versions, but not release it for the time being.

For anyone who wants to edit their own private copy, I have changed the following line in ScrobblerDJ.vbs's Initialize subroutine from:
Code: Select all
    if CurrentBPM = 0 Then CurrentBPM = TargetBPM

to:
Code: Select all
    if CurrentBPM = 0 Then
        ' No meaningful BPM info,
        ' Treat it as if it had the Target BPM

        If TargetBPM = 0 Then
       ' TargetBPM was only being used to smooth BPM
            ' Temporarily assign it an abitrary BPM and throw open the BPM Windows
            TargetBPM = 120
            BPMWindow = 200
        End If

        CurrentBPM = TargetBPM
    Else
        ' Special case - treat a Target BPM of zero as Current BPM +/- BPM Window
        if TargetBPM = 0 Then TargetBPM = CurrentBPM
    End If
civiliza
 
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

Re: ScrobblerDJ V2.16.1 - Updated 20/09/2013

Postby theweasel68 » Fri Sep 20, 2013 8:40 am

Hi,
when Scrobbler DJ is finding the artist at Last.Fm, but no similar artist in my library, then another artist is taken randomly from my library. As "take same genre" is switched on, next song will be accordingly. However, setting is also that the same artist shall not be played for at least 60min. But I am getting now the same artist 5 times in a row....
theweasel68
 
Posts: 32
Joined: Mon Sep 09, 2013 4:15 pm
Location: Austria

Re: ScrobblerDJ V2.16.1 - Updated 20/09/2013

Postby civiliza » Fri Sep 20, 2013 9:07 am

Agreed, that would be what happens.

Darn it, why do simple solutions always have complicated consequences?

The No Similar Artists code was always a last resort and initially just picked a random song from the default playlist. It seemed the best place for genre matching, but if one artist is the only one performing in a particular genre, and is dis-similar to anyone else in your library it will play all that artist's songs in the genre before exhausting the genre and falling back on a random song.

(Once the Similar Artists situation has been disproved, the only checks that are applied are Same Song Repeats and the new Genre and BPM checks).

A temporary solution would be to lower the Minimal Match so that there are more potentially similar artists, but this will need thinking about. What about users who only have a limited number of artists in their library? Losing half the library because everyone's been played recently would probably not be a welcome development.

Any thoughts? A Maximum Same Artist option pehaps? Not well named since it obviously contradicts the No Same Artist time, but I can see no other useful solution.
Last edited by civiliza on Fri Sep 20, 2013 10:10 am, edited 1 time in total.
civiliza
 
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

Re: ScrobblerDJ V2.16.1 - Updated 20/09/2013

Postby civiliza » Fri Sep 20, 2013 9:36 am

Aha, just remembered that the fallthrough from "genre still present, pick a genre song" to "genre exhausted, pick a random song" split the No Similar Artist code in two, what I need to do is apply No Same Artist while in genre, but if the only remaining genre tracks are by recently played artists abandon the genre and pick a random track (which might still be the same Artist and Genre, but only becuase they came up Randomly).

To misquote a certain expedition member, "I'm just stepping out (to code), I may be gone for a while ...".

EDIT

Nope, It's not that simple, ther's no such thing as a "last time Artist X was played" field in the database, The ScrobblerDJ code uses the individual last played times of all the artist's tracks to calculate this on the fly in the Similar Artist processing, and it only does it once a random similar artist has been found in the library to minimise the overhead.

Performing this in the No Similar Artist code entaills finding a track with the right genre, then identifying each artist on the track and collating the Play History of all the library tracks on which any of those artists appeared only to find that say one of two or three artists has been played recently and so move onto a different genre track and repeat ad nauseum. It really is not feasible.
civiliza
 
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

ScrobblerDJ V2.17

Postby civiliza » Sat Sep 21, 2013 12:31 pm

New Version ScrobbleDJ V2.17

Now performs No Same Artist checks when trying to match genres (May still fall through to a track with the same Artist / Genre as a last resort, but will do do as a random pick from the Default Playlist rather than repeatedly picking the same artist(s) because they are the only one(s) in the genre).

Technical Stuff
When looking for Similar Artists, ScrobblerDJ has always had the potential to queue an Artist's collaboration track after another track by the artist if one of the acts on the collaboration has not been played recently and is similar to the current artist. Rather than keep this behaviour when matching genres, I have decided to apply a stricter rule of not queuing a (non similar) same-genre collaboration track if ANY of the collaborating artists have been played recently.

The reasoning being that it is one thing to take a chance on the same artist being queued several times in a row because of similarity, and it is another to guarentee it just because they are the only act in a genre.

--

An additional (undocumented) feature added in V2.17 is that when TargetBPM is enabled, a TargetBPM of 0 is treated as indicating that a smoothing factor of +/- BPMWindow % should be applied when picking successive tracks. As before, any other TargetBPM is a goal towards which successive changes head.

As an example, should say your first track have a BPM of 120:
- With TargetBPM and BPMWindow set to 1 and 10 respectively, then every track will be slower than the one before but by no more than 10% of the previous track's BPM. This could be anything from eg 120, 119, 118, 117 to eg 120, 108, 98, 89.
- With TargetBPM and BPMWindow set to 0 and 10 respecively,, successive tracks are free to (eventually) roam up and down throughout the entire BPM range of your library, however successive tracks can be no more than 10% faster or slower than the one before.

(Note, the TargetBPM of 1 has been used purely as an example, although it can be set, I hardly believe that anyone has a library containing tracks with a true tempo of 1 BPM, and since 10% of anything less than 10 is less than a whole number, any such tracks would never be reachble from a starting BPM of 120 anyway).
civiliza
 
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

Re: ScrobblerDJ V2.17 - Updated 21/09/2013

Postby civiliza » Sat Sep 21, 2013 12:55 pm

While learning the techniques neccessary to implement the V2.17 changes, I discovered that when asked for similar artists to one of my library artists (Gala), Last.FM returned a name in Asian characters that totally flummoxed the logme routine that writes debugging information out to a file.

(It didn't half give me a scare I can tell you - particualrly because I had just commented out a couple of logme calls).

Anyway, it's disabled by default anyway, but this is one more reason (apart from the massive potentially endless file size) to leave the debugging switched off when not needed.
civiliza
 
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

Re: ScrobblerDJ V2.17 - Updated 21/09/2013

Postby BigInJapan » Mon Oct 07, 2013 6:31 pm

Would not having the BPM tag populated cause the queries to miss?

I notice that even when I have this:
10/7/2013 7:06:47 PM: Enable BPM: False

The queries still include statements like:
...AND (Songs.BPM >= 0 AND Songs.BPM <= 999)...

I'm getting no matches, and most of my BPM tags are blank. I'm wondering if that's why.
Remember when Last.fm had those cool imagegen charts for use in signatures?
BigInJapan
 
Posts: 191
Joined: Mon Jan 02, 2012 10:42 pm

Re: ScrobblerDJ V2.17 - Updated 21/09/2013

Postby civiliza » Tue Oct 08, 2013 1:34 am

BigInJapan wrote:Would not having the BPM tag populated cause the queries to miss?

I notice that even when I have this:
10/7/2013 7:06:47 PM: Enable BPM: False

The queries still include statements like:
...AND (Songs.BPM >= 0 AND Songs.BPM <= 999)...

I'm getting no matches, and most of my BPM tags are blank. I'm wondering if that's why.


Blast, you're right. just checked using the SQLviewer add-in, and it seems that an unspecified BPM has a Songs.BPM value of -1. (Sorry, I never realised that).
civiliza
 
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

ScrobblerDJ V2.18

Postby civiliza » Tue Oct 08, 2013 1:39 am

Corrected Version ScrobblerDJ V2.18

Fixed an error introduced by the Target BPM code that always prevented songs with an unspecified BPM from being queued even when Target BPM was switched off (didn't realise that an unspecified BPM has a special value of -1 in the database).

I have changed the code so that Songs with unspecified BPM's are always treated as if they match the Target BPM.

EDIT - Didn't update the version history properly on HappyMonkeying, the title shows the latest version is V2.18, but the version history only goes up to V2.17.
civiliza
 
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

Re: ScrobblerDJ V2.18 - Updated 8/10/2013

Postby BigInJapan » Tue Oct 08, 2013 10:30 am

Thanks for the quick resposne. I'll try it out when I get home tonight.
Remember when Last.fm had those cool imagegen charts for use in signatures?
BigInJapan
 
Posts: 191
Joined: Mon Jan 02, 2012 10:42 pm

Re: ScrobblerDJ V2.18 - Updated 8/10/2013

Postby BigInJapan » Tue Oct 08, 2013 9:17 pm

With 2.18 I'm still not getting matches, and now Debug Mode doesn't seem to be writing a log file.
Remember when Last.fm had those cool imagegen charts for use in signatures?
BigInJapan
 
Posts: 191
Joined: Mon Jan 02, 2012 10:42 pm

Re: ScrobblerDJ V2.18 - Updated 8/10/2013

Postby civiliza » Tue Oct 08, 2013 9:57 pm

BigInJapan wrote:With 2.18 I'm still not getting matches, and now Debug Mode doesn't seem to be writing a log file.


I'm not experiencing that problem personally, on my XP system the log file turns up in %appdata%\MediaMonkey\Scripts but with the problems the deinstallation process was having it seems that there can be more than one location for Script files - try a topdown My Computer search.

I've just successfully queued three classical songs back to back (after starting with a fourth) all of which have nothing in the BPM field. (After an extensive BPM analysis session a few months ago, that's about the only section of my library without BPMs). that said, I had to turn off my Limit To Default Playlist option first because they were outside said playlist.

Currently at a loss as to why 2.18 is causing your problems, do you have blanks in your other fields like genre that could be narrowing down the list of available songs?

EDIT - I always find the default Minimum Match is too high for my library - the first Dictionary message in the debug output indicates how many similar artists meet the minimum match, but it has always been too high and if you can't find the log file anyway you wouldn't be able to read said message.
civiliza
 
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

Re: ScrobblerDJ V2.18 - Updated 8/10/2013

Postby BigInJapan » Thu Oct 10, 2013 6:08 pm

Thanks for the tip on expanding the search for the log file. I think I'm straightened out now.

The problem had something to do with my having MediaMonkey installed in two places on the computer. I have ver 4.0 in the normal location, and I have the 4.1 beta in another location. I had installed ScrobblerDJ 2.17 in both instances, but I had only updated to 2.18 in the MM 4.1 instance. For some reason, even though I was using MM 4.1, the log file was being written to the scripts folder for MM 4.0. In fact, it seemed to be using the code from that folder rather than from its own scripts folder. The log showed the same problem with the bpm statement.

To resolve the problem, I opened MM 4.0, updated to SDJ 2.18 there, closed that, opened MM 4.1, set it running, and now it's finding matches, and the log file shows the new logic being applied.
Remember when Last.fm had those cool imagegen charts for use in signatures?
BigInJapan
 
Posts: 191
Joined: Mon Jan 02, 2012 10:42 pm

PreviousNext

Return to Need Help with Addons?

Who is online

Users browsing this forum: No registered users and 11 guests