You're asking a lot, really. Yes, it can be done, but that's like me telling you I could automatically scan a bunch of mildewed handwritten pages into Word files -- it can be done, & will take lots&lots of effort to straighten out.
Sit down with a decent tuner, & try to sing a simple melody line that hits a note correctly every time. Unless you're a serious pro, you cannot do it more than one not in (say) five, & in fact sometimes the mic will pick up on an over- or undertone rather than the fundamental. And that doesn't even begin to take background noise into it.
Now turn on the TV, & a radio, get your neighbor to mow his lawn, wait until the refrigerator kicks in, & try the experiment again. That's what automatically parsing a piece of recorded music is like.
The best software for parsing audio is
Celemony Melodyne. Not perfect, not cheap, not one-click -- but pretty darned good. Now they have various trimmed-down & demo versions, so prepare yourself for a learning curve & have fun:
Melodyne downloads