@@ -112,10 +112,12 @@ TIC-80 includes FFT support for audio visualization and livecoding.
112112
113113#### API Functions
114114``` lua
115- value = fft (bin ) -- Get raw FFT magnitude for bin (0-1023)
116- value = ffts (bin ) -- Get smoothed FFT magnitude for bin (0-1023)
115+ value = fft (bin ) -- Get peak-normalized FFT magnitude for bin (0-1023)
116+ value = ffts (bin ) -- Get smoothed peak-normalized FFT magnitude for bin (0-1023)
117117```
118118
119+ ** Note:** Both FFT functions return peak-normalized values (auto-gain controlled), not raw magnitudes.
120+
119121### VQT Implementation
120122
121123Constant-Q Transform provides logarithmic frequency spacing for better musical analysis.
@@ -147,11 +149,13 @@ Constant-Q Transform provides logarithmic frequency spacing for better musical a
147149
148150#### API Functions
149151``` lua
150- value = vqt (bin ) -- Get raw VQT magnitude for bin (0-119)
152+ value = vqt (bin ) -- Get peak-normalized VQT magnitude for bin (0-119)
151153-- Note mapping: Bin = octave * 12 + note
152154-- Note: C=0, C#=1, D=2, D#=3, E=4, F=5, F#=6, G=7, G#=8, A=9, A#=10, B=11
153155```
154156
157+ ** Note:** VQT also returns peak-normalized values (auto-gain controlled), not raw magnitudes.
158+
155159### FFT vs VQT Comparison
156160
157161| Aspect | FFT | VQT |
@@ -206,9 +210,10 @@ local color = (bassNote % 12) + 1 -- Color from note
206210### Completed Features
207211- ** FFT** : 1024 bins with exact original behavior preserved
208212- ** VQT** : 120 bins with Variable-Q implementation
209- - ** Spectral Whitening** : Per-bin normalization for VQT
213+ - ** Spectral Whitening** : Per-bin normalization for VQT (removed due to spreading issues)
210214- ** Shared Audio Buffer** : Automatic sizing for both FFT and VQT
211- - ** Lua API** : ` fft() ` , ` ffts() ` , ` vqt() ` functions implemented
215+ - ** API Functions** : ` fft() ` , ` ffts() ` , ` vqt() ` , ` vqts() ` implemented for all supported languages
216+ - ** Peak Normalization** : Both FFT and VQT use auto-gain control
212217
213218### Configuration Options
214219- ` VQT_FFT_SIZE ` : Default 8192 (configurable in vqtdata.h)
@@ -226,9 +231,13 @@ local color = (bassNote % 12) + 1 -- Color from note
226231## Future Enhancements
227232
228233### Additional API Functions
229- - ` vqts(bin) ` : Smoothed VQT data
230- - ` vqto(octave, note) ` : Raw VQT by musical note
234+ - ` vqts(bin) ` : Smoothed VQT data (already implemented)
235+ - ` vqto(octave, note) ` : VQT by musical note
231236- ` vqtos(octave, note) ` : Smoothed VQT by musical note
237+ - ` fftr(bin) ` : Raw (non-normalized) FFT magnitude
238+ - ` fftrs(bin) ` : Raw smoothed FFT magnitude
239+ - ` vqtr(bin) ` : Raw (non-normalized) VQT magnitude
240+ - ` vqtrs(bin) ` : Raw smoothed VQT magnitude
232241
233242### Signal Processing Enhancements
234243- ** Adaptive Thresholding** : Dynamic noise floor removal
0 commit comments