Fork me on GitHub

Make your own radio on a laptop or desktop: Mac OS X | Linux | Windows

This guide explains how to use our software on a laptop or desktop machine.

It’s intended for developers to use to get started, so we’re going to install a minimal radio application.

Mac OS X: What you’ll need

For your radio you’ll need the following:

  • a laptop or desktop:
    • with a built in speakers, or headphones or a speaker attached
    • Mac OS X (the software will work with other operating systems)
    • homebrew installed
  • an internet connection

Mac OS X: Steps

Install MPD

brew update
brew install mpd

Install zeromq

brew install zeromq

Install golang

brew install golang

Install node.js

brew install node.js
npm install -g npm@latest

Download this example code and install its dependencies

git clone https://github.com/radiodan/radiodan-skeleton.git
cd radiodan-skeleton
npm install

Run the server

npm start

You should hear a cheer as it starts up.

Go to http://localhost:5000 in a browser

Control the sound from the web page.

Screenshot of the  skeleton app in a browser

Mac OS X: Troubleshooting

brew error

error: The following untracked working tree files would be overwritten by merge:

fix:

cd /usr/local
git fetch origin
git reset --hard origin/master

No sound

Ensure the sound’s turned up on your laptop / machine (obvious, but mine wasn’t).

zeromq library mismatch problem

If you get an error like

16:03:01 broker.1 |  dyld: Library not loaded: /usr/local/lib/libzmq.4.dylib
16:03:01 broker.1 |  Referenced from: /Users/libbym/radiodan-skeleton/node_modules/.bin/radiodan…
16:03:01 broker.1 |  Reason: image not found

First kill the server with Control-c.

Then recompile the broker, like this:

mkdir work
export GOPATH=$PWD/work
export PATH=$PATH:$GOPATH/bin
mkdir -p $GOPATH/src/github.com/radiodan
cd $GOPATH/src/github.com/radiodan
git clone https://github.com/radiodan/broker
cd broker
go get github.com/tools/godep
$GOPATH/bin/godep restore
go install

cd radiodan-skeleton
cp $GOPATH/bin/broker node_modules/.bin/radiodan-broker

Then start the server again

npm start

Next steps

You might like to try programming your own radio.


Linux: What you’ll need

For your radio you’ll need the following:

  • a laptop or desktop:
    • with a built in speakers, or headphones or a speaker attached
    • Debian-based system such as Ubuntu
  • an internet connection

Linux: Steps

Install git

sudo apt-get install git

Install MPD

sudo apt-get update
sudo apt-get install mpd

Install golang

sudo apt-get install -y golang

Install zeromq

sudo apt-get install -y --force-yes libzmq3 libzmq3-dev
sudo apt-get install zeromq

Install node.js

sudo apt-get install node.js
npm install -g npm@latest

Download this example code and install its dependencies

git clone https://github.com/radiodan/radiodan-skeleton.git
cd radiodan-skeleton
npm install

Run the server

npm start

You should hear a cheer as it starts up.

Go to http://localhost:5000 in a browser

Control the sound from the web page.

Screenshot of the  skeleton app in a browser

Linux: Troubleshooting

Next steps

You might like to try programming your own radio.