Distance Sensor and MIDI Out

Try here Arduino Playground - InterfacingWithHardware

And here Arduino Playground - InterfacingWithHardware

People seem to have success with the Ping))) sensor: http://arduino.cc/en/Tutorial/Ping?from=Tutorial.UltrasoundSensor