Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify genre list #1

Open
kmturley opened this issue Jul 3, 2017 · 3 comments · May be fixed by #2
Open

Simplify genre list #1

kmturley opened this issue Jul 3, 2017 · 3 comments · May be fixed by #2

Comments

@kmturley
Copy link

kmturley commented Jul 3, 2017

There are a lot of genres and it's difficult to organize 'new wave' and 'glimmer pop' into playlists. Could you have a function which sorts tracks into larger genre categories to automate this process for the user?

I had a go at prototyping it quickly by adding this function:

function simplifyGenre(genre) {
    if (genre.indexOf('classical') !== -1 ||
        genre.indexOf('jazz') !== -1 ||
        genre.indexOf('swing') !== -1 ||
        genre.indexOf('world') !== -1) { return 'classical, jazz & world'; }
    else if (genre.indexOf('alternative') !== -1 ||
             genre.indexOf('indie') !== -1 ||
             genre.indexOf('folk') !== -1) { return 'alternative, folk & indie'; }
    else if (genre.indexOf('dance') !== -1 ||
             genre.indexOf('drum and bass') !== -1 ||
             genre.indexOf('electro') !== -1 ||
             genre.indexOf('garage') !== -1 ||
             genre.indexOf('house') !== -1 ||
             genre.indexOf('beat') !== -1 ||
             genre.indexOf('break') !== -1 ||
             genre.indexOf('rave') !== -1) { return 'electronic, dance & house'; }
    else if (genre.indexOf('downtempo') !== -1 ||
             genre.indexOf('lounge') !== -1 ||
             genre.indexOf('easy') !== -1 ||
             genre.indexOf('chill') !== -1) { return 'lounge, downtempo & chillout'; }
    else if (genre.indexOf('funk') !== -1 ||
             genre.indexOf('disco') !== -1 ||
             genre.indexOf('r&b') !== -1 ||
             genre.indexOf('reggae') !== -1 ||
             genre.indexOf('soul') !== -1 ||
             genre.indexOf('motown') !== -1,
             genre.indexOf('quiet storm') !== -1) { return 'funk, soul & reggae'; }
    else if (genre.indexOf('hip') !== -1 ||
             genre.indexOf('hop') !== -1 ||
             genre.indexOf('rap') !== -1 ||
             genre.indexOf('urban') !== -1) { return 'hip-hop, rap & urban'; }
    else if (genre.indexOf('rock') !== -1 ||
             genre.indexOf('blues') !== -1 ||
             genre.indexOf('metal') !== -1 ||
             genre.indexOf('mellow gold') !== -1 ||
             genre.indexOf('wave') !== -1) { return 'rock, metal & blues'; }
    else { return genre; }
}

Then within your addTracks method:

        _.each(genres, function(genre) {
                genre = simplifyGenre(genre);

This is how it comes out:

screen shot 2017-07-03 at 4 46 26 pm

Although my version is not perfect (I'm guessing because the genres are based on an album, not a song?) could you implement something like this to your tool?

@kmturley kmturley linked a pull request Dec 3, 2017 that will close this issue
@zkendall
Copy link

I agree that this is a problem.

Another thing that might help is having a song-genre network graph view. Then you could visually see how songs grouped into related genres.

@paranoidi
Copy link

Yeah, I wanted to categorize my music into maybe 5 categories .. but there's really no chance / interest of doing so when I got about 200-300 "genres" from the scan.

@kmturley
Copy link
Author

kmturley commented Feb 18, 2019

Check out my version which tries to sort them in Parent/Child genre lists:
https://github.com/kmturley/OrganizeYourMusic

I use a list of genres nested under their parents here:
https://github.com/kmturley/OrganizeYourMusic/blob/master/web/genres.js

This list is manually created, but ideally we could pull it from an API somewhere!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants