Verhalenmachine (Story Machine) is a RaspberryPi based audio player/ recorder/ Soundcloud uploader.
The player part is implemented on top of Volumio. It controls Volumio via MPD and presumes a custom enclosure outfitted with:
- 2 buttons: For play & stop and next.
- a volume slider: For volume control :) (controlled via Davids work)
- a VU meter: For display of output volume (controlled via Davids work)
- ...
The recorder part is implemented by:
- 1 button: For record & stop.
- a VU meter: For display of input volume (controlled via )
- ...
The Soundcloud uploader uploads
https://volumio.org/get-started
Plugin network cable and electricity and startup the device. Connect to http://volumio.local/.
-
Change Player Name to Verhalenmachine http://volumio.local/plugin/system_controller-system
-
Set audio output to Audio Jack http://volumio.local/plugin/audio_interface-alsa_controller
-
Turn off volume control in Volumio http://volumio.local/plugin/system_controller-network
We use our own hardware for it and it improves audio quality. https://volumio.github.io/docs/User_Manual/Volume_Control_and_audio_quality.html
-
Change Hotspot Name & Password http://volumio.local/plugin/system_controller-network
-
Enable SSH access
https://volumio.github.io/docs/User_Manual/SSH.html
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
cd /home/volumio/
git clone https://github.com/erwinelling/verhalenmachine.git
To update:
cd /home/volumio/verhalenmachine
git pull
Install GPIO stuff
sudo apt-get install rpi.gpio
Install python development headers
sudo apt-get install python-dev
Install pip
sudo apt-get update && sudo apt-get install python-pip
Install Soundcloud, psutil, socketIO and MPD2
sudo pip install soundcloud psutil socketIO-client-2 python-mpd2
For remote SSH/ web access setup Remot3.it
sudo apt-get install weavedconnectd
sudo weavedinstaller
As per http://www.raspberrypi-spy.co.uk/2015/10/how-to-autorun-a-python-script-on-boot-using-systemd/ and Give it the right permissions and enable our unit file as service
sudo chmod 644 /home/volumio/verhalenmachine/verhalenmachine.service
sudo systemctl enable /home/volumio/verhalenmachine/verhalenmachine.service
To control or check the service manually:
sudo systemctl start verhalenmachine
sudo systemctl stop verhalenmachine
sudo systemctl restart verhalenmachine
sudo systemctl status verhalenmachine
chmod a+x /home/volumio/verhalenmachine/cron_upload.py
chmod a+x /home/volumio/verhalenmachine/cron_recordcheck.py
sudo crontab -e
sudo chown root: cron_*.log
Make sure to use crontab and not sudo, so the cronjob will run for user pi.
Add:
*/15 * * * * /usr/bin/python /home/volumio/verhalenmachine/cron_upload.py > /home/volumio/verhalenmachine/cron_upload.log
*/15 * * * * /usr/bin/python /home/volumio/verhalenmachine/cron_recordcheck.py > /home/volumio/verhalenmachine/cron_recordcheck.log
https://volumio.github.io/docs/User_Manual/Quick_Start_Guide
Turn it on
Wait for startup
Connect to Wifi Network Verhalenmachine with password verhalenmachine
Setup Wifi connection http://192.168.211.1/plugin/system_controller-network
It should now be reachable at http://verhalenmachine.local/
cd tail -f ~/verhalenmachine/verhalenmachine.log
Add this to /etc/mpd.conf
audio_output { type "fifo" name "my_fifo" path "/tmp/mpd.fifo" format "44100:16:2" }