bowlofred
Posts: 4
Joined: Wed Mar 15, 2017 7:37 am

Program controllable audio player?

Wed Oct 11, 2017 12:53 am

Is there an audio player (preferably that can manage smart playlists) that is easily controllable from another program? Rather than a web or mobile interface, I want to be able to fire off a playlist from a sensor. I can play a single audio file pretty easily, but I don't want to write my own music manager.

User avatar
OutoftheBOTS
Posts: 340
Joined: Tue Aug 01, 2017 10:06 am

Re: Program controllable audio player?

Wed Oct 11, 2017 4:52 am

The standard PyGame library will play music files from your python script

bowlofred
Posts: 4
Joined: Wed Mar 15, 2017 7:37 am

Re: Program controllable audio player?

Wed Oct 11, 2017 4:19 pm

Yep. I can play individual music files easily enough. But almost any audio player already has a lot of features for managing the music repostitory, handling playlists, different ways of performing playback (shuffle, repeat, etc.) I don't want to write all that. I'm hoping there's one out there already that would let me just fire off a command like begin_play_smartplaylist("cooking time").

It looks like Kodi has some options to send commands via curl, but I haven't figured out how to make it work well for me yet. Perhaps there is another player with a simpler interface? Not sure.

fredoll
Posts: 186
Joined: Thu Jan 10, 2013 10:30 am

Re: Program controllable audio player?

Wed Oct 11, 2017 4:59 pm

mpd is your best bet

ghans
Posts: 7362
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Program controllable audio player?

Wed Oct 11, 2017 7:49 pm

MPD or CMUS are what you want.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

bowlofred
Posts: 4
Joined: Wed Mar 15, 2017 7:37 am

Re: Program controllable audio player?

Thu Oct 12, 2017 5:24 am

Wow. I've never heard of either of these. They both seem pretty extensive. I didn't grok the interface to drive either one yet in looking over the documentation, but I'm hopeful I'll be able to figure one of them out.

If anyone has some sample shell/python code to start/stop it, that would be great. Otherwise I'll try to figure it out.

Thanks!

ghans
Posts: 7362
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Program controllable audio player?

Thu Oct 12, 2017 7:13 am

MPD has mpc , cmus has cmus-remote. Trivial stuff.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
Douglas6
Posts: 4048
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Program controllable audio player?

Thu Oct 12, 2017 3:51 pm

MPD has a TCP server as well, making it easy to control from another local process, or remote machine. I was controlling it for awhile with my watch.

Return to “General discussion”

Who is online

Users browsing this forum: Bing [Bot], max_carpenter, mfa298, Raspberry Paul, stubright and 39 guests