QuodLibet > Les tags

GENERALITES

<~tag> un tag propre à QuodLibet

<tag> un tag propre au format MP3

LES TAGS

~basename nom du fichier

~dirname chemin du fichier

~filename chemin/du/fichier/nom_du_fichier

~format format (ex “MP3”)

~codec codec (ex “AAC LC”)

~encoding nom de l'encodeur, version, et détails (ex “LAME 3.97.0, VBR”)

~length durée du morceau au format H:MM:SS

~mountpoint point de montage du dossier parent

~performers liste des musiciens.

~people liste de tous les gens impliqués dans le morceau.

~rating chaine représentant la note attribuée (ex: ★★★☆).

~uri adresse URL

~year The release year, derived from the date tag

~originalyear The original year, derived from the originaldate tag

~playlists Comma-separated playlist names in which the song is included

~filesize Human formatted size (ex 4.5 MB)

INTERPRETE, ARTISTE

~people tag combines the following tags to one: albumartist, artist, author, composer, ~performers, originalartist, lyricist, arranger, conductor in this exact order.

~people:roles includes roles e.g. "The Parley of Instruments (Orchestra), David Thomas (Bass)". The roles are either derived from the source tag name (composer=Joseph HaydnJoseph Haydn (Composition)) or from the performer role (performer:composition=Joseph HaydnJoseph Haydn (Composition)). For the latter see the ~performers tag.

~people:real excludes Various Artists, commonly used as a placeholder for album artists on compilations, etc.

ALBUM

<album> et <albumartist> doivent avoir le même nom pour faire partie du même album.

Si un double-album est afiché en deux albums différents : Make sure the album tags (and albumsort if present) (remove ‘CD1/2’ etc.) and albumartist tags are the same.

Si deux albums ont le même nom and are merged :

Ajouter un tag albumartist for at least one of them.

<~discs> nombre de disques

<~tracks> nombre de morceaux dans l'album

<~length> durée de l'album au format H:MM:SS

<~long-length> durée de l'album au format “H heures, M minutes, S secondes”

CHANSON

~#added: The date the song was added to the library

~#bitrate: The bitrate of the song, in kilo bits per second

~#disc: The disc number of the song (the first half of the discnumber tag)

~#filesize: The size in bytes of this song

~#lastplayed: The time this song was last played through

~#laststarted: The time this song was last started

~#length: The length of the song, in seconds

~#mtime: The time this file was last modified

~#playcount: The total number of times you’ve played the song through

~#rating: The rating of the song, as a number between 0 and 1.

~#skipcount: The total number of times you’ve skipped through the song

~#track: The track number of the song (the first half of the tracknumber tag)

~#tracks: The total number of tracks in the album

~#year: The release year, derived from the date tag

~#originalyear: The original year, derived from the originaldate tag

LES CONDITIONS

<TAG|OUI> ou <TAG|OUI|NON>

si le tag TAG contient quelque chose, alors OUI, sinon NON.

exemple :

<~people|<~people>|artiste inconnu>

Rechercher une chaine

<TAG=TEST|OUI|NON>

ou une plus complexe (note the needed escaping):

<artist=\|(Townshend, Who)|foo|bar>

Combinaison de recherche et negation

You can combine search terms using & (“and”) and | (“or”).

If you want to listen to Electronic music but no Ambient:

&(electro, !ambient)

Or you want to get all songs by Neutral Milk Hotel including the solo performances of Jeff Mangum:

|(mangum, neutral milk)

You can get all songs that don’t match the search term using !:

!electro

Lets say you want to listen to you whole library but are not in the mood for classical music or songs by The Smiths:

!|(classical, smiths)

While these searches are easy to type in, they depend on the visible columns and the active browser, also the last one might exclude some songs which happen to contain “smiths” in their album title - see below for how to perform more targeted searching.

Searching a Specific Tag

To search a specific tag, use a search like:

artist = delerium

album = bargainville

The search terms can’t use quotes ("), slashes (/), hashes (#), pipes (|), ampersands (&), or bangs (!); these characters have special meanings for advanced searches.

In QL 3.9 onwards, you can also use != to search for things not equal:

artist != delerium

genre != /.+ Jazz/

You can also search internal tags, e.g.

~format = Ogg Vorbis

~dirname=Greatest Hits - search for all songs in Greatest Hits folders.

It’s also possible to search in multiple tags at once:

artist, performer = "Boa"c

Exact Matching

If you want an exact match, use quotes:

artist = "a girl called eddy"

If you need to put a " inside the quotes, you can put a \ before it:

version = "12\" mix"

You can put a c after the last ” to make the search case-sensitive:

artist = "BoA"c

artist = "Boa"c

artist != "Boa"c

Combining Tag Searches

As with free-text searches, you can combine searches using & (“and”) and | (“or”); either grouping entire searches, or just the tag values. Although the examples below use simple keywords, you can also use exact matches or regular expressions:

artist = |(Townshend, Who)

&(artist = Lindsay Smith, album = Vat)

The first finds anything by The Who or guitarist Pete Townshend . The second gives the songs that match both, so you’ll find songs Lindsay Smith‘s Tales From The Fruitbat Vat, but not her other albums.

You can also pick out all the songs that don’t match the terms you give, using !:

genre = !Audiobook

is probably a good idea when playing your whole library on shuffle.

Note again that in QL 3.9 onwards you can use the alternative syntax of:

genre != Audiobook

More complex searches are of course possible. For example, to select all Disco and Jazz related (_containing_, technically) genres, but avoiding Acid Jazz, you could use:

genre = &(|(Disco, Jazz), !Acid Jazz)

Numeric Searches

Using #, you can search your library using numeric values.

Quod Libet keeps some internal numeric values including track, disc, rating, length etc. See Numeric Tags for full details.

You can also search any other tag as long as the values have a number format like 1234 or -42.42, for example year or bpm.

For comparisons you can then use typical binary operators like =, <, >, <=, >= and !=.

#(skipcount > 100) could find really unpopular songs, or

#(track > 50) to figure out who makes really insane albums, or

#(bpm > 160) to find really fast songs

You can also use chained comparisons:

#(10 <= track < 100) to find all two-digit tracks.

Times like added are stored in seconds, which is pretty cumbersome to search on. Instead, you can search with semi-English, like:

#(added < 1 day)

for very recently added tracks to find songs added in the last day (if you think that that’s backwards, mentally add ‘ago’ when you read it). Quod Libet knows about seconds, minutes, hours, days, months (30 days), and years (365 days), kB (Kilobyte), MB (Megabyte), GB (Gigabyte). You can also use ‘’HH:MM’’ notation, like:

#(2:00 < length < 3:00) for songs between two and three minutes long.

Of course, you can combine numeric with other kinds of searches.

&(genre = classical, #(lastplayed > 3 days))

&(artist = "Rush", #(year <= 1996))

Playlists

You can use the ~playlists internal tag to search by playlists. It is populated with a list of all the playlists that song appears in. This is surprisingly powerful if you’re a playlist user.

~playlists=chilled will return all songs included in any playlist with “chilled” in its name.

~playlists=|("Chilled", "Jazzy") for all songs in either (or both) of those playlists.

&(#(rating>=0.75), ~playlists="") will return all high-rated songs not in any playlist

Regular Expressions

Quod Libet also supports searching your library using ‘’regular expressions’‘, a common way of finding text for Unix applications. Regular expressions look like regular searches, except they use / instead of ”, and some punctuation has special meaning. There are many good tutorials on the web, and useful online regex testers (such as Regex Pal)

Some examples:

artist = !/\sRice/ (or in 3.9+: artist != /\sRice/)

or using the default tags

/^portis/

like with exact matches append a c to make the search case-sensitive

/Boa/c

Ignore Accents and Umlauts

Appending a d after searches makes it’s characters match variants with accents, umlauts etc.

Both /Sigur Ros/d and "Sigur Ros"d will match songs with the artist name "Sigur Rós".

Now you can search anything!

Pluggable query expressions

More recent versions of Quod Libet allow queries to include pluggable expressions. This uses the format @(plugin: body) where plugin is the ID of the query plugin (e.g. saved, python) - see quodlibet/ext/query/*.

From QL 3.10 onwards, the Python query plugin allows some use of external modules, notably time and random, as well as a few useful variables.

For example, here is a way of simulating an album Spotlight in an album browser:

@(python: Random((int(_ts / 60), a)).random() < 0.01)

Here _ts is a current timestamp, and a is the album data. So this generates a random number seeded on the current minute and the album key, so we randomly select 1% of our albums to look at.

Reusing queries

Complex queries can be split into simpler ones. Also, a query can be reused in other ones. This way it is easier to change and administer your searches.

In order to do so, the Include Saved Search query plugin (see above) must be activated. If you create a saved search named Unrated you can search for unrated songs from the Beatles like this:

&(@(saved: Unrated), Beatles)

For creating saved searches, use the “Edit saved searches...” item in the drop-down at the right of the query text box.

CALCULS

pour ajouter un fonction arithmétique à un tag : <tag:numeric_func>

exemple :

~#playcount:avg All internal numeric tags use a default function in case no function is given. For user defined numeric tags the average value is returned by default.

avg moyenne des valeurs (~#rating)

sum somme de toutes les valeurs (~#length, ~#playcount, ~#skipcount, ~#filesize) min plus petite valeur (~#year)

max Returns the largest value (~#added, ~#lastplayed, ~#laststarted, ~#mtime)

bav Returns the Bayesian average value (~#rating)

Being most appropriate for ratings, the parameter is adjusted globally under the preferences for ratings.

COMBINAISONS

Tied tags are expressions to produce a readable formatted output of more than one tag. Tag values are outputted left to right, with the default output separator as -. To combine multiple tags start the expression with ~ and separate each tag by ~ again. Examples:

Included Tags	                Tied Tag	               Result
artist, title	                ~artist~title	               Bob Marley - Jammin’
~#track, ~dirname	        ~~#track~~dirname	       5 - /home/user/music/Reggae
date, artist, album, ~filesize	~date~artist~album~~filesize   2000 - Bob Marley - Songs of Freedom (Various) - 6.9 MB

Usage in Quod Libet

Tied tags can be used in tag patterns and searches as if they were normal tags:

~artist~title=/AC.?DC/
<tracknumber|<tracknumber>. ><title~version>

RECHERCHE

~artist~title=/AC.?DC/

---------

https://quodlibet.readthedocs.io/en/latest/guide/index.html

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *