Touche + Arduino + ChucK + Pi = making music with a mug of water, discretely.
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 4 commits ahead of bonniee:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Mug Music Pi

This fork is a stripped down version of Mug Music by Bonnie Eisenman and Harvest Zhang, which I adapted for use on Raspberry Pi.

How to Use

I'll fill in as much as I can here. Unfortunately I didn't keep proper notes as I was getting it all to work, so I can't recall the whole process. There were definitely a couple of dependencies, including the ALSA library and libsndfile. Unfortunately the audio ended up being quite distorted at higher gains, so I had to keep the gain setting within the ChucK programme very low. The distortion was slightly lower on the Model B+ compared to the Model B. Having an ethernet cable or, especially, a wifi adapter produced a lot more distortion. It's possible, from my research, that using an external sound-card could fix this, but I didn't have one on hand.


The serial connection between the Arduino and ChucK programme is quite buggy as there was no Fermata to handle that. As such, often the programme will fail to work properly when started up. My lazy solution was to just keep starting it again until the correct values were being read - never took more than a couple attempts. I imagine that with better error-handling and understanding of serial communication this wouldn't be that hard to fix, which would mean the programme could run on start-up, which would be a lot more convenient. However, once I got the programme running correctly, I never had any problems, even after 5-6 hours. One slight issue is that the resting values seemed to creep up by one or two over the course of the day, requiring slight recalibration.'


Code adapted from: