Ableton Live's most recent version has this feature. It's called harmony to midi, and it's pretty cool (Ableton is a fantastic program in general).
I'm not aware of any open libs for this task though. I'm not really sure how you would go about this either. Something with wavelets would be my first guess? There is a wavelet lib for python [0]. You'd have to determine the correspondence between wavelet scale and midi note frequency.
This assumes audio tracks are separated. Separating mixed tracks seems like an even bigger can of worms.
I'm not aware of any open libs for this task though. I'm not really sure how you would go about this either. Something with wavelets would be my first guess? There is a wavelet lib for python [0]. You'd have to determine the correspondence between wavelet scale and midi note frequency.
This assumes audio tracks are separated. Separating mixed tracks seems like an even bigger can of worms.
[0]: http://www.pybytes.com/pywavelets/