Tune by Mozaiklabs

The smart playlist query language

The advanced query describes, in a single line of text, the tracks a smart playlist keeps. It produces the same rules as the visual editor: anything the editor can do can be written as a query, and the query can also combine groups with parentheses and negation.

Where to find it: Playlists › New smart playlist (or Edit) › Advanced query block. Write the query, then Try: Tune shows how many tracks it keeps. Use in the editor copies the query back as visual rules when possible. The block's Help button summarises this page inside Tune.

The field names and keywords are those of the query language itself (they come from French: annee is the year, duree the duration, ou means “or”). Type them as written here, whatever the language of your interface.

1. The shape of a criterion

field operator value

Examples: genre:jazz, annee>=1960, duree>10min, artiste:"Bill Evans".

The operators:

OperatorMeaning
:on text, contains; on a number, equals; on a date, see section 4
=equals
!=not equal
> >= < <=greater, greater or equal, less, less or equal
low..higha range, bounds included: annee:1955..1965

A value containing spaces goes in quotes: artiste:"Bill Evans". Case and accents are ignored: compositeur:dvorak finds “Dvořák”.

field:vide (or aucun) keeps the tracks where that field is missing: label:vide, pochette:vide.

2. Combining criteria

SyntaxMeaning
a b or a et b (also and, &)both at once
a ou b (also or, |)one or the other
non a (also not, !, or -a)everything except a
( … )a group

AND binds tighter than OR: a b ou c reads (a et b) ou c. When in doubt, use parentheses.

non a is the exact complement of a: a track with no value for the field (for example no label) passes non label:"Blue Note".

3. Fields

Text

FieldWhat it matches
titrethe track title
artistethe track or album artist
interpretethe track artist
artiste_albumthe album artist
albumthe album title
genrethe genre
compositeurthe composer
chefthe conductor
ensemble or orchestrethe ensemble or orchestra
oeuvrethe work (classical music)
labelthe label
formatthe file format: flac, dsf, mp3…
versionthe version or edition: remaster, deluxe…
commentairethe tag comment
sourcethe source: local, qobuz, tidal… (= or !=)
dossierthe file path: = starts with, : contains — dossier=/music/jazz

Number

FieldUnit, example
anneetrack year: annee:1959, annee:1955..1965
annee_originaleoriginal release year
frequencesample rate in Hz: frequence>=96000
bitsbit depth: bits:24
dureeduration: 90 or 90s, 5min, 1h, 2:30 (minutes:seconds) — duree>10min
pistesnumber of tracks on the album
numerotrack number
disquedisc number
bpmtempo
notetrack rating (1 to 5)
note_albumalbum rating
ecoutesplay count: ecoutes>=5

Date

FieldWhat it matches
ajout (or ajoute)date added to the library
derniere_ecoutedate last played

Everything else

SyntaxWhat it matches
favorifavorite tracks
favori:album, favori:artistetracks from a favorite album or artist
jamais_ecoutetracks never played
etiquette:7tracks carrying tag no. 7 (its number)
collection:…, playlist:…tracks in a collection or playlist, given by its number: collection:12 (!= to exclude them)
hires:verifie / conforme / douteux / non_analysethe verdict of the fake Hi-Res detection
ia:oui / ia:nontracks marked as AI-generated
pochette:videtracks without cover art

Credits

credit(artiste: "Bill Evans", instrument: piano)
credit(role: producer)

The keys: artiste, role (producer, engineer, mixer…), instrument. Several keys combine: “Bill Evans on piano”.

4. Dates

SyntaxMeaning
derniere_ecoute:30jwithin the last 30 days (30d, 30jours also work)
derniere_ecoute:jamaisnever played
derniere_ecoute<2025-01-01before 1 January 2025
ajout>2026-10-01added after 1 October 2026
ajout:2026-01-01..2026-06-30added in the first half of 2026

5. Examples

QueryWhat it keeps
genre:jazz annee:1955..1965jazz from 1955 to 1965
credit(artiste: "Bill Evans", instrument: piano)tracks where Bill Evans plays piano
favori jamais_ecoutefavorites never played
(compositeur:Bach ou compositeur:Haendel) duree>10minlong pieces by Bach or Handel
ecoutes>=5 derniere_ecoute<2025-01-01much-played tracks, forgotten since 2025
bits:24 frequence>=88200 non hires:douteuxthe genuine Hi-Res in the library
genre:classical non credit(role: producer)classical with no credited producer
ajout:30j source:localfiles added in the last 30 days

6. When the query is rejected

  • “Invalid query: … (character N)”: Tune says what is wrong and where. The most common causes: an unclosed quote or parenthesis, an unknown field, an operator that does not suit the field (genre>3).
  • “Criteria not applied: …”: the query is read, but some criteria cannot apply here; they are listed.
  • “This query has several levels…”: a query with parentheses or negation can be tried here, but cannot be saved yet: the visual editor, which has a single level, cannot load it as rules. Only the editor's Save button saves, and it saves the editor's rules.

See also: Library management.