some information concerning your issue with the "unreachable upper 5%":
This information was extracted from the product description on watterot.com.
i am not familar with modifying core32 applications, but it should be possible to output the full range of midi values by doing a small mathematical error computation.
here is my idea:
the core32 ADC has a maximum range from 0 to 3.3 Volts, if i remember right.
therefore, the ADC has a gain of 3.3, offset is 0.
the output range of the IR sensor is 0.4 to 2.7 Volts.
IR gain is 2.3, offset is 0.4
In order to convert the captured real data into the expected range we have to write a small function which does the following calculation:
i am not sure if a similar option is allready included into the code, i just wanted to share the general concept of dealing with this kind of problem (without the need of aditional electronic parts).
contra of this solution: reduces resolution.
Cheers, Nasrudin