Page 35 of 67

Re: Genre Finder 4.1 [MM2+3]

Posted: Sat Oct 31, 2009 3:30 pm
by Kevinowpb
Hmmm.. not sure.. I've backed up and restrored so many times... I'll uninstall it, and pull down the one from your site.. see what happens.

trixmoto wrote:Are you sure you're using version 4.1? The reason I ask is because line 533 does not contain a "commit", but line 527 does. Modified the script in anyway?

Re: Genre Finder 4.1 [MM2+3]

Posted: Sun Nov 01, 2009 8:29 am
by Owyn
Testing this script to use in cleanup of a collection of primarily covers and bootlegs from various music blogs.

As always, thanks for the various configuration options. Getting the white list right has been "interesting".
Just keep running a test and then checking the log. :o

Got "key not in collection" error. Bex fixed the same problem in his last update for SQL Viewer.

Edit: Error specific to Genre Finder
- Line 466, Col 8
- Unchecking "Check Library" avoids error

Re: Genre Finder 4.1 [MM2+3]

Posted: Sun Nov 01, 2009 10:47 am
by trixmoto
Ok, I'll check this out and get it sorted in the next version.

Re: Genre Finder 4.1 [MM2+3]

Posted: Sun Nov 01, 2009 10:05 pm
by Owyn
Been working (for a while) on getting whitelist done.

Current status (still WIP as I bring in new test cases):

Code: Select all

Alt Country,Alt-Country=Alt Country,Americana,British,Canadian,Bluegrass,Classical,Doo Wop,Irish,R&B,Pop Rock,Soul,Blues%=Blues,Celtic%=Celtic,%Country=Country,Country%=Country,Flute%=Flute,Folk%=Folk,Gospel%=Gospel,Guitar%=Guitar,Indie%=Indie,Jazz%=Jazz,Pop%=Pop,Rock%=Rock,Vocal%=Vocal,World%=World
I think that an extension of the syntax to support contains would be handy. Thinking of, e.g.
The existing syntax:
%Jazz -> Ends with "Jazz"
Jazz% -> Starts with "Jazz"

New syntax:
%Jazz% -> Contains "Jazz"

Looks like a fairly simple change to the IsInList function.

Re: Genre Finder 4.1 [MM2+3]

Posted: Mon Nov 02, 2009 5:10 am
by trixmoto
I thought I'd added this in the last release, but I've just checked the code and I haven't. That might mean there was a result why I didn't, but I've put it on my list to have another look at in the next version so we'll see.

Re: Genre Finder 4.1 [MM2+3]

Posted: Mon Nov 02, 2009 5:42 am
by Owyn
Thanks. This will be another very useful tool once I tune it.

I have been testing the white list against some large compilation sets that I have which tend to be major genre specific, e.g. Ken Burns Jazz, The Chess Story Box Set, Top 500 Country, etc.

Getting fairly close to letting Genre Finder actually change something. The main albums section of my library is fairly closely coded to AMG album genre and style but, I am less happy with my multi-artist major genre/label compilations and definitely unhappy with the genres from music blogs. Plan on including Genre Finder as part of my cleanup procedures for new tracks from blogs (about 50 tracks/week).

Re: Genre Finder 4.1 [MM2+3]

Posted: Mon Nov 02, 2009 12:43 pm
by trixmoto
Excellent, I'm glad you're finding it useful :)

Re: Genre Finder 4.1 [MM2+3]

Posted: Tue Nov 03, 2009 3:28 pm
by Owyn
Well Genre Finder is now in use for cleanup of new music blog downloads. Not ready for prime time for more extensive use.

Looking at 2 changes(hacks) or maybe enhancements from you (wheedle, wheedle). Heh, probably both.

1)Preserve Genre list
New list, e.g. "Cover,Favs,Xmas" of existing track genre to be preserved in the new genre string. e.g. if the tracks existing Genres includes "Xmas" and the suggested genre is "Folk", then the new Genre list for the track would be "Folk; Xmas".
Add second test for existing genre OK after preserved genres appended.

2)Option to leave existing Genres unchanged when suggested Genre is Unknown, i.e. blank.
Uncheck tracks with Unknown genre when option in effect.

Re: Genre Finder 4.1 [MM2+3]

Posted: Wed Nov 04, 2009 5:00 am
by trixmoto
1) So as well as having the white list, you also want another preserve list? Then after getting the suggestion(s) any values from the preserve list would also be added to the end of the suggested value?

2) This has been added to my list, I'm surprised this isn't already a feature! :oops:

Re: Genre Finder 4.1 [MM2+3]

Posted: Wed Nov 04, 2009 5:55 am
by Owyn
trixmoto wrote:1) So as well as having the white list, you also want another preserve list? Then after getting the suggestion(s) any values from the preserve list would also be added to the end of the suggested value?
Yeah.
The Whitelist operates on the last.fm genres. I have got it to the point that it works well (for me) on Artist data.
The Preservelist would operate on the existing track genres. It's scope is global but is applied discretely per track.

There are two use cases.
1)Preserve special genre tagging that is unique (and important) to the user. e.g. I use "Favs" to generate an auto-playlist of tracks which are always to be copied to my portable player.
2)Preserve specific album genre, e.g. the genre "Swing" might be common to a Swing Bands compilation album. Expected use would be to edit GF Options before running the tool.
2) This has been added to my list, I'm surprised this isn't already a feature! :oops:
:D

Re: Genre Finder 4.1 [MM2+3]

Posted: Wed Nov 04, 2009 11:06 am
by Owyn
Added Blacklist="Jazzapedia,Martin Scorsese%"

This kind of broke things, e.g.

Code: Select all

Runmode:artists
Suggestions...
Multiple values...
@http://ws.audioscrobbler.com/2.0/?method=artist.getTopTags&api_key=6cfe51c9bf7e77d6449e63ac0db2ac24&artist=Albert+Collins
Genre 'Rock' translated to 'Rock'.
Genre 'Classic Rock' is not in whitelist
'Albert Collins' contains artist name (Albert Collins)
Albert Collins - Frosty: Genre=Blues; Guitar; Blues Rock; Rock; Classic Rock; Texas Blues
Albert Collins - Frosty: Genre=Blues; Guitar; Blues Rock; Rock; Classic Rock; Texas Blues
@http://ws.audioscrobbler.com/2.0/?method=artist.getTopTags&api_key=6cfe51c9bf7e77d6449e63ac0db2ac24&artist=Albert+King
Genre 'Rhythm And Blues' translated to 'R&B'.
Albert King - Born Under The Bad Sign: Genre=Blues; R&B; Rhythm And Blues; Guitar; Electric Blues; Classic Blues; Blues Rock; Soul
Albert King - Born Under The Bad Sign: Genre=Blues; R&B; Rhythm And Blues; Guitar; Electric Blues; Classic Blues; Blues Rock; Soul
@http://ws.audioscrobbler.com/2.0/?method=artist.getTopTags&api_key=6cfe51c9bf7e77d6449e63ac0db2ac24&artist=Ali+Farka+Tour%C3%A9
Genre 'African' is not in whitelist
Genre 'World' translated to 'World'.
Genre 'Mali' is not in whitelist
Genre 'Africa' is not in whitelist
Genre 'World Music' translated to 'World'.
Ali Farka Touré - Timbarma: Genre=African; World; Blues; Mali; Africa; World Music; Folk
and the best one

Code: Select all

@http://ws.audioscrobbler.com/2.0/?method=artist.getTopTags&api_key=6cfe51c9bf7e77d6449e63ac0db2ac24&artist=Count+Basie+Orchestra+with+Jimmy+Rushing
Genre 'Jazzapedia' is in blacklist.
Count Basie Orchestra with Jimmy Rushing - Going To Chicago Blues: Genre=Jazzapedia
Time to break open the code. More to follow.

Re: Genre Finder 4.1 [MM2+3]

Posted: Wed Nov 04, 2009 1:53 pm
by trixmoto
I've added the preservation list idea to my list, but I think it may be difficult to include in the current implementation so no promises! :)

One thing to double check is that once you've changed your settings you should restart MM, otherwise if you're in artist or album mode there is some caching that may produce so strange results. That "Jazzapedia" example is a bit worrying, please let me know if you find out what's causing that one! :-?

Re: Genre Finder 4.1 [MM2+3]

Posted: Wed Nov 04, 2009 1:59 pm
by Owyn
I've already started putting the pieces in place. Hold off on any changes on your side for a day.

Diff, hopefully, to follow.

Edit:

Code: Select all

One thing to double check is that once you've changed your settings you should restart MM, otherwise if you're in artist or album mode there is some caching that may produce so strange results. That "Jazzapedia" example is a bit worrying, please let me know if you find out what's causing that one!
I am going to force a cache clear on run for the purposes of testing. I am making too many changes to restart each time, besides, it interrupts the music I'm playing. :D

Re: Genre Finder 4.1 [MM2+3]

Posted: Wed Nov 04, 2009 7:05 pm
by Owyn
Clearing cache had no impact on bug results. It does however make it much faster to do repetitive tests.

The problem is in the code starting at line 430.

Code: Select all

    If (str <> "") And (cnt >= min) Then
      arr = Split(que.Item("fld"),"|")
      For i = 0 To UBound(arr)
        fld = arr(i)  
        res = Acceptable(fld,str)
        If Not (res = "") Then
          fld = FieldToProp(Left(fld,1))
          If dic.Exists(fld) Then
            Dim tmp : tmp = dic.Item(fld)
            If Not IsDup(tmp,res) Then
              dic.Item(fld) = tmp&"; "&res
            End If                
          Else
            Call dic.Add(fld,res)
          End If
        End If
      Next
    Else
      If (Debug > 2) And (str <> "") And (cnt < min) Then
        Call out("'"&str&"' match value ("&cnt&") is below minimum ("&min&")")
      End If      
    End If
The code doesn't differentiate between whitelist or blacklist for a non-blank result from Acceptable.
Whitelist returns a value for items in or mapped by whitelist.
Blacklist returns a value for items not in blacklist.
Result. One or the other is always non-blank.

Re: Genre Finder 4.1 [MM2+3]

Posted: Wed Nov 04, 2009 7:16 pm
by Owyn
PS: Off to pull out a pile of debug code from my own version. It took me a bit to get my head around what was actually happening.

PPS: Also pulling out the code I started to work with for Unknown de-select. Best if I wait for something from you.

FYI: here is the code I used to clear the cache. Insert after line 190.

Code: Select all

  If ini.BoolValue("GenreFinder","ClearCache") Then
	If debug > 2 Then
		Dim cac1 : Set cac1 = SDB.Objects("GenreFinderCache")
		cac1.Removeall
		Set cac1 = Nothing
		Call out("Cache cleared...")
	End if
  End If