Giter Site home page Giter Site logo

guitartuner's Introduction

GitHub release (latest by date) GitHub all releases GitHub Release Date

GuitarTuner App

This is a simple chromatic tuner designed for guitar tuning, but it should also work with every other instrument. The played note is automatically recognized through the microphone, and an acoustic signal is heard when the tuning is correct. If you want you can also change the reference-tone to another frequency. At the moment, a compiled version is only available for macOS, but you can use it on Windows too if you run it in the command line.

  • Automatic tone detection
  • High accuracy: < 0.5 cents (around the A4 area)
  • Working from 60 to 2000 Hz (C2 to C7)
  • High stability of the pitch indicator
  • Support for macOS light and dark-mode

➜️ Download macOS app: Download here

Functionality

The app is written in Python with Tkinter, PyAudio and numpy. It uses PyAudio to get access to the raw audio-stream coming from the microphone. Then a fast-fourier-transformation (numpy.fft) is applied on the audio-data, which is buffered for about 1.5 seconds. Then a HPS (Harmonic Product Spectrum) operation is applied to filter the harmonic frequencies. From the HPS output, you can get the loudest frequency and convert it to a musical note by applying the following formula: 12 * numpy.log2(f / a4_frequency) + 69.

Run GuitarTuner with python

First you need to install all necessary libraries:

pip3 install -r requirements.txt

Then you can do:

python3 main.py

Note that macOS dark-mode only works with anaconda python version or python.org version 3.10 or later.

So the preferred way to run the program would be with anaconda-python (you have to install miniconda):

conda activate base
pip install -r requirements.txt
python main.py
   ...
conda deactivate

Install miniconda python version: https://docs.conda.io/en/latest/miniconda.html

Create standalone application

You can also create a standalone application for macOS or Windows by yourself. For macOS you can use py2app:

python3.8 setup.py py2app

For windows, you would need to use py2exe instead and modify the setup.py file.

To keep application size as small as possible, make sure you create a virtual environment where you install only the necessary libraries. The macOS dark-mode currently only works with the anaconda python Version. If you compile the app with a python.org version, you have to disable the dark-mode by deleting the 'NSRequiresAquaSystemAppearance': Falseentry in setup.py, which causes the application window to go into dark-mode.

guitartuner's People

Contributors

tomschimansky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.