HydrogenAudio

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: _johnny7 on 2017-03-31 11:15:43

Title: Filter multiple genres - plugin?
Post by: _johnny7 on 2017-03-31 11:15:43
Hello,
having been a long-time user of Winamp, I think of changing to foobar because I'd like to be able to filter multiple genres. I have a classical music mp3-library and would like to choose, say, "piano", "19th-cent." and get the corresponding results. Is this a common way of using foobar? If a heavy lot of customisation was necessary, I'd rather stay with Winamp and renounce the additional options (as I also have yet to add all these genre tags).
If this is a standard procedure in foobar, I suppose there is a plugin necessary? For a new user, it is quite hard to figure out the vast range of available components. Would Facets or ColumnsUI do the deal, for the example? Some screenshots on the components pages would be very helpful.
Any introductory remarks for a total novice are very appreciated.
Title: Re: Filter multiple genres - plugin?
Post by: davideleo on 2017-03-31 12:33:42
Foobar2000 query language (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Query_syntax) is powerful enough to do that. Non need for special plugins, it is available in the media library search. Plugins like facets provide alternative ways of querying the library, perhaps more user friendly, but as you said it is not easy to understand which one you need and how to use it until you haven't played around a bit with the standard features, at least that's my advise.
Title: Re: Filter multiple genres - plugin?
Post by: Daeron on 2017-03-31 17:14:31
Facets and CUI Filter panels can both do what you are looking for. If you are specifically looking into dealing with multivalue fields you definitely want one of these components.

The former is a bit more feature rich if you are satisfied with Default UI (compared to CUI) and only requires that plugin to be installed so guess start with that. After you have it installed (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:How_to_install_a_component) you can go to 'File/Preferences/Media library/Facets' and either add or edit an existing preset to something like this:
Code: [Select]
$if2(%<genre>%,'('Unknown')')
Replace 'genre' with whichever field has your multivalue tags.

Once you did that, you'll have to add (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Layout_Editing_Mode) Facets to your existing foobar layout. With layout editing still active you can add multiple facets panes, each can list the possible values for a field you desire (genres, albums, artist etc). You can switch between what is shown by right clicking on their headers and choosing 'Columns/<the one you want>'. There should be some presets to choose from also so you should have something satisfactory quickly enough.

Also guess you want to add your music folder to 'File/Preferences/Media library' if you haven't done that already.
Title: Re: Filter multiple genres - plugin?
Post by: _johnny7 on 2017-03-31 20:23:19
Thank you for your elaborated replies! Just another quick question - as I said I haven't even started to assign the tags yet - the genre tag field is able to include multiple values isn't it? And for now, I can't see what the 'Unknown' should do in the code you provided, but I'm sure as I'm going to try it out, things well get clearer.
Title: Re: Filter multiple genres - plugin?
Post by: jazzthieve on 2017-03-31 20:31:05
The "unknown" in the code Daeron provided simply means what will be shown if the genre tag isn't present. If you like it to show "blabla" then make it into "blabla".
Title: Re: Filter multiple genres - plugin?
Post by: PeteG on 2017-04-01 01:36:40
- the genre tag field is able to include multiple values isn't it?
Yes. If you want to check, see File → Preferences → Advanced → Display → Properties dialog → Multivalue fields
In a fresh foobar2000 installation it should look like this:
Code: [Select]
ARTIST;ALBUM ARTIST;PRODUCER;COMPOSER;PERFORMER;GENRE

On Facets' handling of empty fields see Missing fields (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Facets_(foo_facets)#Missing_fields). Which are part of the illustrated wiki for Facets. Worth reading.