by PeteB » 27 Apr 2016, 04:11
Hello, and welcome to the forum!
You could look at some of the code used to display artist and song title on a 2x16 character display. If I understand it correctly, they use mpc commands to read what is currently playing. The current track title is compared to the previous, saved, track title, and when it changes, the display string is updated.
You could use that method to detect when the next song starts.
The mpc command is executed each time in a loop, and the output is parsed to detect if a track is being played, the name of the track, and the name of the artist. If the track name is different from the last pass, the song changed.
P.