The popular program Audio Spectrum 3D is now available on iPhone as well.
Audio Spectrum 3D gets sound from the microphone and analyses it. With this program, you can not only hear music but also see it. Several visualization modes are available: 3D, 2D, sonogram and oscilloscope views.
PC version is also available at http://www.softsymphony.com.