What you suggest is the Holy Grail in programming of music guys.
If you have dtmf tones, they can be easily interpreted. One at a time, that is. For sound, it's horribly complicated as even a quick look with gnuplot would show you. If you have gnuplot (or mathlab), try this line in it (or look at the attachment).
Quote:
plot [-4*pi : 4*pi] sin(x) +sin(1.5*x) +sin(2*x)
|
Now that's simple enough - a 3/2 and 2nd harmonic (2nd harmonic = one octave musically). Spectrum analysis is about your only way of debunking that stuff. Even then you're struggling.