Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: [posted] guitar tuner with FFT and Yin

  1. #1

    [posted] guitar tuner with FFT and Yin

    Here a tuner and frequency logger project I just completed.

    The tuner uses yin algorithm from the teensy audio library, fft frequency estimation from here (had to edit cpu defines for T4), a bubble-display library from here, serial command library from here and my own led and button libraries. Also I put together some code for reading a wacky mechanical rotary encoder, similar to this code, with polling, so no interrupts (see attached files), it debounces fine.

    The tuner can act as a device for musicians (it also has a metronome) and measures battery voltage: as soon as voltage drops it writes it's settings to eeprom. Various settings can be tuned via the serial interface and saved into eeprom. See screen shots for details and serial output of yin and fft.

    Click image for larger version. 

Name:	01.jpg 
Views:	171 
Size:	189.0 KB 
ID:	20028
    left: first version with T3.6, middle T3.6 without display (will be used as a frequency logger for a project musicians and physicians are working on), right T4 with speaker, rotary encoder and lipo-charger.

    Click image for larger version. 

Name:	02.jpg 
Views:	149 
Size:	114.0 KB 
ID:	20029
    voltage = 4.1V

    Click image for larger version. 

Name:	03.jpg 
Views:	157 
Size:	100.1 KB 
ID:	20030
    T4 with transparent plastic cover

    Click image for larger version. 

Name:	04.jpg 
Views:	162 
Size:	285.4 KB 
ID:	20031
    PCB designed in kicad

    Click image for larger version. 

Name:	05.jpg 
Views:	191 
Size:	327.2 KB 
ID:	20032
    serial output of yin and fft

    Click image for larger version. 

Name:	06.jpg 
Views:	151 
Size:	251.2 KB 
ID:	20033
    tuning the settings via serial

    code files: tuner.zip
    Last edited by jpk; 05-08-2020 at 03:51 PM.

  2. #2
    Click image for larger version. 

Name:	IMG_20200509_230925.jpg 
Views:	141 
Size:	92.1 KB 
ID:	20046

    Today I completed the wooden housing for the T3.6 tuner...

  3. #3
    Deleted User
    Guest
    Are you Data? reading the guitar tuner in counts of Hz, not notes and off-cents? Super cool project, thanks for sharing.

  4. #4
    Thanks! Thats exactly one of the reasons I did this project: available tuners with notes and cents give the impression you are in tune even if you arent at all by lighting green etc., so if a musician sees Hz he will take care as never before :-)

    Also he needs some knowledge to actually tune and decide for the frequency first (i.e. decide which tuning system to use and how to calculate the desired freq). If this is not of interest: well I guess a note/cent tuner with green lights suits better ;-)

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    27,659
    This was posted on the PJRC website. Here's the link.

    https://www.pjrc.com/guitar-tuner-us...audio-library/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •