https://github.com/mattvenn/qr-music-player
https://github.com/mattvenn/qr-music-player
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mattvenn/qr-music-player
- Owner: mattvenn
- Created: 2014-02-21T14:47:21.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-02-17T16:01:26.000Z (over 7 years ago)
- Last Synced: 2024-12-07T04:40:49.287Z (6 months ago)
- Language: Python
- Homepage:
- Size: 604 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# QR music player

Based on an idea from [Dave Murray-Rust](http://www.mo-seph.com/), 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](http://youtu.be/DuRMDblAJZM).
# 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
* https://tutorials-raspberrypi.com/connect-control-raspberry-pi-ws2812-rgb-led-strips/
* use SPI so doesn't interfere with i2s
* need core_freq=250 in the bootconfig for rpi3# License
This work is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/deed.en_GB).