The Mel filterbank visualization is relatively simple but produces
visualizations that are quite nice. Run this file to view the mel
filterbank visualization
Changes to config.py:
> Increased STFT rolling window size
> Added configurable options for setting the max and min FFT frequency
Changes to dsp.py:
> Significantly improved the normalized weighted phase deviation code.
This noticeably improves the onset detection accuracy.
> Logarithmic partitioning of the FFT bins now happens after onset
detection instead of before onset detection. This improves onset
detection accuracy at the expense of CPU time.
> Fixed a bug in the log_partition function which would sometimes cause
out of bounds errors
> Refactored and removed some functions that aren't needed anymore
Changes to sandbox.py:
> Sweeping changes to the visualization functions. The onset detection
functions are now combined after applying Gaussian blur to each onset
function individually. This improves the overall agreement between the
onset functions.
> Hyperbolic tan function is used to map saturated pixels to the range
[0, 1]
> Added a new rainbow generation function with more options than the old
one.
> Refactored most of the led update functions.
> The LED brightness is now being plotted instead of onsets
Led update functions no longer return a colorized array. Colorizing is
now done in led_visualization. It makes more sense for the led_update_X
functions to return 1D brightness arrays and then to apply color
afterwards. This should also improve performance somewhat. Also added a
new function leak_saturated_pixels() which allows saturated colors (>255
value) to leak into the adjacent color channels
Led update functions now return an array of pixel values instead of
updating the LED strip directly. This change makes it possible to
combine the effects of different LED update functions before updating
the LED strip. The function responsible for updating the LED strip is
led_visualization()