I need your help choosing the appropriate hardware and software for my project.
I want to make an electronic tuner for low-pitched range music instruments (ca.70-280Hz).
(It doesn´t need to work superfast or instantly. A output value every 0,5sec or 1sec should be enough.)
To get a clean signal I could insert a RC filter or a software filter from Arduinos libraries (lowpass filter: 0-300HZ pass).
Than I would use a sample rate of 600Hz…
FFT size: 256 (It`s possible to choose also a bigger one with Arduino?)
(600/2 )/ (256/2) =2,34Hz accuracy only.
What do you recommend?:
The for me a little bit familiar Arduino or the powerful new Teensy?
What is better for my application FFT or YIN?
I have already an old chromatic tuner (maybe from 90´s) from Yamaha at home. Let’s says that in 90% of cases it works fine and it finds the first harmonic. In the remaining 10% the indicated tones jump around and it´s not possible to recognize the tone.
What do you think, what kind of algorithm did they used at that time? FFT or autocorrelation?
Which algorithm is used in modern chromatic tuners?
I´m not happy with the display of commercial tuners. Therefore I want do make one with my own design and I opened this topic.
The YIN algorithm is very powerful, able to find the fundamental even when the harmonics are much stronger.
… It could also work for other instruments?? Are there maybe some experiments?
It should work for other instruments.
If you'd like to do an experiment, I will help. Can you record a good quality sample of your tuba? If you'll post the sound clip and you're willing to allow it to be freely distributed, I'll put it into the list of sample for the NoteFrequency example. Only short sounds will fit, so please keep the sound to only 2 seconds if 44.1 kHz or only 4 seconds if 22.1 kHz sample rare.
Of course, I'll run the NoteFrequency code and post a copy of whatever it prints to the serial monitor while analyzing your sound.
Regarding Arduino I must repeat my question:
Is 256 the biggest FFT-size which an Arduino can do?
For most Arduino boards, the small memory size limits how large your FFT can be.
Teensy Audio has 1024 point FFT. But even 1024 is not usually enough resolution. YIN algorithm is much better than FFT for this purpose.
Many thanks for your offer!
What an honor to collaborate with the developer of teensy.
Yes let’s make that experiment together.
Below now five different notes of the same tuba:
If Yin algorithm works fine with these examples, will it work also for other tubas?
I`m not sure because each tuba sounds a little bit different. Some sounds purer, and others have a lot of bad harmonics in their spectrum.
I think I understood now the different in FFT size…
Here the analysis of BBb_Tuba_01 with 256FFTsize, 1024FFTsize and 65536FFTsize:
With 256 it`s impossible to detect the tone with the biggest amplitude.
And the second problem with FFT:
Other tones in the signal can be louder than the firs harmonic and then you can`t anymore search for the bin with the biggest amplitude.
Hi I tried to upload “NoteFrequency” to Teensy, but it returns the error that the sketch uses to much space:
Arduino: 1.6.5 (Windows 7), TD: 1.29, Board: "Teensy 3.2 / 3.1, Serial, 48 MHz optimized, German"
Sketch uses 262,228 bytes (100%) of program storage space. Maximum is 262,144 bytes.
Global variables use 21,416 bytes (32%) of dynamic memory, leaving 44,120 bytes for local variables. Maximum is 65,536 bytes. …..
Why that? Do I have maybe to change something in proprieties?
After that my next step will be to figure out, how to connect this microphone
and how to change the “NoteFrequency”-sketch in order to record from an analog input...
Have you read the workshop/tutorial manual, or watched the 48 minute video?
When you understand how to use the design tool, hopefully you'll see it has a ADC object you use to get the signal into the audio library.
Please, do yourself a favor and watch the video to learn how to use the design tool. I put a lot of work into that tool to make this so much simpler and easier for you and everyone who uses this audio library.