I have added a new extern to mjLib called n2m. It takes messages of the form "note <notename> [ <notename> ... ]" where note name is <note><octave> for example C5, d#7 and outputs a midi note number. You can find it at the usual place:
http://www.junklight.com/pd/index.html
cheers
mark