Git Product home page Git Product logo

usbmusi's Introduction

usbmusi

A simple, display-free jukebox for Raspberry Pi. Controllable with a numeric keypad (numpad).

Motivation

You may like this if you:

  • want to listen to music without having to use your phone, tablet or PC. I spend all day at the computer and don't want to look at a display when I listen to music at night.

  • like listening to albums from start to finish, like they did when only records, tapes and CDs existed.

  • own a USB DAC you can attach to the Raspberry.

  • have an external USB hard drive to store the music.

  • have a spare numeric keypad (or normal keyboard) to control the jukebox

  • have a pen and paper where you write up the list of albums ("display") stored on the USB drive, for example

    • 001: Michael Jackson - Thriller
    • 002: Nicki Minaj - The Pinkprint

    which corresponds to the folder structure

    /mnt/
     |--001/
     |  |--Michael Jackson - Thriller/
     |     |--track1.wav
     |     |--track2.wav
     |     |--...
     |--002/
     |  |--Nicki Minaj - The Pinkprint/
     |     |--track1.wav
     |     |--track2.wav
     |     |--...
     
    

    where /mnt is the mount point of the USB drive. The important part here are the upper-level directory names (001, 002). The directory structure below doesn't matter, the folders Micheal Jackson..., and Nicki Minaj... are optional. The program finds .wav, .mp3 and .flac files with the find command.

Installation

This assumes you run a system with systemd, pulseaudio and mplayer installed, and have a user named alarm. The install.sh script activates autologin for user alarm and appends a line to alarm's .bashrc, starting the program usbmusi.sh after automatic login. Commands are read from a numeric keypad.

Auto-mounting the USB drive

I use an fstab entry to automount /dev/sda1 on /mnt. Obviously this will only work reliably if /dev/sda1 is always assigned to the USB drive. For me it does the job, since I only ever have one USB drive on the Raspberry. See e.g. this Arch wiki article and user infinite-etcetera's post on serverfault.com.

Auto login and automatic start of the application

Take a look at the install.sh script.

Usage

Choose an album from the paper list and read off the number. To start playback, type the number into the keypad and press Enter. Note that the number 999 is reserved for shutting down:

  • * skips forward one track
  • \ skips to the beginning of track or backward one track
  • + increases volume
  • - decreases volume
  • CTRL-C exits the program
  • 999[Enter] shuts down the computer

Helpful links

usbmusi's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.