Skip to content

Latest commit

 

History

History
84 lines (72 loc) · 4.27 KB

readme.org

File metadata and controls

84 lines (72 loc) · 4.27 KB

Org-Music

Usage

  1. Install Org-Music by following instructions below
  2. Open sample.org in Emacs
  3. M-x org-music-mode
  4. Press speed-key o on a song to play it

Demo

./sample/play-org-music-demo.gif

Setup

Straight.el

  • Add below snippet to your Emacs init.el
    ;; Org-Music Mode
    (use-package org-music
      :straight (org-music :type git :host github :repo "debanjum/org-music")
      :after (org emms)
      :init (progn
              (setq
               org-music-file "~/Notes/Music.org"
               org-music-media-directory "~/Music/OrgMusic/"
               org-music-operating-system "linux")
              (add-hook
               'org-mode-hook
               (lambda()
                 (if (equal buffer-file-name (expand-file-name org-music-file))
                     (org-music-mode))))))
        

Basic

  1. Install below dependencies
  2. Copy org-music.el to your Emacs load-path
  3. Add below minimal snippet to your Emacs init.el
    ;; Org-Music Mode
    (use-package org-music
      :load-path "lisp/org-music.el" ; relative path to org-music.el on your local device
      :init (progn
              (setq
               org-music-file "~/Notes/Music.org"
               org-music-media-directory "~/Music/OrgMusic/"
               org-music-operating-system "linux")))
        
  4. M-x load-file RET init.el

Dependencies

  1. youtube-dl: For downloading songs from youtube.
  2. emms: For playing songs on emacs

Why was this tool created?

I was sick of the ad-hoc ephemerality of my music collection. I loved the simple sturdiness of plain-text, emacs and org-mode. Who wants to lose songs, playlists and discover the latest in clunky search interfaces when you can flow in plaintext with emacs and org-mode forever?

Where are all the features?

  • It’s plain text so you get versioning, syncing, full-text search with your tool of choice out of the box
  • It’s an org-mode file so you get tags, semantic search, dynamic playlists
  • It’s Emacs so you get to play, interact and extend your library (and org-music) without ever leaving Emacs
  • Arrange your music collection the way you like it. Let your music library reflect the path dependent nature of it’s creation or convert it into a sanitary, homogenized artist/album/song library. You can choose to do whatever you want with it.
  • Don’t let you playlists be locked away on someone else’s cloud. Carry or sync your music collection everywhere. It’s a text file after all.

Where is the actual music?

The org file is just metadata about your media collection.

  1. Org-music maintains a local cache directory where recently played media files reside
  2. If the song is not available in the cache directory it downloads music from Youtube by default
  3. The user can also explicitly specify the data source and query to search and stream music. Currently Youtube (default), nextcloud and local storage are supported as data sources. It can be easily extended to work with other data sources.

When was this tool actually created?

It has been in non-continuous development for way longer than I’d care to admit (or remember). It’s been my primary music library since 2014 and primary music player since 2018.

It started of as a soft-linked ghost replica of my then music library. I’d click the file, that’d call a shell script, that’d search on Duckduckgo for a Youtube url of the clicked filename, that VLC would then stream from Youtube! The setup has become a bit more civilized since then.