Skip to content

M3UG Examples

A few rules can turn a whole collection into a playlist. Copy a definition into a .m3ug file inside your music collection, then run genplis ~/Music to generate its .m3u. See the M3UG reference for the language and Tags for rating-scale caveats.

Download all examples (.zip)

Some definitions use @INCLUDE and need a companion file. For example, Favorite synth.m3ug includes Favorite fragments.m3ug. The ZIP preserves every filename, so extracting all its files together keeps these includes working. Files marked @NO-PLAYLIST are shared fragments, not standalone playlists.

1980s

Download 1980s.m3ug

# songs made in the 1980s, the best decade
original_year >= 1980
original_year < 1990

# only a taste of each artist
@LIMIT 2 PER artist
@SORT title

Best of the Best

Download Best of the Best.m3ug

# 5-star songs
# *rating normalizes to 0-5; raw rating scales vary by player.
*rating >= 5
@LIMIT 50
# different ordering on each generation, get surprised!
@SORT random

Favorite fragments

Download Favorite fragments.m3ug

# Include-only fragment of shared synthwave rules.
@NO-PLAYLIST

# Use [ ... | ... ] to match multiple tags or values
[artist | albumartist] = ["DANCE WITH THE DEAD" | Perturbator]
@OR [genre | style] ~ [Synthwave | Retrowave]

Favorite synth

Download Favorite synth.m3ug

# Favorites built from a shared include, with a reproducible shuffle.
@INCLUDE "Favorite fragments.m3ug"
*rating >= 3

# Change 7 to a different number to get a different ordering
@SORT random 7
# no duplicate songs
@DEDUPE artist,title
# max playlist duration
@MAX-DURATION 90m

Long songs

Download Long songs.m3ug

# long songs
duration >= 5m
# longest first
@SORT duration desc

Metal (great)

Download Metal (great).m3ug

# great metal songs (4-star or better)
genre ~ "Metal"
# *rating normalizes to 0-5; raw rating scales vary by player.
*rating >= 4

Playlist sampler

Download Playlist sampler.m3ug

# A mixed playlist: alternatives, tag/value sets and selection limits.
@SORT *rating desc, random 42
@DEDUPE title
@LIMIT 50
@LIMIT 2 PER artist
@MAX-DURATION 3h

[genre | style] = [Metal | Rock | Synthwave]
@OR *rating >= 4