Recent Inventions -or-
A New Academic Years Resolution...
Hello and welcome to my latest Good Intention - a solid plan to post and share inventions and experiments as they go and catch up with (some of) the backlog too! Though I can't be too detailed here for practical reasons, I'm happy to share so please do ask about any specifics if you like!..
Augmented Reality Headphones
These turned out to be excellently successful! The idea is simple enough - layer a pre-recorded sound environment onto the live sound environment. The results can be make-your-hair-stand-up surprising! Stage one is a pair of small microphones are added to a pair of excluder headphones, so they sit near the wearers ears. The mics run to a handheld recorder and now the recorder can record binaural sound, play it back and allow the wearer to just go around listening. This in itself as a lot of possibilities - because its binaural, the spatial accuracy of the recording is extremely high and you can go around listening to a space, and transferring that experience to to a new location or another person. Stage two is to add another small mp3 player into the system so it combines with the mic feed. (I used a dfplayer and a lithium battery). On the mp3 unit, you place a recording you made earlier with that same mic/heaphone setup. The recording is essentially identical to the live feed because they share the same colourations. Try adding a recording of heavy traffic to the live experience of being lead blindfolded around a carpark - the feeling of the presence of the 'cars' is positively tactile. Terrifying and illuminating! :)
Motion to Sound by Looking
This has been used in the installation 'The Other Kind of Fireflies' - the microtonal composition for 'Fireflies' was broken apart and depending on your perspective, made playable - almost an instrument, or explorable - available to look inside and examine the parts of. Having tried some more complex variants using AI techniques, I think the strength of this is in its directness. The expressive qualities of the movements carry through strongly, naturally and immediately into the sound.
The technique here is to take a stream of images from a webcam and use only the motion. By looking at the difference from one frame to the next - aka the Background Subtraction technique, you can see whats moving and the degree of motion. Here the field of view is split up into a 4 x 4 grid. The intensity of the motion in each grid space feeds into a channel of the 16 channel composition. The greater the motion in that grid square, the louder the part of the composition assigned to it plays. Very simple, but that's why the expressive qualities of the movement carry through into the sound!
In software terms, its made using opencv for the video processing (excellently simple! Apart from installing it, that is!) and PortAudio once again for the sound processing element. Since, fool that I am, the opencv is in Python and the PortAudio is in C it needs the linux technique of 'Named Pipes' to send data from one process to another... Lordy, but its a bit like they say in the Tao Te Ching - 'Exhausting just thinking about it, Nothing much once you've done it.' (Lao Tzu)
Good solution for 'Lots Of Small Sound Devices'
I needed a set of 'Sonic tea lights' to go in an installation and create a surrounding experience of sound in 3D space. Each small object playing a part in an immersive, meditative whole. It also needed to run for quite a long time, with no only self contained power and be very inexpensive...
It's possible to get very cheap iPod-shuffle-alike mp3 players from ebay around £1 each. (You can also get just the internal circuit board if you look around.) They're amazing value if treated right - the notable detail being you should just totally forget the internal battery! They're built to run on a LiPo battery, so they expect around 3.7v. The solution I used here was a cheap adjustable step up voltage regulator (approx £1) and a pair of AA batteries (rechargeable or not, both work fine). Disconnect the internal battery and dispose of suitably, adjust the regulator to output 3.7V and wire that in instead. After that you need some kind of power amp to drive a speaker. Again, amazingly cheaply you can get little 5W (ish) class D amps which are also very energy efficient. Here's the little trick to it all that keeps it simple: The amp claims to want a 5V supply but will work fine down to closer to 3V. However, if you connect it to the output of the step up regulator to give it 3.7V, you get funny oscillation problems as the regulator, amp and mp3 player interact! Connect the amp directly to the AA batteries, before the regulator and its all good :) There's very little margin, so the system will stop working when the battery voltage falls too low, but the power draw is very light and a pair of ordinary AA batteries should get you 10 hours comfortably, after which there's plenty enough charge still in the batteries to use for something else! Final step is a little (low cost, obviously) speaker, place it in a container and load it up with your audio :)
For this installation, I took a single, quite 'ambient' microtonal composition and put it in each sound device. Each device was allowed to start randomly and significantly out of sync with the other devices, and they were placed around the 3D space. The result was amazingly successful. Having tried more complex systems of sound-in-space where sound sources are timed to milliseconds of each other, having these producing related-to-each-other sound but with time differences of several seconds was much better in many ways! Definitely something to look into a little deeper... :)
Ear Changing Headphones
One of a few toys created for the Green Gathering festival this year. A simple idea that proved very popular with the target audience - headphones that change the sound of the world around you. Kids loved them. Some walked around wearing them and singing for ages, then came back to do the same again the next day. As done here, a cheerful gimmick but I think maybe something with quite a few possibilities in yet...
((edit) I'll try and make this a properly detailed, easy diy project at some point cos its quite fun!..)
The heart of the device is a Raspberry Pi Zero and an interesting chance to appreciate the raw horsepower the little device has! The hardware is a 6mm electret microphone running into an inexpensive USB soundcard. The soundcard runs to the Pi Zero which processes the audio data stream and sends it back out to the card. The card output directly drives a pair of isolating headphones. The headphones were by far the most expensive part, but something I had already available. Ordinary, low cost 'phones would be nearly as good. The whole thing runs for roughly 2 hours between Fiddling(tm) on a 2200mah lithium battery with a USB connection - the 'power bank' type that you charge a phone from. In this case £2 a pop from a bargain bin! :)
The software side builds on the tech developed initially for Human Theremins. I've found that a bit of coding in C using the PortAudio library to be a very nice way to 'get stuff done' and surprisingly un-intimidating if you've got a little experience with C-ish coding (i.e. Arduino) and audio processing. And if you haven't any experience, then a good way to start getting it!
For this project the Pi Zero takes the audio, shifts it up an octave without altering the length of the sound by using a quick and simple variation on the granular resysthesis technique then adds a long 'Lee Scratch Perry' kind of an echo for an exact replica of what it sounds like in space :) The Pi Zero copes with this real time processing and smiles. If there's a tricky bit, its getting the Pi to run a script automatically at power-up. For some reason this is a persistent pain! I'll share my untidy and un-optimised code for those kindred lost souls looking for clues and as always I'm happy to discuss...
The above code uses the PortAudio library, so you'll have to install that on your Raspberry Pi first. With that done, you can compile the text file into executable code with the instruction: gcc -o earchangingHeadphones earchangingHeadphones.c -lm -lrt -lpthread -lportaudio -lasound
The way it works is PortAudio grabs 256 'frames' of audio input and hands them to you. You make them all space-chipmunk-ee in any old way you like and hand them back. The altered sound gets sent out to the headphones -sorted- and we do it all again! The details are a bit of an ocean but the gist is very simple... :)