If you still have your old iTunes from the computer you were using before, you can back up from that iTunes, and then import into your new computer. You can back up to disk, that's what I've used a few times, it's easy to do, but it takes awhile.
You could also opt for the very easy but costly method of buying a program such as *******. I bought it a while back when my computer crashed but I still had all my music, playlists, ratings etc. on my iPad.
<Edited by Host>
If you still have access to your Old Computer Transfer your iTunes Library to the New Mac...
See Here for one way
Copy your ENTIRE iTunes FOLDER to an External Drive... and then from the External Drive to your New Computer..
Backup iTunes to an External Drive
An Added Bonus is that you will have a Backup of iTunes.
There is something wrong with my iTunes, how can i do this without iTunes?
<Link Edited by Host>
TouchCopy Mac & Windows (iPhone and iPod Touch compatible)
I found this software to be very helpful but quite slow. It did transfer all of the songs I have in my iPod classic to my MacBook Pro which. There the iTunes Library had become corrupted and most of the music files went missing or "misplaced". Recovering them manually would have been quite an enterprise. Now I have, besides this software, iTunes Match which is driving me up the wall because it launches every time I open iTunes. I hope it will stop doin it once it matches all of the 7K songs I transfered from my iPod.
You can transfer music from iPhone to Mac by transferring purchases:
Connect your iPhone to the computer. Wait for its icon to appear in iTunes.
Go to File > Devices.
Choose Transfer Purchases from [device name].
Note: This feature works only for content bought from the iTunes Store. Any items that you imported from audio CDs or received from other sources won't copy from your iPhone to the iTunes library.
Another instuction: http://www.wikihow.com/Transfer-Music-from-iPhone-to-PC
I used iPhone to transfer music from iPhone to iMac. Once you connect your iPhone to the Mac, open iPhoto.To import all the photos from your camera, click the Import All button. To import only some photos, press the Command key while you click each photo you want to import, and then click the Import Selected button.After the import process is finished, click the Eject button or drag the iPhone’s icon to the iPhoto Trash in the Source list.
it shouldn't be so tough or disappointing to backup/transfer music, videos from iPod or iPhone to the computer. But iTunes makes it. This was articles written in 2011, since that time, there have been many useful tools in the market like Copytrans, Sharepod, O2Tunes, all of them could transfer/backup songs/videos quickly.
Here is the example: http://www.amoyshare.com/o2tunes-for-win/
I was having the same problem myself till I figured it out.
1.) With your iPhone plugged in, click on the iPhone button near the top right of iTunes next to iTunes Store.
2.) Click "On This iPhone"
3.) Click "Add To"
4.) Then you can transfer music to your phone from your albums, songs list, playlists, etc.
I wish that can indeed help you transfer music from iPhone to Mac successfully!
If you have some mistake to get your music back, you can go to Recover your iTunes library from your iPod or iOS device
Transferring music from iPhone to Mac isn't difficult. If you want to transfer purchased songs to Mac, iTunes is the best way. If the songs are from other resources, you can use some free apps, such as AirMore, Pushbullet and Mobizen, because they are easier than iTunes. Other than that, Bluetooth is also an option.