this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

remove dead code pt1

alice 02da3e7e 29693d23

+4 -32
+1 -10
src/ext/vqt_kernel.c
··· 35 35 } 36 36 } 37 37 38 - // Calculate Q factor for constant-Q transform 39 - float VQT_CalculateQ(int binsPerOctave) 40 - { 41 - // Q = 1 / (2^(1/binsPerOctave) - 1) 42 - // For 12 bins/octave, Q ≈ 17.0 43 - return 1.0f / (pow(2.0, 1.0 / binsPerOctave) - 1.0f); 44 - } 45 - 46 38 // Calculate variable Q factor optimized for 8K FFT constraint 47 39 static float calculateVariableQ(float centerFreq) 48 40 { ··· 300 292 301 293 // Stub implementations when FFT is unsupported 302 294 void VQT_GenerateCenterFrequencies(float* frequencies, int numBins, float minFreq, float maxFreq) {} 303 - float VQT_CalculateQ(int binsPerOctave) { return 0.0f; } 304 295 bool VQT_GenerateKernels(VqtKernel* kernels, const VqtKernelConfig* config) { return false; } 305 296 306 - #endif // TIC80_FFT_UNSUPPORTED 297 + #endif // TIC80_FFT_UNSUPPORTED
+1 -4
src/ext/vqt_kernel.h
··· 24 24 // Returns true on success, false on failure 25 25 bool VQT_GenerateKernels(VqtKernel* kernels, const VqtKernelConfig* config); 26 26 27 - // Calculate Q factor for given parameters 28 - float VQT_CalculateQ(int binsPerOctave); 29 - 30 27 // Generate center frequencies for VQT bins 31 - void VQT_GenerateCenterFrequencies(float* frequencies, int numBins, float minFreq, float maxFreq); 28 + void VQT_GenerateCenterFrequencies(float* frequencies, int numBins, float minFreq, float maxFreq);
+2 -6
src/vqtdata.c
··· 4 4 5 5 #include <string.h> 6 6 #include <stdlib.h> 7 - #include <math.h> 8 7 9 8 // Global VQT data arrays 10 9 float vqtData[VQT_BINS]; ··· 12 11 float vqtNormalizedData[VQT_BINS]; 13 12 14 13 // Peak tracking for auto-gain 15 - float vqtPeakValue = 1.0f; 16 14 float vqtPeakSmoothValue = 1.0f; 17 15 18 16 // Enable flag (tied to fftEnabled initially) ··· 29 27 memset(vqtSmoothingData, 0, sizeof(vqtSmoothingData)); 30 28 memset(vqtNormalizedData, 0, sizeof(vqtNormalizedData)); 31 29 32 - // Initialize peak values 33 - vqtPeakValue = 1.0f; 30 + // Initialize peak value 34 31 vqtPeakSmoothValue = 1.0f; 35 32 36 33 // Zero kernel pointers ··· 67 64 float vqtData[VQT_BINS] = {0}; 68 65 float vqtSmoothingData[VQT_BINS] = {0}; 69 66 float vqtNormalizedData[VQT_BINS] = {0}; 70 - float vqtPeakValue = 1.0f; 71 67 float vqtPeakSmoothValue = 1.0f; 72 68 bool vqtEnabled = false; 73 69 VqtKernel vqtKernels[VQT_BINS] = {{0}}; ··· 75 71 void VQT_Init(void) {} 76 72 void VQT_Cleanup(void) {} 77 73 78 - #endif // TIC80_FFT_UNSUPPORTED 74 + #endif // TIC80_FFT_UNSUPPORTED
-12
src/vqtdata.h
··· 2 2 #include <stdbool.h> 3 3 4 4 #define VQT_BINS 120 5 - #define VQT_OCTAVES 10 6 - #define VQT_BINS_PER_OCTAVE 12 7 5 #define VQT_FFT_SIZE 8192 // 8K FFT - optimized variable-Q for responsive visualization, ~5.4 fps 8 6 9 7 // VQT frequency range ··· 14 12 #define VQT_SMOOTHING_FACTOR 0.3f // Reduced from 0.7f for more responsive display 15 13 #define VQT_SPARSITY_THRESHOLD 0.01f 16 14 17 - // Variable-Q configuration (optimized for 8K FFT) 18 - #define VQT_VARIABLE_Q_ENABLED 1 19 - #define VQT_8K_OPTIMIZED 1 // Uses Q values that fit within 8K FFT 20 - #define VQT_BASS_Q_MIN 7.4f // Minimum Q at 20 Hz (constrained by 8K) 21 - #define VQT_BASS_Q_MAX 17.0f // Full Q achieved at 80+ Hz 22 - #define VQT_TREBLE_Q_FACTOR 11.0f // Smoother for high frequencies 23 - 24 - // Spectral whitening removed - caused spreading issues with VQT's inherent spectral leakage 25 - 26 15 // Raw VQT magnitude data 27 16 extern float vqtData[VQT_BINS]; 28 17 ··· 33 22 extern float vqtNormalizedData[VQT_BINS]; 34 23 35 24 // Peak tracking for auto-gain 36 - extern float vqtPeakValue; 37 25 extern float vqtPeakSmoothValue; 38 26 39 27 // Enable flag (tied to fftEnabled initially)