Example application using the radiodan gem
This application is alpha software. We're releasing it to start a discusion about what a radio prototyping platform could be.
Open an issue if you'd like help getting started.
$ foreman start
More detailed instructions coming soon.
- Listen to BBC radio stations
- Web app to control the radio
- "Avoid track" button to avoid tracks you don't like
- Physical interface
The physical interface exists in it's own repository.
The app consists of Radiodan middlewares.
This listens for events triggered on the player and causes changes on the Radiodan::Playlist object. There's only a single Playlist object that's used.
Remembers state such as volume and current station in a file and reads it on start-up.
Faye web server
This loads a web server, the Faye messaging server and the Web App (see below)
A web app is mounted on port 3000, so will be available on an URL such as
lib/web_app.rb contains the HTTP interface for controlling the radio and displaying basic state information such as the volume and current station. The web app simple triggers events on the player rather than changing anything directly. e.g. to change the volume the
:change_volume event would be fired with the desired volume value.
Converts messages received over the Faye interface into player events understood by the Radio Controller middleware.
Using the NowPlayingClient to avoid tracks. When the
:avoid, :track event is triggered and Now Playing information is available for the track, this middleware works out how long of the track is left to play
sounds/birdsong.mp3 is from http://www.freesfx.co.uk
See COPYING file.