Bagpipe MIDI interface
The contraption on the right is an electronic bagpipe. More precisely, it is an electronic practice chanter, called a "Technochanter", made by Anders Fagerström.
My friend Olle Gällmo, who is an avid supporter, author and player on the traditional Swedish (or Dalecarlian) bagpipe had convinced Anders to build him a special version of the Technochanter, with the distinct scale and keying idiosynchrasies of the Swedish bagpipe.
Obviously, i had to have one, too...
Later, Olle showed me his idea on using FFT to convert the audio from the Technochanter into MIDI to be able to use a MIDI sound module for it or to record tunes to a sequencer. FFT was pretty heavy on calculation, though, so after some discussion we came up with a simpler idea for detecting the frequency: cheating.
Please note that the current version of the Technochanter, Technopipes, already outputs MIDI, so this project is more of a technical curiosity nowadays.
I thought this might make a good microcontroller project and started studying the MIDI interface specifications. Building a MIDI interface for an Atmel AT90S1200 proved to be pretty simple, so I went on to find a design for the input side.
Not being at all trained in analogue electronics, I played around with switching transistors and things like that with very little success, but enough to be able to complete the software for the AVR. Finally, I stumbled over an old design from an Elektor project book, using a cheap OP amp and some other stuff. I extracted the part of the design I needed and interfaced it to the AVR and voila! It worked!
The design is good enough that it can identify tones from the pre-programmed scale in whistled music an sometimes even from recorded multipart music.
I designed a circuit board in Adobe Illustrator and built a complete SMT version of the interface, like the one on the left. I've experimented with different battery configurations, and it appears that the button cells that this version is designed for don't have quite enough capacity to make an economical power source for the circuit, so I am moving to 9v batteries instead.
The current state of this project is as shown on the right, with an interface to a small LCD display. Talking to the display isn't very hard, and I've planned to make a simple user interface to adjust settings and start/stop drones etc, but the limitations of the AT90S1200 make this a difficult task.