I dunno about ripping the music, but I do know that a good portion, if not all, of it is available for download in GYM format at
www.zophar.net in the Game Gusic Archive. I think PS1 music can also be found there in VGM format. There are also players an plugins available at the same site. I don't think GYM or VGM can be converted to midi (or if they can, not very well) but people have already created midi soundtracks, probably for all of them.