Hi everyone,
I would like to introduce you to a project based on Pimoroni Pirate Radio - a cool DIY music player project based on RPi Zero W and PhatBeat DAC that Santa brought this year As it has just started a few days ago, I will be sharing with you the progress on the go.
The goals are to:
- find the best available software solution, which will:
[list=a]
[*] be compatible with PhatBeat DAC, together with itās VU meter and buttons - provide an up-to-date mobile-friendly Web UI which is easy to navigate, yet powerful. An Android app would be nice to have as well
- support playback of Internet radios & podcasts and Youtube
[/:m]
[] build a case that would make the Pirate Radio truly portable[/:m]
[] and last, but not least, make that thing something that all the expensive BT speakers owners would be jealous of [/*:m][/list:o]
[size=200]OS & Software[/size]
By default, Pimoroni suggests to choose Raspbian OS and install PhatBeat DAC libraries together with VLC-based project on top of it for music player capabilities with Web UI. Itās a great start to see what PhatBeat DAC is capable of in terms of sound quality, volume, itās awesome VU meter and buttons. However, it is very poor when it comes to the Web UI and overall remote controlling features. Therefore, Iāve started a research on available music-oriented software or whole OSāes or for RPi that represent a modern approach and provide fully-featured Web UIs, possibly together with an Android app. Iāve finished with those:
- Raspbian OS + Mopidy
- Pi MusicBox OS (based on Raspbian OS) - not tested yet
- Volumio OS
- RuneAudio OS
- piCorePlayer OS - not tested yet
Here are my experiences with them:
[size=150]Raspbian OS + Mopidy[/size]
[spoiler]Itās one of the best combinations. Thanks to Raspbian OS we have a great support community, and Pimoroni officially supports this OS as well with their libraries! Therefore, simply speaking, we are getting all the good from default recommended setup (sound quality, volume, VU meter), and enhance it with great Mopidy software which based on MPD. Mopidy provides a plugin-rich platform that is quite flexible and extensible. There is a wide choice of available Web UIās as well. I personally like Iris the most, for itās modern design, usability and stability. Additionally, since itās based on MPD, there are a few Android applications that allow controlling it remotely. While most of them are quite ugly in design, one of them - Remotedy - is pretty and functional. Another point for Mopidy
However, there are a few bottlenecks I found while playing with this setup. First of all, itās the codecs. After you install Mopidy, you will find out that only a few music sources work out-of-the-box. Mopidy is coupled with GStreamer (however, Iāve seen plugins that replace GStreamer with MPlayer) , and by default only the āgoodā ones are installed. Therefore, the tutorials suggest installation of the ābadā and āuglyā as wellā¦ But that sometimes is still not enough. In my case, I couldnāt also play MP3s - turned out Iām missing the Fluendo MP3 extension. MP3 is not supported by default? On the other hand, even though there is quite a community around Mopidy, not all the basic flows are covered by plugins available. Example? The Youtube plugin is very poor, and there is no easy replacementā¦
At this point, Iāve been 80% satisfied, made an image of SD card, and decided to search furtherā¦
Loose thoughts and experiences:
- Internet radios are not supported out of the box. After installing Mopidy-TuneIn, you have access to all TuneIn stations, however they are quite hidden in the Web UI. I donāt know if itās specific to Iris UI, but there is no dedicated āInternet Radioā tab, you need to āBrowseā like you would play sth local, then āTuneInā, and then choose something from the categoriesā¦[/spoiler]
[size=150]Pi MusicBox OS[/size]
[spoiler]Not tested yetā¦[/spoiler]
[size=150]Volumio OS[/size]
[spoiler]Volumio is probably the best out-of-the-box solution for music-oriented RPi setup. It has the prettiest UI, many functions are already inbuilt, plugins are easily available, and is overall well-thought. It is lacking an Android app to control it (or rather there is an official app, but itāt not free, and has bad ratings), but the Web UI is very mobile-friendly and you could easily create yourself a shortcut to it. Itās also the only OS that took care of wireless headless setups (without monitor, keyboard and wired LAN). Setting it up with RPi Zero W was a breeze thanks to a hotspot that is automatically created on first boot - connect to it, go to volumio.local, and you are welcomed with a Configuration Wizard that will take you through the most important settings you need to let the fun begin. Sounds great so far Or ā¦ not.
Even though Volumio has an inbuilt support of many I2S DACās (together with PhatBeat), it is tightly coupled with ALSA audio sinkā¦ In result, of course, we are able to listen to music, but the maximum volume will be about 25% of what the hardware is capable ofā¦ I donāt know why PhatBeat DAC does not play well with ALSA, but apparently Pomoroni is aware and their libraries do replace it with PulseAudio sink. Any of advice found on the Internet, and anything I tried, failed to fix the problem with ALSA. Therefore, even though Volumio team struggles with replacing ancient ALSA with PulseAudio (bugs raised in 2015, not yet solved), and even though every trace of attempt to use Volumio with PulseAudio I found didnāt succeed,
I decided to try as the world runs fast, and what you tried 3 months ago, could have become possible today I will document that in separate topic,
but yes, itās possible, however Iām yet to solve lack of volume control in such setup (I have an idea though).
Thatās my current setup, and in the nearest future, I will be elaborating on it.
Loose thoughts and experiences:
- Volumio is a bit buggy when you play too much with it. Some switches do not work in settings, when you create a playlist it wonāt show up, you need to refresh page (there is a bug registered, not solved yet)ā¦[/spoiler]
[size=150]RuneAudio OS[/size]
[spoiler]RuneAudio OS is yet another project based on MPD, however itās even more specific than Volumio. I mean, it is probably one of the best out-of-the-box solutions, but only if what you have is officially supported. Otherwise, it is the least friendly solution I stumbled upon. First of all, RPi Zero is not supported even though it premiered in 2015ā¦ Second of all, the authors did not understand when someone asked for a possibility of wireless headless setupā¦ Cables in 2017? Come onā¦ Third of all, it is based on Arch Linux, it has dynamic filesystem analogic to Volumio, the default user is root, there is no apt-get, no sudo, so running PhatBeat library installer is a no-goā¦ Plus, any manual changes of the OS files are heavily discouraged by RuneAudio team, as you may clash with their deamon observing the filesystem and making changes to itā¦ Yes, PhatBeat DAC is kind of supported (Hifiberry DAC is supported which is same thing), but RuneAudio is tightly coupled to ALSA as well, so the sound is too quiet to accept.
Having learned all that, I backed out [/spoiler]
[size=150]piCorePlayer OS[/size]
[spoiler]Not tested yetā¦[/spoiler]
To sum up, the crucial requirement is for the software to work well with PulseAudio, as otherwise, the setup with PhatBeat DAC will never stand up to itās purpose. Then, it all comes down to playback capabilities and UI that feels like you paid for itā¦
My current choice, considering the best experience I got so far, is Volumio However, Iām still straightening a few things out with it so it could be a daily driver rather than something I have to play from command-line with oftenā¦
[size=200]Hardware[/size]
When it comes to hardware, there are a few things I would like to change. However, the very first thing I will focus on is creating a proper case for my project. I would like a full box rather than a faceplate with wobbly backlegs like it is now. Since I own a 3D printer, I will probably create soon a project that I will print out that will be an extension to acrylic sheets provided in the kit. Iām aware there is an existing project available, but itās just a speaker chamber leaving the boards uncoveredā¦ Additionally, Iām also thinking of another case that would also pack a place for powerbank, to make the whole thing truly portable
Thatās all for now, thanks for your interest I will be appending the above as soon as I progress on the project. Stay tuned!
Cheers!