Saturday, June 11, 2011

Summer Project: Step 3...and Info!

Hello again! I'm glad to announce that I've made some more progress on the project. By now you're probably dying to find out what the project is all about! No? Well, I'm going to tell you anyway. It's all about handling data, and here's how that works:
  1. Read data from ADXL345 accelerometer onto the Arduino Mega 2560 microcontroller.
  2. Format and send data to computer (using this guy's code). This is what I've done so far, and using that same guy's code, I've modeled the accelerometer's movement, which looks pretty much exactly like this video. That is as much as I'm borrowing from that guy though!
  3. Send accelerometer data to this script to allow the data to be read as a MIDI signal.
  4. Enhance the Processing script from step 3 to recognise motion patterns (gestures and such) of the accelerometer. This is where I will apply my computer science skills! The script will output different MIDI signals for each motion pattern and hard-coded gesture to send a variety of outputs.
  5. Send the MIDI data to music recording program of choice (Common Music, Max/MSP, Ableton Live, etc.)
  6. Experiment with using the MIDI input to create motion and gesture controlled sounds, effects, filters, etc....It gets really interesting after this!
  7.  Buy 5 more accelerometers, and connect them through a multiplexer to the microcontroller.
  8. Strap the 6 accelerometers to my hand, placing one on the back of each fingernail/thumbnail, and one on the back of the palm.
  9. Code more complex gestures involving relative angles, positions, and movements from each finger and the hand, and export these as MIDI data to music recording software.
And that's the project! I know, it's extremely ambitious. What I'm trying to do, in effect, is create a new instrument, that being the motions of the hand. Instead of manipulating hardware with your hands to affect music, this device could allow you to simply move sound with your hands themselves. It's a kind of instrument that, as far as I know, does not exist today, but could possibly open up some really interesting options and intuitions for music production and performance. I'd like to use it myself for that purpose, if it can be done! I'm pretty confident that it's possible, especially considering the work I've done thus far has gone off without a hitch, and has actually served to clarify how I'll proceed with the project. Basically, the data flows like this: accelerometer -> microcontroller -> motion processing script -> MIDI conversion script -> music recording software.

To calm you down after all the excitement you're feeling from reading that, here are a few really chilled out tracks. Check out Destiny by Zero 7, La Femme d'Argent by AIR, Dayvan Cowboy by Boards of Canada, and Little by Little by Groove Armada. Enjoy the links! My next post will be when I've made some progress on step 4, with basic motion recognition. Look forward to it!

Thursday, June 9, 2011

Summer Project: Step 2

Hello again! I just finished protoyping the accelerometer hook-up! In layman's terms, I connected wires in a non-permanent manner in order to link the accelerometer (for those who don't remember, it measures acceleration) to the computer. Check it out!

I had to appropriate a couple new pieces of gear to do this! Firstly, my roommate's safety glasses (thank you Andrew!) and a pair of wire strippers. I didn't think I'd be soldering this early on, but my colourful jumper cables just didn't fill the holes on the accelerometer. I cut and stripped some red wire, which is what you see coming out of the little red (might not be red, I am colourblind) rectangle on the right side of the breadboard (the thing with all the holes). If you look really closely at that red rectangle, you'll see a tiny black bit. That 2mm by 4mm chip is actually the accelerometer. I've wired it up to the Arduino via the I2C protocol (SPI didn't quite work), and read data! Look at this data!

That's the static acceleration of the accelerometer. Basically it's the force of gravity acting on it in 3 dimensions.

Now for the next step! I need to stabilize and plot the data readings. This means that I need to make the numbers look more normal. I need to make the accelerometer sit flat instead of hovering in the air at an oblique angle. Then I need to record data as I wave the accelerometer around, and put that data on a graph. This will show me that I can get reliable and understandable data from this thing. That should take a couple days, and the step after that is a lot more exciting, don't worry!

Now here's a couple sweet tracks I've been listening to! Check out Sunlight by Starkey and Sunlight by the Bag Raiders. Why sunlight? I don't know, I think I slept through the sunny part of today.

Wednesday, June 8, 2011

Summer Project: Get Ready

Readers! I have a big announcement. I've decided to embark on a big summer project! Does that mean there won't be any songs of the day for the next while? Yes. Does it mean something much better is coming? Also yes. Here's the catch: I won't tell you everything at once! I'll keep you one step ahead of where I am in the project, of course with pictures and eventually video to complement it. I'll even throw in a few song links at the end.

By now you're probably wondering what I'm talking about! Here is all the gear I need and have acquired for this phase of the project:

Sorry if it's a little low-res...I took it on my iPod. This is my lab! Yes, it's also my living room. But let's talk about what's in the picture. If you're still wondering, that is in fact a bear riding a shark on my screen. The left side's much more important though. I've got soldering gear, pliers, jumper wire, a breadboard, 10k Ohm resistors, a 6-foot USB cable, an Arduino microcontroller, and a 3-axis accelerometer. The square thing just below the pliers is the microcontroller, and the little speck beside it is the accelerometer. The latter is slightly smaller than a quarter.

Now to clear up some terminology. Soldering is the process of melting a tin-lead alloy onto a pair of wires to form an electrical connection. A breadboard is a pluggable circuit board used for circuit prototyping. A microcontroller is like a little programmable computer processor capable of sending and receiving digital and analog signals to external devices (the accelerometer) while interfacing with computer hardware. An accelerometer measures acceleration in 3 dimensions of space, including static acceleration due to gravity. It's what makes your Wii-mote know how you're moving.

How and why do I have all this futuristic junk? Well, I'm not a total layman...I have some robotics experience beyond the Robotics/Youtube club I ran in high school! That's right, music and computer science aren't my only interests. I'm going to assemble and program these parts into something pretty awesome! Of course it's not irrelevant to Rhythm & Bass! It will involve music in a pretty big way. First, I have a lot of testing to do.

The next step: I'm going to connect the accelerometer via SPI connection (don't worry about it) to the microcontroller, which I will connect to my computer by the USB cable. The goal of this is to read data from the accelerometer into the computer.

Stay tuned for updates! I'm doing this project in my spare time, so it should take a couple days to get this wired up. I'll fill you in as soon as Step 2 is done! Step 1 was getting the parts. You missed that one. My fault. Here's a couple track links! Enjoy!