No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
qrcodes
.gitignore
README.md
cam_qr.py
db.csv
db.py
led_control.py
make_qr.py
mpc_control.py
picam_qr.py
qrpic.jpg
zbar_test.py

README.md

QR music player

qr pic

Based on an idea from Dave Murray-Rust, this is a set of small scripts that lets you get 'hands on' with your digital music collection.

Print out your album art on one side and a version 1 (smallest size) QR code on the other (not yet automated).

A webcam on your computer/Raspberry Pi picks up the QR code using zlib and starts the album playing.

A Raspberry Pi with 640x480 usb webcam responds within a second of showing the QR code.

See a video demo here.

Scripts

cam_qr

  • Starts the webcam, uses PIl to convert an image from open cv format to something zlib understands,
  • Uses zlib to search for QR codes,
  • If one is found, search database and pass album name to mpc.

mpc control

  • Defines a single function that will start a new album playing if it isn't already

make_qr

  • Creates a new QR code using QR code python module, just picks a random number ATM.

Limitations

  • This is a proof of concept - pretty shoddy code!
  • With my 640x480 webcam it works up to about 1m away with a 15cm QR code. A higher def camera will increase this distance.
  • Only works with mpc

Want to make it better?

  • A real database, and way of generating it,
  • Auto generate pdfs with QR and album art for printing,
  • Extra QR codes to stop and start,
  • Chop off bottom of image to make scanning quicker,
  • Other music controllers (currently only works with mpc),

Pre requisites

  • sudo apt-get update
  • sudo apt-get install python-pil
  • sudo apt-get install python-zbar
  • sudo apt-get install python-opencv
  • pip install qrcode # only needed for creating qr codes
  • sudo apt-get install mpc mpd # for music playing

ws2812 status leds

License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.