Can software distinguish between different musical instruments If possible, I would like to write a little script that can identify different musical instruments from just a recording.  Apart from variations of amplitude and frequency over time (which can be shown by time-dependant and spectrogram, respectively), what other variables are there?  

Furthermore, how would one do the classification?  Fingerprinting is an option, but that would only work if a single piece at a time is played.
What you want to do is timbre recognition.