Install ready-player for music

This commit is contained in:
Howard Abrams 2026-01-28 15:48:58 -08:00
parent 17712b7fb5
commit 6e3e074072

View file

@ -227,18 +227,40 @@ And my [[https://gitlab.com/howardabrams/emacs-ironsworn][new Ironsworn project]
#+end_src #+end_src
The project is interesting, and I should record a tutorial how to use it. The project is interesting, and I should record a tutorial how to use it.
* Playing Music * Playing Music
Why not? Lets see if the [[https://github.com/isamert/empv.el][empv]] project is sufficient. First install =mpv=, as in: After building a NAS out of a Raspberry Pi to hold my /ripped/ CD collection, lets control my playlists from Emacs.
#+begin_src sh A more /rich/ experience than the [[https://github.com/isamert/empv.el][empv]] project is [[https://github.com/xenodium/ready-player][ready-player]]. First install [[https://mpv.io/][mpv]]:
brew install mpv
#+end_src
What else?
#+begin_src emacs-lisp
(use-package empv
:straight (:host github :repo "isamert/empv.el")
:general (ha-leader
"a p" '(empv-map :wk "play music")))
#+end_src
#+BEGIN_SRC sh
brew install mpv
#+END_SRC
And then the configuration:
#+BEGIN_SRC emacs-lisp
(use-package ready-player
:straight (:type git :host github :repo "xenodium/ready-player")
:config
(when (eq system-type 'darwin)
(set-fontset-font t nil "SF Pro Display" nil 'append)
(ready-player-macos-use-sf-symbols))
(ready-player-mode +1)
(setq ready-player-my-media-collection-location "/Volumes/music"))
#+END_SRC
Since ready-player doesnt support [[https://github.com/xenodium/ready-player/issues/36][adjusting the volume]], I can, at least, set the /default volume/ low enough that my speaker adjustment affects it:
#+BEGIN_SRC conf :tangle ~/.config/mpv/mpv.conf
volume=20
#+END_SRC
Keep in mind, that if I can dig into the code to figure out the socket name, perhaps we could do something like:
#+BEGIN_SRC sh
echo '{ "command": ["set", "volume", <volume_value>] }' | socat - /tmp/mpvsocket
#+END_SRC
Another option for the volume is to use *vlc*, as it brings up an separate UI that would allow adjusting the volume.
* Technical Artifacts :noexport: * Technical Artifacts :noexport:
Let's =provide= a name so we can =require= this file: Let's =provide= a name so we can =require= this file: