I did the same on iPhone 3G and Wiimote before, but the result disappointed me, because the accelerometer is not accurate enough to tell the device's orientation and rotation. The idea here was to create music using hand/arm gesture, pretty much like a theremin. This is a specific app for iPhone 4, because of the gyroscope it equipped. The tilting (pitch angle) determines the pitch, the rotation (yaw angle) controls which octaves to play. The roll angle the volume. Tap anywhere on the screen to play sound.
Check out CyFi LAB: A series of 'cymatic' experiments by Sonos and WeAreMatik exploring how nature designs dynamic patterns in response to sound and vibration without direct human influence. vimeo.com/97866277