Pirate Radio Pirate Audio

Hi there,

I am a great happy user of the original Pirate Radio, running on two setups. I purchased ( two years ago ) Pirate Audio but I never liked it. ( Because my programming skills are very low)
Actually I would like to combine the streaming of live radio internet streams of PirateRadio and using the PirateAudio amplifier and Display to show which stream I am listening to. But once again my skills in programming is the greatest obstruction.
I would like to get respond of other users, have you made any kind of tweaks to get such a functionality ?
These kind of ideas tend to come up during covid-19 lockdown.
TIA
Calle B / Helsinki

HI, it’s me again.
I really did poor investigation on the forum, so I think I might find some answers to my idea…
Sorry for that, I will try better next time

Calle B

I’m still running the original pHat Beat Pirate Radio. I’ve always wanted to add a display to show the song title / what’s being played etc. Just never could find my round 2it. ;)
The new Pirate Audio should make that easier. I have one but ended up using it with my itty bitty beat box. It’s a with speaker, you can’t buy the Speaker pHat anymore.
There are lots of tutorials out there from those that have done it. Showing Station Title etc.

I for one would be very interested in what you come up with, if you try it. So please post back if you get it working.

You might be interested to look into Volumio. That’s an audio player set-up for the Pi, and there is a plugin (under plugins > Miscellanea in the Volumio menu) for it for Pirate Audio to use the DAC and to enable the display and buttons.

I don’t have the pirate hardware to try it out, but I use Volumio itself for a couple of Pi’s (a zero and a 1B) with other DAC hats as internet radios, and they work fine.

Just download the image, burn it to a uSD card and away you go. Their quick start guide is here.

Thanks for your input. Sure I will try PirateRadioDisplay, althou it certainly will take some time…

BTW, I have two SpeakerPhats, one is running a prototype installation of PirateRadio with an external speaker ( the sound of the internal speaker is just goodfornothing ).
The other SpeakerPhat with orIginal speaker is actually free for sale. Would you be interested ? I have no idea of postage costs to your country ?

My Pirate Radio pHat Beat setup is in an old wooden subwoofer box. I mounted it where the subwoofer used to be. It’s VU meter is viewable through the speaker cloth. Then used the original speakers for the pHat Beat to get stereo out. I used mini arcade buttons for volume up down etc. I managed to get a sheet of the Picade Stickers and used those to label my buttons.
Thanks for the offer of the Speaker pHat. I’ll pass though, I have the Pirate Audio working and don’t miss the Vu meter all that much.

Do you know how to tweak vu-meter ? When I listen to my streams with decent volume my vu-meter led just light up, I would expect some 50% vu-bars ?

You can increase the sensitivity on the Phat Beat VU Meter by doing the following:
cd Pimoroni/pivumeter
nano src/devices/phat-beat.c
Change line 88 to:
int bar = (meter_level * (meter_level / 8) / 131071.0f) * (brightness * (NUM_PIXELS/2));
Recompile the library:
sudo make
sudo make install
sudo reboot

Now your VU meter is more sensitive! Tweak the values to your liking.

I think this is what I’m using at the moment. I set my volume to what I normally use. Then played with the value until I got a good response on the VU meter.

int bar = (meter_level * (meter_level / 8) / 1200000.0f) * (brightness * (NUM_PIXELS/2));

Thanks Darren, just a status report

I downloaded Volumio and got it uSD card. Boots up yes. I have keyboard and HDMI monitor connected. I would like to login but cannot find how to login : username and password needed. Or can I ssh ? Tried ethernet and HotSpot
I signed up following procedure on installation. sure my fault. Since these problems I did lots of reading on volumio forum. I am going to try phatbeat and PirateAudio with plugins when I get that far. I better start from scratch again…

@ calleblyh - Are you meaning the password for the wifi hotspot? That’s volumio2 (see section 3 of the quick start guide, page 5).

Volumio is run via its web interface, not via a direct connection (it’s designed to run headless). Boot it up, and it will generate a wifi hotspot named “Volumio”. Connect to that with a phone or something (password “volumio2”) and open the web interface up using a browser (IP address 192.168.211.1 or volumio.local).

Then in the system menu, enter your network details (ssid and password) and Volumio will log into your network (there’s a first run wizard that will walk you through it). You can then connect to it via your network in the normal way (at whatever IP address your router assigns to it) with a web browser and operate it from there.

All details are in the quick start guide linked before.

Plugins are in the “plugins” menu option on the side bar, and to add a web radio station, go to “Web Radio” and then beside the “My Web Radios” entry on the right hand menu you’ll see the 3-dots. Click there and “Add Web Radio” to enter your station name and URI. It should then be available via the “My Web Radios” entry itself.

Hi, hello guys, a status update:

I have spent hours and hours to get the grips and understanding of Volumio. I am slowly getting there, PirateAudio display came alive showing name of broadcaster correctly. However the default list of my streaming stations, which work in my setup of RPiZ+Phatbeat, does NOT work with RPiZ+PirateAudio. I wonder why ?This is my list of stations streams:
All Finnish Broadcasting regional stations ( YLE )
https://icecast.live.yle.fi/radio/YleVega/icecast.audio
https://icecast.live.yle.fi/radio/YleVegaOsterbotten/icecast.audio
https://icecast.live.yle.fi/radio/YleVegaAboland/icecast.audio

So the struggle continues. Have a nice day

Odd.

I’ve tested the first one and it works fine with my Volumio set-up, although of course I’m not using the Pirate Audio DAC (in my case I use a Justboom DAC).

Did you set each up individually in Volumio as a web radio in the way I mentioned before?

Thanx Darren, good to hear you confirmed stream is ok. Yes basically I followed your procedure. I will reflash another uSD and start from square one.

Okey, two steps forward onestep back. Anyhow finally got it running, but still A B X and Y buttons wont let me adjust volume. Problematic situation anyhow because I dont know why I got there.??? Story contnues…tomorrow.

I’m guessing a bit here as i don’t have the hardware to confirm, but you may need to configure the plugin to set that up.

Go to plugins on the left hand menu, then on the screen select the installed plugins tab (near the top of the main right hand part of the page) and press the settings button corresponding to the plugin.

There may or may not be stuff you need to configure there to set the buttons up?

I am sure it’s a configuration procedure which I didn’t get right. On the uSD card I found userconfig file containing
"### Start of parameters for pirateaudio plugin ###
dtparam=spi=on
gpio=25=op,dh
gpio=13=op,dl

End of parameters for pirateaudio plugin

Add your custom config.txt options to this file, which will be preserved during updates"

and so far I donot understand the meaning of op,dh and op,dl . So I will continue reading Volumio…

See the notes at the bottom of the phat’s page - here

  • The DAC can be configured by adding dtoverlay=hifiberry-dac to the /boot/config.txt file.
  • There is a DAC enable pin—BCM 25— that must be driven high to enable the DAC. You can do this by adding gpio=25=op,dh to the /boot/config.txt file.
  • The buttons are active low, and connected to pins BCM 5, 6, 16, and 24.
  • The display uses SPI, and you’ll need to enable SPI through the Raspberry Pi configuration menu.

So at least the first items are explained.

But for setting the button actions up, I’ll need to leave that to someone else to help you with I’m afraid. As I said, I don’t have the hardware to have knowledge or be able to guide you.

This isn’t going to be a volumio setting, it will be a DAC one I think (alongside possibly a plugin setting via the route mentioned before, if there is anything there).

Hello there,

So I am curious on your IttyBitty Box, what does it actually do ???

My setup PirateAudio+RPiZ on Volumio is playing and displaying my favourite streams. However I have severe problems setting up buttons A,B,X Y under Volumio GUI. Problems with Volume ±, select stream, Play/Pause
Therefore I ask you how did you setup gpio’s in your “itty bitty beatbox”. I assume your PirateAudio with speaker buttons A B X Y is similar to my PirateAudio 3W device. My Pirate Audio I got in january 2020 so I dont know yet is it old or new version ?
Furthermore I am slightly confused about correct syntax for gpio settings. I have seen:
gpio=xx=op,dh “meaning out high ?”
gpio=xx=op,dl “meaning out low ?”
gpio=xx=pu " meaning pull up ?" Is there a tutorial on syntax somewhere ?
Sorry to adress you with my headaches. Anyhow quite an intereseting and useful exersice .

Today snow in Helsinki, daylight 06:31 - 18:28 spring is on its way
Regards
Calle B

PS. Volumio forum is full of PirateAudio related commits, just a matter of finding the most appropriate one…

I can’t remember if I got the buttons working for volume up down? I’ll power it up latter on today and have a look see. I did set the X button up for shutdown though. Display doesn’t do anything, not yet anyway.

import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM)  
GPIO.setwarnings(False)
GPIO.setup(21, GPIO.IN, pull_up_down = GPIO.PUD_UP) 

def Shutdown(channel):
        os.system("sudo shutdown now -P")
        time.sleep(30)    

GPIO.add_event_detect(21, GPIO.FALLING, callback = Shutdown, bouncetime = 2000)


Build an Itty Bitty Beat Box - Pimoroni Yarr-niversity

Hi Guys, My webradio prototype, Volumio + PirateAudio +.RPiZeroW is finally running. Getting the grips of Volumio took a while. User interface using buttons A B X Y, once you get them organized in plugins is quite comfortable to use althou quite slow in response. Ofcourse there is the Web Ui which is easy and fast to use. But my intention is however to use the device as standalone. especially I like the dropdown menu to select webradio stream, once selected the display shows name of music playing. I couldn’t use the internal speaker of PirateAudio, instead a 2 inch 8ohm 5W speaker. Encouraged by the experience I am going to build a stereo webradio using PirateAudio3W. Attached a picture of my prototype webradio

1 Like