Commit Graph

11 Commits

Author SHA1 Message Date
Scott Lawson
4b6f9a807b Fixed bug where some FPS values raised exceptions
Fixed a bug where certain config.FPS values would result in arrays with
mismatched dimensions. The mismatched dimensions occurred because an
integer was rounded instead of truncated. This is now fixed and
exceptions should no longer be raised when certain FPS values are used.
2017-01-03 16:09:39 -08:00
Scott Lawson
e09578da1d Updated dsp.py and led.py to be Python 3.5 compatible 2016-12-27 03:06:57 -07:00
Scott Lawson
6f98d31096 Removed function that is no longer needed 2016-12-24 22:54:43 -07:00
Scott Lawson
1e630f2151 Removed two DSP functions that are no longer needed 2016-11-21 20:11:16 -08:00
Scott Lawson
b65989c8f1 Removed some dsp module functions that are never called 2016-11-13 01:09:47 -08:00
Scott Lawson
627f67d3dd Added ability to change mel filterbank at runtime 2016-11-11 15:52:00 -08:00
Scott Lawson
65d35c2724 dsp module now creates a mel filterbank
Mel filterbank generated based on settings in config.py. Other small
pep8 formatting changes. Renamed ExponentialFilter to ExpFilter.
2016-11-07 17:41:26 -08:00
Scott Lawson
262206d359 Major changes to onset detection and 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
2016-10-24 16:42:03 -07:00
Scott Lawson
d966bb878d Complete rewrite of most sections, added new onset detection 2016-10-22 21:55:22 -07:00
Scott Lawson
17313c254b Major refactoring and update
* Moved all module settings to a new config.py file
* Completely overhauled visualize.py and added a new radiate effect that
colours the radiative beats according the beat frequency.
* Improved some constants like the decay constant to be parametric so
that they scale to any led strip size
* Added temporal dithering to Beat.update_pixels() so that it now
supports fractional speed values. Being limited to integral values was
starting to become a problem.
* Overhauled and simplified the LED module.
* When updating pixels, the LED module no longer sends UDP packets for
pixels that have not changed. This optimization reduces the packet load
significantly and should allow for higher refresh rates.
* Renamed lookup_table.npy to gamm_table.npy to better reflect that the
table is used for gamma correction of the LED strip
2016-10-13 22:27:45 -07:00
Scott Lawson
028500f04e Initial commit
Initial commit of working python and ESP8266 code.
2016-10-12 14:50:00 -07:00