Quantcast
Channel: Support - Pimoroni Buccaneers
Viewing all articles
Browse latest Browse all 6932

Use of Python-MPD with Audio Amp Shim and RaspPi Zero

$
0
0

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:

  1. from mpd import MPDClient
  2. client=MPDClient()
  3. client.connect (“localhost”,6600)
  4. print (client.status())
  5. 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

Read full topic


Viewing all articles
Browse latest Browse all 6932

Trending Articles