A basic way to start could be something like:
5v input range = 5 octaves = 72 midi notes = analog input values 0 to 1023
int n = mozziAnalogRead(pin);
float midival = (n/1023.f) * 72;
float midifreq = mtof(midival);
There's a chance that all the float calculations will be too slow...
one possible speedup, with some loss of accuracy, and only whole midi notes, without fractions, is:
int midival = ((long)n*(int)72)>>10;
int midifreq = mtof(midival);
and this line:
int midival = ((long)n*(int)72)>>10;
might possibly go a bit faster as:
int midival = ((long)n*(int)72)>>8;
midival >>= 2;
You could get more precision with the Oversample class for the analog input,
together with some fixed point hell (using Q16n16 types for midi) for smooth fractional midi...
all quite do-able, but maybe get the simple version going first.
Tim