Link to tracks in Org files
Go to file
2022-08-22 10:51:44 +08:00
org-music.el Autoload interactive functions 2022-08-22 10:51:44 +08:00 Add version and stage badge to Readme 2021-11-12 02:39:52 +08:00

Org Music

This adds a new link type, [[music:artist:song]].

Link examples

[[music:De/Vision:Deep Blue]] Refers to the song Deep Blue by De/Vision. Exporting gives Deep Blue by De/Vision, and following the link in Emacs plays the song from the beginning.

[[music:De/Vision:Deep Blue::104s]] simply refers to the same song 104 seconds in. This exports as 104 seconds into Deep Blue by De/Vision.

When exporting to HTML or LaTeX there is a variant of the [[music:]] link which may be of interest — [[Music:]]. This functions identically, however is a bit fancier when exported.

When exporting to HTML, [[music:De/Vision:Deep Blue]] produces:

<div class='music-track'>
  <a target="_blank" href="">
    <img src=''></a>
  <span><a target="_blank" title="De/vision Deep Blue"
      <span style="font-style: italic">Deep Blue</span>
      <br><small>Noob</small><br>by De/Vision</a></span>

Similarly, exporting to LaTeX produces:

  & \vspace{-0.12\columnwidth}\href{}%
    {\emph{Deep Blue}\newline {\footnotesize Noob}\newline by De/Vision}


Beets integration

When org-music-track-search-method is set to beets, music tracks will be located by querying beets' database (org-music-beets-db).

A number of other features are only work with Beets, such as M-x org-music-search-and-play.

Youtube integration

When a youtube API key is provided (see org-music-youtube-api-key), the track metadata is used to fetch a youtube URL to the track, which is used when exporting.

Music player

Currently only music players that work with MPRIS are supported. When org-music-mpris-player is nil, the MPRIS player is guessed by looking for registered dbus services which use the org.mpris.MediaPlayer2 interface.