Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

mroach/musicbox

Repository files navigation

Musicbox

The goal is for this to be a Phoenix application running on a Raspberry Pi to function as a simple music box for kids.

Tech Stack

  • Music Player Daemon - Headless music player for Linux
  • Phoenix LiveView - Instantaneous web UI without writing JavaScript
  • Nerves - Creating Elixir projects as full-blown firmware images such as for booting a Raspberry Pi
  • Elixir Circuits - Elixir SDK for GPIO and SPI for managing the buttons and RFID reader

Feature Goals

  • RFID cards trigger playing songs or playlists
  • Web interface to manage playlists, upload new music, pair new cards
  • Buttons to control playback

Development

  • app/ - Phoenix web application
  • mpd/ - Custom lightweight build of mpd
  • rpi/ - Scripts to configure a fresh install of Raspbian. May be obviated by using Nerves

This application is Dockerized. With Docker and docker-compose installed:

First time:

docker-compose build

Start development environment

On Linux we can mount /dev/snd in the Docker container and mpd can directly use our host system's sound output.

macOS doesn't have /dev/snd or ALSA, so we configure mpd to output via an HTTP/Shoutcast server. Then on our macOS host we can use iTunes or VLC to connect to the stream.

Use start_env.sh to automatically pick the correct configuration.

./start_env.sh

Put any music files you want into mpd/music and they'll be detected automatically by mpd.

Prototype

prototype board

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published