@_conversion('<STR_LIT>', '<STR_LIT>')<EOL>def note_hz_to_midi(annotation):
annotation.namespace = '<STR_LIT>'<EOL>data = annotation.pop_data()<EOL>for obs in data:<EOL><INDENT>annotation.append(time=obs.time, duration=obs.duration,<EOL>confidence=obs.confidence,<EOL>value=<NUM_LIT:12> * (np.log2(obs.value) - np.log2(<NUM_LIT>)) + <NUM_LIT>)<EOL><DEDENT>return annotation<EOL>
Convert a pitch_hz annotation to pitch_midi