Hi,
I am very new to Python and Raspberry Pi. I want to write a very simple code that plays a sound effect on my Rasp Pi Zero fitted with a audio amp shim. I have downloaded Python-MPD. I have a sound effect file in /home/Pi/Music/XX.mp3. It is very unclear how I add this to a playlist and then play the file. I have written the following code:
- from mpd import MPDClient
- client=MPDClient()
- client.connect (“localhost”,6600)
- print (client.status())
- print (client.mpd_version)
This gives me details of the status and an MPD version number of 0.19.0 hence would suggest that MPD is set up correctly. HOWEVER even reading the MPD documentation I have no idea how I should add the sound effect mentioned to a play list and play the sound. This would seem to be about the simplest use of MPD possible and it is not clear how to do this.
Please help.
1 post - 1 participant