TIC-80 11k edition (fixed)
Important notes:
- For the FFT feature to work you need to start it with
--fft
- On Windows, you will likely need to use
--fftusecapturedevices
to capture the loopback. Double-check the console output you're not accidentally capturing your microphone when running without it! - Check
tic80 -h
for more options.
Cooked up something new with the help of @TheNuSan. The algorithm is a carbon copy from her version of Bonzomatic but with a twist.
Details:
- Audio is sampled at 11,025 Hz instead of 44,100 Hz. In our testing this improves the data quite a bit
- Audio is binned into 1024 linear FFT bins
- Two functions:
fft(freq)
gives you the data with peak normalization (volume independent) in the given bin where the number should be between 0 and 1 except it's sometimes slightly more than 1. Will try to track down this issue another day, but afaict this is also present in Bonzo.
ffts(freq)
gives you the data with peak normalization and peak smoothing with a factor of 0.6f
which seems like a sweet spot but may tweak it in the future. This data does seem to be accurately between 0 and 1.
A side effect of sampling at 11k with 1024 bins is that our bins are higher resolution i.e. lot more narrow (~10.76hz). So while in the old, 256-bin, 44k version, fft(0)
would give you the "beat" often quite well (if I understand it right), this time you'll have to check more bins for it.
Tested and working:
- Windows XP 32-bit
- Windows 11 64-bit
- macOS arm64
- Linux amd64
- Linux arm64
Might have issues:
- Windows 7 32-bit but needs testing on other devices
All feedback appreciated!