Pirate Audio Control


I have purchased a Pirate Audio 3W Stereo Amp to allow us to play steam train sound effects at our local Model Town. For many years, we’ve used an old boom box for this purpose, but it recently let us down. Since the Model Town now has around a dozen Raspberry Pis of various types running to deliver different functions, Pirate Audio seemed the way to go.

So having set it up using this Tutorial Pirate Audio, I copied a few tracks across and was able to play them using Mopidy and the Iris web client, However, what we want to do is much more basic than that; all we want is for the sound effects to start playing when the duty manager switches the player on in the morning and loop round until he/she switches it off.

I’ve been unable to see how to set up Mopidy to do that. Looking in the Iris Client with my browser, I can see that I can select ‘Play All’ and clicking ‘Repeat’ seems to provide the required looping functionality, but I’ve been unable to discover how to get this behaviour without first opening the Iris Client. Ideally, I’d like to simply start playback with a simple command which encapsulates the ‘Play All’ and ‘Repeat’ functionality in rc.local or similar.

There are a few Python modules which handle sound, maybe you could try one of those? A quick Google threw up this tutorial.


Thanks for the suggestion. However, I know how to play sound through Python; I restored the chimes to the Model Minster and provided organ music by writing an MP3 Player based on invoking mpg321 in Python. That will be my fallback if I cannot press Mopidy into service.

Having said that, I’d like to find a way to use Mopidy for this purpose. It already does 99% of what I need and I wouldn’t have to get the screen display and buttons working because they already do. I’d just like to know if Mopidy or any of the 68 pages of extensions will allow me to do what I want.

I must admit that I suspect that Mopidy will probably not do exactly what I want. After all it was originally written to provide remote control through a browser or other suitable application.

That gives me an idea. Do any of the 68 pages of extensions provide a program that could be run on the same Pi as the Pirate Audio, to allow the necessary functionality? That way, I’d be able launch the App at boot time instead of some exotic incantation of Mopidy itself.

1 Like

For anyone else trying to do the same thing, this Pipod-nano does a very good job.

Pretty much out of the box, I was able to get the Pirate Audio to play the sound effects on boot up and loop round after the Playlist has completed.