A program to automatically tune a guitar. Written by Justin Reidhead and Steven Swenson
Dependencies: FFT FrequencyFinder Motor NewTextLCD PinDetect mbed strings
FrequencyFinder/FrequencyFinder.h
- Committer:
- melangeaddict
- Date:
- 2012-04-15
- Revision:
- 2:9c0a83c5ded5
- Child:
- 9:2a211133e79a
File content as of revision 2:9c0a83c5ded5:
#pragma once #include "mbed.h" #include "FFT.h" #include "NewTextLCD.h" using namespace std; const int size=4096; class FrequencyFinder{ public: FrequencyFinder(PinName input); ~FrequencyFinder(); float find_frequency(); void get_data(); void take_abs(); int find_peak(); int find_max(int); void initialize_array(); private: float signal_array[size]; int index; int peak; int frequency_final; Ticker ticker; AnalogIn _signal_in; AnalogOut _dc_offset; };