taglist: add a tag for midi base note numbers
authorStefan Sauer <ensonic@users.sf.net>
Mon, 30 Dec 2013 13:22:37 +0000 (14:22 +0100)
committerStefan Sauer <ensonic@users.sf.net>
Mon, 30 Dec 2013 13:22:37 +0000 (14:22 +0100)
Audio files containing sampled instruments can have metadata describing the note
that was played on the instrument.

gst/gsttaglist.c
gst/gsttaglist.h

index bab49a5..f8f8f04 100644 (file)
@@ -395,6 +395,9 @@ _priv_gst_tag_initialize (void)
       _("interpreted-by"),
       _("Information about the people behind a remix and similar "
           "interpretations"), gst_tag_merge_strings_with_comma);
+  gst_tag_register_static (GST_TAG_MIDI_BASE_NOTE, GST_TAG_FLAG_META,
+      G_TYPE_UINT,
+      _("midi-base-note"), _("Midi note number of the audio track."), NULL);
 }
 
 /**
index b5e683e..138be8d 100644 (file)
@@ -1060,6 +1060,16 @@ gst_tag_list_copy (const GstTagList * taglist)
  * Since: 1.2
  */
 #define GST_TAG_INTERPRETED_BY                    "interpreted-by"
+/**
+ * GST_TAG_MIDI_BASE_NOTE:
+ *
+ * <ulink url="http://en.wikipedia.org/wiki/Note#Note_designation_in_accordance_with_octave_name">Midi note number</ulink>
+ * of the audio track. This is useful for sample instruments and in particular
+ * for multi-samples.
+ *
+ * Since: 1.2
+ */
+#define GST_TAG_MIDI_BASE_NOTE                    "midi-base-note"
 
 G_END_DECLS