GeppettoLab
Active member
Hi,
I'm working on the Audio Adaptor Board for Teensy 3.1 using the FFT example of the Audio Library, to perform a frequency analysis of an handmade Kantele .
I'm trying to detect every single tone of this instrument, trought an 1024 FFT in the range of 40/4000 Hz.
The example works great but my problem is that with 512 bins of 21,53 Hz width, I cannot obtain the accuracy that i need.
I would try to modify the sample rate of the ADC from 44.1KHz to an half or less, I've searched for some variable and I found in the AudioStream library (specifically in the AudioStream.h file) the variable AUDIO_SAMPLE_RATE defined at 44117.64706.
from this comment I suppose that this variable is in some way dependent from the CPU SPEED that I can modify from the Teensyduino IDE. But how?
I didn't find anything about this..
I start now some experiment modifying the variable and the CPU SPEED, but I will like to understand if I'm on the right way or not.
Can someone help me?
Thanks in advance
G
I'm working on the Audio Adaptor Board for Teensy 3.1 using the FFT example of the Audio Library, to perform a frequency analysis of an handmade Kantele .
I'm trying to detect every single tone of this instrument, trought an 1024 FFT in the range of 40/4000 Hz.
The example works great but my problem is that with 512 bins of 21,53 Hz width, I cannot obtain the accuracy that i need.
I would try to modify the sample rate of the ADC from 44.1KHz to an half or less, I've searched for some variable and I found in the AudioStream library (specifically in the AudioStream.h file) the variable AUDIO_SAMPLE_RATE defined at 44117.64706.
Code:
#ifndef AudioStream_h
#define AudioStream_h
#include "Arduino.h"
#define AUDIO_BLOCK_SAMPLES 128
#define AUDIO_SAMPLE_RATE 44117.64706
#define AUDIO_SAMPLE_RATE_EXACT 44117.64706 // 48 MHz / 1088, or 96 MHz * 2 / 17 / 256
from this comment I suppose that this variable is in some way dependent from the CPU SPEED that I can modify from the Teensyduino IDE. But how?
I didn't find anything about this..
I start now some experiment modifying the variable and the CPU SPEED, but I will like to understand if I'm on the right way or not.
Can someone help me?
Thanks in advance
G
Last edited: