Pirate radio - where are the scripts installed to?


So I’ve got my pirate radio working as a web radio and also as an airplay device. I can start and stop each service etc. I’d like to configure it so that I hold down the power button to switch between these two modes. I’ve found the projects on github and I think I understand the scripts but I can’t figure where they get installed onto the system. I’d be grateful if someone could tell me where to look! I want to edit phatbeatd! Thanks!


The vlc-radio project folder consists of phatbeatd and vlcd which both contain folders that are relative to root (/) on your Pi. So stuff in phat-beat/projects/vlc-radio/vlcd/etc/ is installed into /etc

You may possibly be able to just run the services alongside each other and audio played by each source would be mixed by Pulse Audio.

Alternatively to stop vlc you can sudo systemctl stop vlcd but this will break the socket connection between phatbeatd and vlcd so you’d have to tweak that and make it able to recover when vlc comes back up.


Unfortunately no mixing happens, I found quite a tidy solution…

I edited phatbeatd such that the on/off button toggles which service is running but when held down does it’s original power function.


   def perform_toggle_vlc(pin):
       if vlc.connect():
           os.system("sudo service vlcd stop")
           SPEED = 50
           BRIGHTNESS = 64
           SPREAD = 20
          for x in range(phatbeat.CHANNEL_PIXELS):
               h = (time.time() * SPEED + (x * SPREAD)) % 360 / 360.0
              r, g, b = [int(c*BRIGHTNESS) for c in colorsys.hsv_to_rgb(h, 1.0, 1.0)]
               phatbeat.set_pixel(x, r, g, b, channel=0)
               phatbeat.set_pixel(x, r, g, b, channel=1)
           os.system("sudo service vlcd start")

   def perform_shutdown(pin):