Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualization Stuck #40

Closed
5eed opened this issue May 21, 2019 · 5 comments
Closed

Visualization Stuck #40

5eed opened this issue May 21, 2019 · 5 comments

Comments

@5eed
Copy link

5eed commented May 21, 2019

This affects 0 volume inputs , e.g. from virtual audio devices (direct playback from audio output). Occured while routing audio with Volume Control from PulseAudio in Linux.

Affected Code in ledfx/effects/audio.py:
self._volume = aubio.db_spl(self._raw_audio_sample) self._volume_filter.update(self._volume) - line 155-156

If you look up aubio.db_spl function https://aubio.org/manual/latest/py_utils.html, it is calculating the Sound Pressure Level by using log - resulting in -inf, if 0 input volume is provided, which is then used to update the volume_filter

Once -inf is applied to ExpFilter Implementation of Scott Lawson it will keep this value, even if volume rises again after an 0 volume intput (song change, ...) -> disabling all further audio processing, since -inf is always smaller than the min_volume (default -70)

if self._volume_filter.value > self._config['min_volume']: #process audio

Possible Solution:
Add a check between lines 155 to 156:
if self._volume < self._config['min_volume']: self._volume = -0.1 # set it to other value than -inf

@richyxi
Copy link

richyxi commented May 21, 2019 via email

@5eed
Copy link
Author

5eed commented May 26, 2019

You mean the visualization in general or the suggested fix? - Works both for me

@richyxi
Copy link

richyxi commented May 26, 2019 via email

@spattinson
Copy link

This fixes my issue of getting no output at all on any of the audio reactive effects apart from gradient and one other. Thanks

@ahodges9
Copy link
Owner

Thanks! Fixed in the dev branch should be integrating dev into master soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants