Not easy...
1) MIDI pick-up? I think Roland did one years ago, but being a bass there is more 'lag' as the electronics work out the note played.
I know they still do MIDI guitar systems, but I don't know if they do Bass versions.
2) Pitch-to-MIDI converter. Only really work if the part played is a single note.
_________________________
The Sonic Energy Authority - a sound investment