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:
| Operator | Meaning |
|---|---|
: | 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..high | a 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
| Syntax | Meaning |
|---|---|
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
| Field | What it matches |
|---|---|
titre | the track title |
artiste | the track or album artist |
interprete | the track artist |
artiste_album | the album artist |
album | the album title |
genre | the genre |
compositeur | the composer |
chef | the conductor |
ensemble or orchestre | the ensemble or orchestra |
oeuvre | the work (classical music) |
label | the label |
format | the file format: flac, dsf, mp3… |
version | the version or edition: remaster, deluxe… |
commentaire | the tag comment |
source | the source: local, qobuz, tidal… (= or !=) |
dossier | the file path: = starts with, : contains — dossier=/music/jazz |
Number
| Field | Unit, example |
|---|---|
annee | track year: annee:1959, annee:1955..1965 |
annee_originale | original release year |
frequence | sample rate in Hz: frequence>=96000 |
bits | bit depth: bits:24 |
duree | duration: 90 or 90s, 5min, 1h, 2:30 (minutes:seconds) — duree>10min |
pistes | number of tracks on the album |
numero | track number |
disque | disc number |
bpm | tempo |
note | track rating (1 to 5) |
note_album | album rating |
ecoutes | play count: ecoutes>=5 |
Date
| Field | What it matches |
|---|---|
ajout (or ajoute) | date added to the library |
derniere_ecoute | date last played |
Everything else
| Syntax | What it matches |
|---|---|
favori | favorite tracks |
favori:album, favori:artiste | tracks from a favorite album or artist |
jamais_ecoute | tracks never played |
etiquette:7 | tracks 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_analyse | the verdict of the fake Hi-Res detection |
ia:oui / ia:non | tracks marked as AI-generated |
pochette:vide | tracks 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
| Syntax | Meaning |
|---|---|
derniere_ecoute:30j | within the last 30 days (30d, 30jours also work) |
derniere_ecoute:jamais | never played |
derniere_ecoute<2025-01-01 | before 1 January 2025 |
ajout>2026-10-01 | added after 1 October 2026 |
ajout:2026-01-01..2026-06-30 | added in the first half of 2026 |
5. Examples
| Query | What it keeps |
|---|---|
genre:jazz annee:1955..1965 | jazz from 1955 to 1965 |
credit(artiste: "Bill Evans", instrument: piano) | tracks where Bill Evans plays piano |
favori jamais_ecoute | favorites never played |
(compositeur:Bach ou compositeur:Haendel) duree>10min | long pieces by Bach or Handel |
ecoutes>=5 derniere_ecoute<2025-01-01 | much-played tracks, forgotten since 2025 |
bits:24 frequence>=88200 non hires:douteux | the genuine Hi-Res in the library |
genre:classical non credit(role: producer) | classical with no credited producer |
ajout:30j source:local | files 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.