樂/music 書/book 畫/movie blog links

Turn mac mini into a CD player

2024-01-02

Why CD?

I love music, after reading this article from NYtimes, I just realize that it’s time for me to start a physical music collection.

After some search and thought, I think CD is the perfect media to do it:

Enjoy music without GUI

I want to enjoy music without any disruptions, including a GUI.

So I decide to turn my daily computer(a mac mini) into a CD player.

I have an external CD burner connected to the Mac Mini, to make it a CD player, I need to implement these features:

Autoplay Audio CD

Seems like it’s a once built-in feature for Music app, but now for some reason it’s gone, although the feature still has a support page:

https://support.apple.com/lv-lv/guide/music/mus2935/1.4/mac/14.0#mus56cc61e

You can now implement this feature with:

Screenshot 2024-01-02 at 22 07 42

The basic idea is to config macOS to launch a Automator App when a audio CD inserted which launch mpv to play CD.

control playback by keyboard

I have a HHKB keyboard which don’t come with any media playback key, so I’ll need to create some global keybinds.

First, I tried the built-in solution like: Shortcuts, looks like it’s not very stable and the shortcuts don’t work every time.

Then I find karabiner-elements which works very well and even have built-in config to map function keys as media playback keys:

The only configuration I need is to make the eject function work:

The trick part here is to first stop mpv before calling diskutil to eject CD.

You can find all the scripts here:

https://github.com/wangw469/wangw469.github.io/tree/master/blog/CD-player

That’s it, enjoy your CDs now!

https://famichiki.jp/@xiaopi/111668021062749011