FFT_MajorPeak was just going from 0..255.
Now it simulates the full range from 21hz ... 8Khz
pull/3289/head
Frank 2023-07-03 15:07:14 +02:00
rodzic e416d06aa9
commit eabd6f60ef
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -503,8 +503,8 @@ um_data_t* simulateSound(uint8_t simulationId)
}
samplePeak = random8() > 250;
FFT_MajorPeak = volumeSmth;
maxVol = 10; // this gets feedback fro UI
FFT_MajorPeak = 21 + (volumeSmth*volumeSmth) / 8.0f; // walk thru full range of 21hz...8200hz
maxVol = 31; // this gets feedback fro UI
binNum = 8; // this gets feedback fro UI
volumeRaw = volumeSmth;
my_magnitude = 10000.0 / 8.0f; //no idea if 10000 is a good value for FFT_Magnitude ???