Your ROOT_URL in app.ini is https://source.parasitstudio.de:63000/ but you are visiting https://source.parasitstudio.de/wirtz/OpenAudio_ArduinoLibrary/commit/f403ffa416d4606cb2829afd93ccaf9ac1b32b71
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
16 additions and
6 deletions
analyze_fft1024_iq_F32.cpp
analyze_fft1024_iq_F32.h
examples/TestFFT1024iq/TestFFT1024iq.ino
@ -1,6 +1,7 @@
/*
* analyze_fft1024_iq_F32 . cpp Assembled by Bob Larkin 3 Mar 2021
* Rev 6 Mar 2021 - Added setXAxis ( )
* Rev 10 Mar 2021 Corrected averaging bracket - Bob L
*
* Converted to F32 floating point input and also extended
* for complex I and Q inputs
@ -144,6 +145,7 @@ void AudioAnalyzeFFT1024_IQ_F32::update(void) {
sumsq [ i ] + = ss1 ;
}
}
if ( count > = nAverage ) { // Average is finished
count = 0 ;
float inAf = 1.0f / ( float ) nAverage ;
@ -160,13 +162,17 @@ void AudioAnalyzeFFT1024_IQ_F32::update(void) {
output [ i ] = sqrtf ( inAf * sumsq [ ii ] ) ;
else if ( outputType = = FFT_POWER )
output [ i ] = inAf * sumsq [ ii ] ;
else if ( outputType = = FFT_DBFS )
output [ i ] = 10.0f * log10f ( inAf * sumsq [ ii ] ) - 54.1854f ; // Scaled to FS sine wave
else if ( outputType = = FFT_DBFS ) {
if ( sumsq [ i ] > 0.0f )
output [ i ] = 10.0f * log10f ( inAf * sumsq [ ii ] ) - 54.1854f ; // Scaled to FS sine wave
else
output [ i ] = - 193.0f ; // lsb for 23 bit mantissa
}
else
output [ i ] = 0.0f ;
}
} // end of Average is Finished
outputflag = true ;
} // End, set output[i] over all 512
outputflag = true ; // moved; rev10mar2021
} // End of average is finished
release ( blocklist_i [ 0 ] ) ; release ( blocklist_q [ 0 ] ) ;
release ( blocklist_i [ 1 ] ) ; release ( blocklist_q [ 1 ] ) ;
@ -2,6 +2,8 @@
* Analyze_fft1024_iq_F32 . h Assembled by Bob Larkin 3 Mar 2021
*
* Rev 6 Mar 2021 - Added setXAxis ( )
* Rev 11 Mar 2021 - Fixed xAxis correction for dBFS output
*
* Does Fast Fourier Transform of a 1024 point complex ( I - Q ) input .
* Output is one of three measures of the power in each of the 1024
* output bins , Power , RMS level or dB relative to a full scale
@ -51,8 +51,10 @@ void setup(void) {
//float* pw = FFT1024iq1.getWindow(); // Print window
//for (int i=0; i<512; i++) Serial.println(pw[i], 4);
FFT1024iq1 . setNAverage ( 4 ) ;
// xAxis, bit 0 left/right; bit 1 low to high; default 0X03
FFT1024iq1 . setXAxis ( 0 X03 ) ;
FFT1024iq1 . setXAxis ( 0 X02 ) ;
delay ( 1000 ) ;
// Print output, once