To answer the inevitable question - the ways music gets influenced are:
- speed - the faster you wave the phone, the faster the piece is
- variation - the bigger the standard deviation in the values from the accelerometer is, the more variation in the melody there is.
- light - if it's dark around, the scale is minor, if it's light - it's major.