How to transfer non-itunes bought music from iPhone to Mac?

My computer (Mac) reset and lost all data including music and I got some non iTunes music which I don't know how to transfer.

For non-iTunes purchase music, you need some third party software to copy the music from iPhone to Mac. I used to do that with this iPhone/iPod file transfer. Not free, but it worked pretty well for me. Hope it helps you.