Guitar tuner built with ReactJS front-end and Python Flask API on the backend. The webapp is responsive. Deployed on https://tuneyourguitarnow.web.app/. Python Flask backend is running on an Apache2 server hosted on an AWS EC2 instance.
The idea is that a user can record one guitar string at a time and get visual feedback as to how in tune the string is with regards to the desired "tuning frequencies":
String | Frequency |
---|---|
E2 | 82.41 |
A | 110.0 |
D | 146.83 |
G | 196.00 |
B | 246.94 |
E4 | 329.63 |
- Install Python3 and ffmpeg
- Clone repo:
git clone [email protected]:StianIsmar/guitar-tuner.git
- Create a virtual environment with
virtualenv -p python3 ./venv
- Activate the virtual env with
source venv/bin/activate
server
and runpip install -r server/requirements.txt
to install python packages- Run API with
python server/frequency_api.py
cd client
npm i
to install react packagesnpm start
- Get out your guitar
- The audio is recorded on the client-side using mic-recorder-to-mp3.
- POST request with audio information is sent to a REST API running with Flask.
- The mp3 file is then parsed with pydub to a numpy array:
- The frequency spectrum is then filtered according to the desired string frequencies, and the largest amplitude frequency is returned in the POST response from the Flask API.