Filter analog value to midi value