Page 1 of 1

Get suggestions for a next song with songmem!

Posted: November 16th, 2019, 12:40 pm
by codesoap
Often I don't listen to whole albums, but skip around my library. I found it annoying to always think about the next song to play and made an effort to automate this process by recording my listening patterns and generating suggestions.

The result of my efforts is a tool I call songmem. You can use it to record what songs you are listening to like this:

Code: Select all

while true
	song="$(mpc -f '%artist% - %title%' current --wait)"
	songmem --register "$song"
After you recorded your listening patterns for a while you can list your recently heard songs with songmem and get suggestions for a song with songmem --suggestions 'LORN - ACID RAIN'. This is, of course, way to annoying to type and use, so you should get the song's name you want suggestions for from songmem itself like this:

Code: Select all

songmem --suggestions "$(songmem | dmenu -l 16)" | dmenu -l 16

You could then use mpc to add the selected suggestion to your queue. Take a look at my scripts on GitHub for a more advanced example.

I hope you find the little tool useful.