Instructables

Airmonica - a free-air musical instrument

Featured
Picture of airmonica - a free-air musical instrument
improvise + harmonize + customize


The airmonica is a easy-to-learn tweakable musical instrument that you can use to perform harmonic musical ditties by accompanying a tri-tone arpeggiator. There are endless opportunities to expand the airmonica in any way that will make it your your own custom instrument. The airmonica consists of three parts:

    1. a wii compatible nunchuck as the instrument interface
    2. an arduino micro-controller board as the brain
    3. a ginsing shield as the synthesizer

In addition to this instructable, you can visit the project webpage at http://www.engeldinger.com/services/latest-project/airmonica.


 
Remove these adsRemove these ads by Signing Up

Step 1: Airmonica parts

Picture of airmonica parts
a stack to hack

The airmonica consists of 4 basic parts, all of which are easily acquired and require little or no modification. Aside from preparing the nunchuck and installing the software the airmonica can be assembled by just pushing it together. All of the parts in the airmonica can be reused on future projects, and together provide a great prototyping environment for experiments in human interface, computing, and complex waveform synthesis. Here's what you'll need:


1. A Wii compatible nunhuck

The nunchuck shown here is an inexpensive 3rd party controller (NYKO Kama). This was chosen because its about half the price of an official Nintendo controller, its clear, has cool flashing lights, and most importantly, can be taken apart with a screwdriver and  can put back together later. You can get one for about $10 on Amazon:

    http://www.amazon.com/Nyko-Kama-Wii-Nintendo/dp/B001PAAE7I/ref=dp_cp_ob_vg_title_0



2. An Arduino Uno microcontroller ( blue as pictured )

The Arduino Uno is a complete programmable development kit that allows you to run C/C++ code to control is various inputs and outputs. If you don't have one already you should really get one - its a great way to learn about hardware, software, and embedded applications. It is very affordable and has great support. You can pick one up for about $22 and then download the development environment from the Arduino support page:

    http://www.amazon.com/Arduino-A000046-UNO-board/dp/B004CG4CN4/ref=sr_1_cc_1?s=aps&ie=UTF8&qid=1331048877&sr=1-1-catcorr

    http://www.arduino.cc/



3. A GinSing synthesizer shield ( yellow as pictured )

The GinSing is synthesizer board (shield) that plugs onto the Arduino and contains a digital synthesizer chip and an amplifier you plug directly into a speaker (or stereo via 3.5mm jack). For this project the Ginsing is used to create the mellow polyphonic tones you hear produced, but is capable of wide range of sound related applications like synthetic speech, waveform synthesis,  and more. The GinSing is available in either kit ($35)  or assembled ($45) form from their website:

    http://www.ginsingsound.com



4. (Optional) proto board ( red & green as pictured )

One thing you may find helpful is an Arduino compatible prototyping shield. In the picture you can see that the nunchuck is connected to the proto board, which not only makes it easier to connect, it also allows you to use the metal pins on nunchuck cable rather than having to cut the cable. If you don't use you such a board you would just insert the wires into the connector on top of the GinSing board instead (not pictured). The board pictured here is from SparkFun, and an nice because it can be use on other projects that may require switches and LEDs as well:

    http://www.sparkfun.com/products/7914
rlmarket2 years ago
Have Arduino Uno with IDE version 1.0, and basic sketches, like Blink, upload and work. Have attached the GinSing v1.2 hardware, uploaded the 3.0 library and played the included samples through speakers, so this part seems to be working. However, having trouble uploading the Airmonica files to operate the Ginseng hardware or getting sound using the Nyko Kama controller -- the Arduino window confirms "done uploading" but the amber LED on the Ginsing board doesn't glow like it does with the Ginsing software, so I suspect that there is a problem that keeps Airmonica from running.

The sound output is a quiet hiss that has a rhythmic ticking that becomes louder if the volume control on the Ginseng board is increased. Movement or pressing the buttons on the controller doesn't seem to affect this output. Also, the controller begins vibrating as soon as the red and black power wires plugged in to shield, same thing when plugged directly into the GinSing board. The colored wires are connected as in the picture, although my controller comes with additional brown, white, and blue wires that are unused.

This is an amazing project which I would really like to make work. Any ideas as to what is the problem and how to work around it?

flashular (author)  rlmarket2 years ago
Great to see you giving it a try rlmarket. I would suspect the problem might be we with the nunchuck wiring. If you open up the console window (19200 baud) you might see the message:

can't initialize Nunchuck - error

If you do see this, it means the I2C connection between the Arduino and the nunchuck is probably incorrect. Given that you have so many additional wires and that the red/black makes it vibrate seems like a clue that your color coding may be different. It may take some experimentation to figure out which of the available wires are clock and data, but I'll bet with by eliminating ones that don't do the expected ( i.e. vibrate ) it might help narrow down which is which. Maybe you could also find through google more info on the pin coding for your particular nunchuck.
flashular (author)  flashular2 years ago
Another thought - if you can associate the pins with the physical connector you might be able to match them up without testing. One side of the connector as the pin connections CLOCK and GND, while the other side has PWR, ATT, and DATA. The only pins of concern for this project are CLOCK, GND, PWR, and DATA, which are set out as per this great little connector device:

http://todbot.com/blog/2008/02/18/wiichuck-wii-nunchuck-adapter-available/

So you might be able to diagram each side of the connector and match them up with the wires on your controller.
Success!

My "Nyko Kama Controller for Wii with Vibration" has the following 7 color wires : red, black , purple, green, white, yellow, brown. Here is how I connected them to make Airmonica work:

Red -- 5 Volt
Black -- GND
Purple --Analog pin 5 (I think this means Purple is Data)
Green -- Analog pin 6 (I think this means Green is Clock)
(the 3 remaining wires- white, yellow, & brown- are unconnected.)

As soon as I hit the right wire combination, a chord rang out from my speakers, the LED on the GinSing board lit up, and the controller became operational.

The link you sent

http://todbot.com/blog/2008/02/18/wiichuck-wii-nunchuck-adapter-available/

has a photo which helps show which wires are clock, data, power and ground in a Nunchuck plug. This would have helped more if I hadn't already pulled all the wires out of the plug, neglecting to diagram which colors went to which part of the plug. I would probably just photograph the wires as I disassembled a plug next time, which should make it easier to identify which wires should connect to the GinSing board ( or the prototyping shield ) and where.
flashular (author)  rlmarket2 years ago
Fantastic! Thanks for doing the legwork - I'm sure others will benefit from your experimenting. In the end matching the connector positions would certainly avoid much of the guessing.

Now that you're up and running take a look at the code for the octavizer - you might have some fun enabling it and tying it to another input from the nunchuck.
scienstein2 years ago
Hi, just wondering how did you made your plastic shielding case for your Airmonica? How much does it cost? Thank you!
flashular (author)  scienstein2 years ago
That is actually the case that the nunchuck came in. I found it on the clearance section at the local Target store for $9. Its very interesting because you can see the actual guts of the controller and has blinking shake lights built in. It is simply labeled NYKO Kama with no other identifying marks. Its easy to see how you could remove the entire case and remount the board for more interesting cases as well.
Wow That Is SO cool i only have a normal wi black nunchuck and i did not know you could change the case colour
Dude, you have updated the theremin... sort of, and in a great way, too. Anyway, this looks great!
ladybgood2 years ago
...... WOW...... let the ordering begin!
sitearm2 years ago
@Flashular; tweeted Cheers! Site
rimar20002 years ago
MASTER!
furthuron2 years ago
wow!! this is really great. i gotta friend that makes music, i should make him one, imagine busting this out on stage, hah. this is a really cool ible, thanks alot!
BIGBUG2 years ago
Awsome project Flash! Is that the Babblebot chip on the GinSing board?
flashular (author)  BIGBUG2 years ago
Yes, indeed it is.
mikeasaurus2 years ago
Whoa, neat project. I really like this!