|
|
|
@ -181,7 +181,7 @@ def monitor_pitch(pyaudio_device: int,
|
|
|
|
|
|
|
|
|
|
mnote_error = mnote - mnote_base
|
|
|
|
|
logger.info('freq: {:7.2f} Hz mag:{:7.2f} note: {:>3s} {:+.2f}'.format(
|
|
|
|
|
frame_data['frequency'],
|
|
|
|
|
frame_data['frequency'],
|
|
|
|
|
numpy.log10(frame_data['magnitude']),
|
|
|
|
|
note_names[mnote_base % 12] + str(mnote_base // 12 - 1),
|
|
|
|
|
mnote_error))
|
|
|
|
@ -206,4 +206,3 @@ if __name__ == '__main__':
|
|
|
|
|
logger.info(' {}: {}'.format(device, devinfo['name']))
|
|
|
|
|
|
|
|
|
|
monitor_pitch(pyaudio_device=7, min_freq=20)
|
|
|
|
|
|
|
|
|
|