I went back to an earlier copy and still nothing appears.
I was about to give up on this when I remembered that the last iTunes upgrade I did coincided with upgrading my ipad to ios7. As as happened before when upgrading the ipad, my books were deleted. Fortunately this time I had backed up the ipad to itunes, so I did a restore from that backup. Lo and behold, my music library is on the ipad and it must have been put there from that backup, because I didn't have any music on the ipad before.
I've connected the ipad to my computer and opened iTunes. I don't see a way to copy the music from the ipad to iTunes but there must be a way. Do you know how to do that?