Note pitch correction, i.e. modifying a note pitch or replacing it by the closest one in a given scale