From 8f1e7385b71ee3f8e6140a22fbd74d6361f414d5 Mon Sep 17 00:00:00 2001 From: Simon Persson Date: Sun, 3 May 2020 17:30:31 +0200 Subject: [PATCH] Add tags relevant to classical music. This commit adds some tags that are (mostly) interesting for listeners of classical music. Ensemble -------- This is an ensemble that is playing the music, such as Wiener Philharmoniker. The tag can be used to distinguish the ensemble from the conductor, composer, soloist, and ensemble, that are generally all in the "ARTIST" tag. Movement ------- The movement number and movement (name) of this track, i.e. "II" and "Allegro". ComposerSort ------------ Allows us to look for Beethoven's 9th under B, for Beethoven, not L for Ludwig. Location -------- This is the location of the recording, e.g. "Wiener Musikverein". --- NEWS | 2 ++ doc/protocol.rst | 5 +++++ src/lib/xiph/XiphTags.cxx | 2 ++ src/tag/Names.c | 5 +++++ src/tag/Type.h | 5 +++++ 5 files changed, 19 insertions(+) diff --git a/NEWS b/NEWS index 1f2210a5c..5b5a9c6d0 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ ver 0.23 (not yet released) * output - pipewire: new plugin - snapcast: new plugin +* tags + - new tags "ComposerSort", "Ensemble", "Movement", "MovementNumber", and "Location" ver 0.22.7 (not yet released) * protocol diff --git a/doc/protocol.rst b/doc/protocol.rst index fc27e3851..dd50ad8b0 100644 --- a/doc/protocol.rst +++ b/doc/protocol.rst @@ -286,10 +286,15 @@ The following tags are supported by :program:`MPD`: * **date**: the song's release date. This is usually a 4-digit year. * **originaldate**: the song's original release date. * **composer**: the artist who composed the song. +* **composersort**: same as composer, but for sorting. * **performer**: the artist who performed the song. * **conductor**: the conductor who conducted the song. * **work**: `"a work is a distinct intellectual or artistic creation, which can be expressed in the form of one or more audio recordings" `_ +* **ensemble**: the ensemble performing this song, e.g. "Wiener Philharmoniker". +* **movement**: name of the movement, e.g. "Andante con moto". +* **movementnumber**: movement number, e.g. "2" or "II". +* **location**: location of the recording, e.g. "Royal Albert Hall". * **grouping**: "used if the sound belongs to a larger category of sounds/music" (`from the IDv2.4.0 TIT1 description `_). diff --git a/src/lib/xiph/XiphTags.cxx b/src/lib/xiph/XiphTags.cxx index 4e8a4a922..53f0ddd28 100644 --- a/src/lib/xiph/XiphTags.cxx +++ b/src/lib/xiph/XiphTags.cxx @@ -28,5 +28,7 @@ const struct tag_table xiph_tags[] = { { "tracknumber", TAG_TRACK }, { "discnumber", TAG_DISC }, { "description", TAG_COMMENT }, + { "movementname", TAG_MOVEMENT }, + { "movement", TAG_MOVEMENTNUMBER }, { nullptr, TAG_NUM_OF_ITEM_TYPES } }; diff --git a/src/tag/Names.c b/src/tag/Names.c index 8856ee601..b16a42665 100644 --- a/src/tag/Names.c +++ b/src/tag/Names.c @@ -33,9 +33,14 @@ const char *const tag_item_names[TAG_NUM_OF_ITEM_TYPES] = { [TAG_DATE] = "Date", [TAG_ORIGINAL_DATE] = "OriginalDate", [TAG_COMPOSER] = "Composer", + [TAG_COMPOSERSORT] = "ComposerSort", [TAG_PERFORMER] = "Performer", [TAG_CONDUCTOR] = "Conductor", [TAG_WORK] = "Work", + [TAG_MOVEMENT] = "Movement", + [TAG_MOVEMENTNUMBER] = "MovementNumber", + [TAG_ENSEMBLE] = "Ensemble", + [TAG_LOCATION] = "Location", [TAG_GROUPING] = "Grouping", [TAG_COMMENT] = "Comment", [TAG_DISC] = "Disc", diff --git a/src/tag/Type.h b/src/tag/Type.h index 193402be2..46778d8b0 100644 --- a/src/tag/Type.h +++ b/src/tag/Type.h @@ -48,9 +48,14 @@ enum TagType TAG_DATE, TAG_ORIGINAL_DATE, TAG_COMPOSER, + TAG_COMPOSERSORT, TAG_PERFORMER, TAG_CONDUCTOR, TAG_WORK, + TAG_MOVEMENT, + TAG_MOVEMENTNUMBER, + TAG_ENSEMBLE, + TAG_LOCATION, TAG_GROUPING, TAG_COMMENT, TAG_DISC,