TobKra96 / music_led_strip_control

Audio visualization for LED strips in real-time with web interface on a raspberry pi.
https://tobkra96.github.io/music_led_strip_control/
MIT License
297 stars 64 forks source link

Odd numbers of LED cause error on multiple effects #148

Closed TobKra96 closed 2 years ago

TobKra96 commented 2 years ago

hi, i just run sudo python3 main.py >> ~/logfile.log 2>> ~/error.log and the error.log is populated with the following

ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM dsnoop:1 ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM dmix:1 Process Process-1:2: Traceback (most recent call last): File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/share/music_led_strip_control/server/libs/effect_service.py", line 104, in start self.effect_routine() File "/share/music_led_strip_control/server/libs/effect_service.py", line 168, in effect_routine self._initialized_effects[self._current_effect].run() File "/share/music_led_strip_control/server/libs/effects/effect_fireplace.py", line 128, in run self.sparks_target_new_spaks_length = randint(sparks_min_length, sparks_max_length) File "/usr/lib/python3.9/random.py", line 339, in randint return self.randrange(a, b+1) File "/usr/lib/python3.9/random.py", line 317, in randrange raise ValueError("empty range for randrange() (%d, %d, %d)" % (istart, istop, width)) ValueError: empty range for randrange() (6, 4, -2)

-Fireplace -Power -Beat twinkle

There are 143 LEDs and i have set the middle to 71

Teraskull commented 2 years ago

Fixed the issue with Fireplace effect. Cannot reproduce Power and Beat Twinkle issues with these values (143, 71).

Teraskull commented 2 years ago

Closing because cannot reproduce with provided values.