Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  1. #1
    Senior Member
    Join Date
    May 2008
    Location
    The Netherlands
    Posts
    122

    Genres, moods, themes and styles

    As metadata providers get better and better I find I have a need to be able to differentiate more into the types of genres I am storing for my music collection. Rateyourmusic has a genre and descriptor (see https://rateyourmusic.com/release/al...back-in-black/), Discogs has a genre and style (see https://www.discogs.com/master/8471), and Allmusic goes over the top with genre, style, mood, and theme (see https://www.allmusic.com/album/mw0000188862). You used to be able to use CustomScan to load these extra tags, but this plugin is not working for me anymore with LMS 8.0.

    Is there a broader wish for a functionality where different types of genres can be stored and searched for in the database? If so, could this eventually become a part of main LMS or is this functionality too marginal to be considered? The upside of integrating it into LMS is that for instance mood can also be used in different places, for instance to create a random mix based on a certain mood (or moods).

    What do you think?

    --
    lauret

  2. #2
    Senior Member bernt's Avatar
    Join Date
    Aug 2005
    Location
    Sweden, Kalmar
    Posts
    825

    LastMix

    The plugin LastMix maybe?
    SB Touch optical to Hegel H90, Speakers Larsen 4.2
    Spare SB3
    AirPlay Bridge to Audio Pro A10
    Squeezelite-x connected to home LMS with ZeroTier One.
    SB Radio
    ReadyNAS 202
    iPeng

  3. #3
    Senior Member
    Join Date
    May 2008
    Location
    The Netherlands
    Posts
    122
    Quote Originally Posted by bernt View Post
    The plugin LastMix maybe?
    My use case lies with metadata stored in my local files. AFAIK LastMix uses Last.fm to create mixes and does not use local tag information, certainly not the tag mood, which is not stored in the LMS db.

  4. #4
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    1,093
    Quote Originally Posted by lauret View Post
    As metadata providers get better and better I find I have a need to be able to differentiate more into the types of genres I am storing for my music collection.
    Is there a broader wish for a functionality where different types of genres can be stored and searched for in the database? If so, could this eventually become a part of main LMS or is this functionality too marginal to be considered? The upside of integrating it into LMS is that for instance mood can also be used in different places, for instance to create a random mix based on a certain mood (or moods).
    A flexible mechanism to add metadata (basically, an arbitrary number of key-value pairs associated with a track) would be very useful. As I needed this for the LMS Essentia Integration, I wrote a plugin (which includes functionality to upload metadata and to query it). The obvious disadvantage of this is that a client (e.g. a GUI) has to support this specific method to access it (so Erland's plugins' metadata is used only by his plugins, LMS Essentia's only by my apps etc.), therefore having an official standard would be nice to have.
    That being said, it may very well be rather marginal and it seems to me the core development focus nowadays is mostly on streaming, which would not benefit from having such a functionality.

    btw, this may be of interest.
    Various SW: Web Interface | TUI | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Chiptunes | LMSlib2go | ...
    Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

  5. #5
    Senior Member
    Join Date
    May 2008
    Location
    The Netherlands
    Posts
    122
    Quote Originally Posted by Roland0 View Post
    A flexible mechanism to add metadata (basically, an arbitrary number of key-value pairs associated with a track) would be very useful. As I needed this for the LMS Essentia Integration, I wrote a plugin (which includes functionality to upload metadata and to query it). The obvious disadvantage of this is that a client (e.g. a GUI) has to support this specific method to access it (so Erland's plugins' metadata is used only by his plugins, LMS Essentia's only by my apps etc.), therefore having an official standard would be nice to have.
    That being said, it may very well be rather marginal and it seems to me the core development focus nowadays is mostly on streaming, which would not benefit from having such a functionality.
    Very interesting project where you are working on. Did you end up storing the extra metadata in some custom tables? I'm wondering how the extra information from Essentia is queried/browsed from the user perspective. Is that also part of your plugin?

    Quote Originally Posted by Roland0 View Post
    btw, this may be of interest.
    Looks interesting, thanks!

  6. #6
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    1,093
    Quote Originally Posted by lauret View Post
    Did you end up storing the extra metadata in some custom tables?
    Yes (in LMS' existing persistent DB)

    I'm wondering how the extra information from Essentia is queried/browsed from the user perspective.
    see screenshots

    Is that also part of your plugin?
    No, the Essentia plugin only provides the API, admin stuff, data visualization and a JSON upload facility (so you can import metadata from any source. I actually planned on modifying whatlastgenre to output JSON files in a compatible format, but I am currently focusing instead on using neural networks to classify music (which is already possible with Essentia+Tensorflow, but the system I'm developing let's you define your own categories and learns from your own music collection))
    Various SW: Web Interface | TUI | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Chiptunes | LMSlib2go | ...
    Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

  7. #7
    Senior Member
    Join Date
    Apr 2007
    Posts
    276
    Quote Originally Posted by Roland0 View Post
    I am currently focusing instead on using neural networks to classify music (which is already possible with Essentia+Tensorflow, but the system I'm developing let's you define your own categories and learns from your own music collection))
    That sounds cool!

  8. #8
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,100
    Quote Originally Posted by lauret View Post
    Is there a broader wish for a functionality where different types of genres can be stored and searched for in the database? If so, could this eventually become a part of main LMS or is this functionality too marginal to be considered? The upside of integrating it into LMS is that for instance mood can also be used in different places, for instance to create a random mix based on a certain mood (or moods).

    What do you think?
    I guess Im a bit biased since Ive spent a considerable time to work on this in CustomScan/CustomBrowse plugins but to me it would be very useful to some kind of support for it in LMS core (or broadly supported plugin). The issue with having it as a plugin is that its hard to get support for searching/browsing in all third party user interfaces/apps. Support for advanced search is especially important since the virtual library functionality is based on advanced search.

    For me the main usage scenario would be to be able to set tags/genres without having to modify music files and to be able to find and play music with a certain tag/genre (or create a smart playlist based on it). Importing genres/tags from third party sources such as musicbrainz, lastfm and similar would also be very useful. With latest support for integrating streaming service favorites in your library Id like the functionality both for local music and integrated songs from streaming services.

    However, there are probably a few obstacles that need to be handled before it can be integrated in the core:
    - who will maintain the functionality ? My guess is that its less than 20% of the LMS users that is interested in this kind of functionality and this makes it less interesting for core developers to maintain.
    - one main principle with LMS is that database can be discarded without loosing any information. If this is true in the future you would be limited to genres/tags that can be integrated from third party sources which would make it a bit less useful IMHO.

    I think the core functionality (if implemented) could focus on storage, scanner hooks (mostly there already), search and ability to view genres/tags of a song. Functionality to import genres/tags from third party sources and maintain locally stored genres/tags could be handled by plugins. Functionality for browse/smart playlists in core would be nice but it could also be handled by third party plugins. Browse/smart playlists tends to get complicated so supporting it in core will probably take up too much time.

    CustomScan/CustomBrowse was implemented a long time ago, before the current scanner hooks and browsedb support existed in core. They would be possible to simplify a lot and made to work better if newly implemented today. Unfortunately Im unlikely to get the time to do it myself but Id love if someone else does something regarding it.
    Erland Isaksson (My homepage)
    Developer of many plugins/applets

  9. #9
    Senior Member
    Join Date
    May 2008
    Location
    The Netherlands
    Posts
    122
    Erland, thanks for your response!

    Quote Originally Posted by erland View Post
    However, there are probably a few obstacles that need to be handled before it can be integrated in the core:
    - who will maintain the functionality ? My guess is that its less than 20% of the LMS users that is interested in this kind of functionality and this makes it less interesting for core developers to maintain.
    If this functionality could be a flexible facility for track based tags I'm guessing this could also be used in a couple of plugins and subsequently increases usage across LMS users. This however does not solve the problem of maintaining it of course, but should increase the incentive to keep it working.

    Quote Originally Posted by erland View Post
    - one main principle with LMS is that database can be discarded without loosing any information. If this is true in the future you would be limited to genres/tags that can be integrated from third party sources which would make it a bit less useful IMHO.
    I do not think this would be limited to third party sources. You should also be able to use tags which are stored in your local music, these tags can be discarded without losing information. But the possibility to enrich these tags with third-party information sounds very helpful.

    Quote Originally Posted by erland View Post
    I think the core functionality (if implemented) could focus on storage, scanner hooks (mostly there already), search and ability to view genres/tags of a song. Functionality to import genres/tags from third party sources and maintain locally stored genres/tags could be handled by plugins. Functionality for browse/smart playlists in core would be nice but it could also be handled by third party plugins. Browse/smart playlists tends to get complicated so supporting it in core will probably take up too much time.
    I was thinking about duplicating the tag handling and search/browse handling of genres, but making it configurable. This should then be user-configurable, but also configurable from a plugin perspective. For instance, I would want to add the handling of the tag mood, which I have stored into my local collection. Roland0 above would want to do the same, but then enable the handling of mood from inside his plugin so it can be stored using the scanning hooks.

    I guess the main question is if this functionality would be considered as part of LMS core.

  10. #10
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,100
    Quote Originally Posted by lauret View Post
    I do not think this would be limited to third party sources. You should also be able to use tags which are stored in your local music, these tags can be discarded without losing information. But the possibility to enrich these tags with third-party information sounds very helpful.
    Definitely, what I meant was that they could be imported from anything outside LMS. Could be tags in files, metadata(xml) files in the file system, other software you run on your local network or cloud based services/data sources.

    Quote Originally Posted by lauret View Post
    I was thinking about duplicating the tag handling and search/browse handling of genres, but making it configurable. This should then be user-configurable, but also configurable from a plugin perspective. For instance, I would want to add the handling of the tag mood, which I have stored into my local collection. Roland0 above would want to do the same, but then enable the handling of mood from inside his plugin so it can be stored using the scanning hooks.
    In Custom Scan I used a database structure based on key/value pairs. This makes the storage very generic, you can basically store attribute in it. However, the issue is that browsing tends to get less optimized from a performance perspective since all genres/tags are stored in a single database table, especially when you want to filter based on multiple type of genres/tags in a single query (browsing moods->themes->albums for example). The alternative is to instead create the database tables based on the user specific configuration, with separate table structures for each type of genre/tag, so moods would be in one table and themes in another. Each user would have a different set of database tables based on their configuration. This would likely improve performance but instead introduce extra complexity if you want to use DBIx to abstract the raw SQL towards the database. It can probably be handled but I never figured it out with my limited Perl knowledge. If you want to go the route with separate tables with might be worth to consider adding support for new type of attributes(genres) through plugins via Perl code rather than configuration, this likely makes it easier to use DBIx.

    Another consideration is how to optimize indices. In CustomScan, if I remember correctly, I selected to not have a integer primary key for each attribute(for example mood) value. This is obviously less optimized but I selected it because if you like to use it in random mix, smart playlists and similar you need to store the attribute value (Mood=Happy) anyway since the integer value(Mood=42) would change if you perform a rescan.

    CustomScan supports key/value pairs on both artist, album and track level but I think a new attempt probably should limit itself to track level to make it a bit less complex.

    Quote Originally Posted by lauret View Post
    I guess the main question is if this functionality would be considered as part of LMS core.
    My feeling is that someone need to prove the concept as a plugin first, when it has been proved that it can be done without adding too much complexity it can be considered for pull requests and inclusion in LMS. I believe this is what happened with the virtual library support which is now part of LMS core, first I did a way too complex attempt with MultiLibrary/CustomBrowse plugin then Michael made a more simplified plugin with less flexibility but also significantly less complexity/code and after that something based on Michaels attempt got included in LMS core.

    Michael, if you are reading this, please let us know if you disagree.

    The key for it to be included in LMS is to make sure it follows the LMS code style and is based on relatively little code. If its too much code or doesnt follow the LMS code style it wont be included in LMS code. These are likely the main reasons why my plugins never will be part of LMS core, they are just too flexible/complex and doesnt use LMS coding styles (for example they dont use DBIx for database abstraction)

    Having said that, almost no plugin functionality made by non core developers have historically been included in LMS core as it is. There are some cases where similar functionality has been included but in those cases the code has often been rewritten more or less totally before included in the core. The exception I can think of is Extension Downloader made by Triode but he was more or less a core developer at that time if I remember correctly. The reason for this is likely that core developer(s) need to understand and be able to maintain all the code in LMS core and this is sometimes hard if written by someone else. However, nothing bad with having functionality as a plugin and Michael has historically been open to adding api/hooks in core to make a plugin possible. A plugin developed as a joint effort by several developers is also more likely to survive over time.

    If you want to try to do something and like to discuss design choices feel free to keep posing and Ill give you answers based on my experience.
    Erland Isaksson (My homepage)
    Developer of many plugins/applets

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •