USB TO MIDI

hey. how feasible is this?

i have a usb keyboard controller in a project with usb out to the computer, but want to make a kind of conversion box that converts it to midi out?

i can kind of stumble through it but i have no idea with the usb side of things????

any help would be much appreciated!

cheers
samm