| * @param threshold Allowed uncertainty | * @param threshold Allowed uncertainty | ||||
| * @param cpu_max How much cpu usage before throttling | * @param cpu_max How much cpu usage before throttling | ||||
| */ | */ | ||||
| void AudioAnalyzeGuitarTuner::initialize( float threshold ) { | |||||
| void AudioAnalyzeGuitarTuner::begin( float threshold ) { | |||||
| __disable_irq( ); | __disable_irq( ); | ||||
| process_buffer = false; | process_buffer = false; | ||||
| yin_threshold = threshold; | yin_threshold = threshold; |
| * | * | ||||
| * @return none | * @return none | ||||
| */ | */ | ||||
| void initialize( float threshold ); | |||||
| void begin( float threshold ); | |||||
| /** | /** | ||||
| * sets threshold value | * sets threshold value |
| * Initialize the yin algorithm's absolute | * Initialize the yin algorithm's absolute | ||||
| * threshold, this is good number. | * threshold, this is good number. | ||||
| */ | */ | ||||
| tuner.initialize(.15); | |||||
| tuner.begin(.15); | |||||
| pinMode(LED_BUILTIN, OUTPUT); | pinMode(LED_BUILTIN, OUTPUT); | ||||
| playNoteTimer.begin(playNote, 1000); | playNoteTimer.begin(playNote, 1000); | ||||
| } | } |