RanzQ / hyperion-audio-effects

Hyperion audio effects dev kit using Gstreamer
MIT License
47 stars 8 forks source link

Added 2 new effects, added asound with mic source, improvements in ex… #17

Closed alexanderFell closed 7 years ago

alexanderFell commented 8 years ago

Added 2 new effects, added asound with mic source, improvements in existing effects

Added new effects: 1) strobe which makes all LEDs blink, once a threshold has been crossed. Since I currently use a microphone attached to an external USB soundcard, I can control the sensitivity using alsamixer (Capture) 2) The effect "allEffects" checks the config file for existing effects and can switch among them randomly.

Added asound.conf with mic source I added another asound.conf file, which uses the microphone attached to an external USB sound card (hw:1,0) The user can currently choose among them, depending on the needs.

I also removed .asound.conf, since the normal user does not see it usually.

Improvements in existing effects: VUMeter:

all existing effects: Added a check, if the module is invoked by another module (e.g. allEffects) or the main

main.py: Now the capitalization of the exit command does not matter. I tend to write capital X, do not know why.

Alex

RanzQ commented 8 years ago

@alexanderFell thanks for the PR. Could you update the README a bit though? Cause now it conflicts with the changes you made (no more .asoundrc)

alexanderFell commented 8 years ago

@RanzQ Readme.md adapted. Please have a look over it and let me know, if it fine. In addition, I added absolute paths to the main.py, so that I can call it from anywhere. In fact I wrote a little HTTP server for that (and more). (Enhancement #13)

Btw, the PR will remove bug #11 as well.

RanzQ commented 8 years ago

It looks good, I'll test the new effects and merge. I've got something broken on my dev machine atm so wasn't able to launch this (even my own master).

RanzQ commented 8 years ago

I tried the "strobe" effect with two of my configs (only using --gui, got no leds attached to this machine), first config blinked only one led like this:

image

Other config has less leds but it throws an error:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1535, in __call__
    return self.func(*args)
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 586, in callit
    func(*args)
  File "/home/ranzq/workspace/hyperion-audio-effects/app/gui.py", line 60, in update_leds
    change_color(canvas, led, i)
  File "/home/ranzq/workspace/hyperion-audio-effects/app/gui.py", line 70, in change_color
    b = hyperion.get_led_data()[3 * led_number + 2]
IndexError: bytearray index out of range

Both of my effects work but this might be a bug in my code too. I can upload the configs if you need for testing.

RanzQ commented 8 years ago

I added a .pylintrc now. Please rebase your fork and check all your python files with pylint. For example pylint effects/strobe.py -rn. Or use a SublimeLinter plugin like me. Files in lib/ can be ignored since they are imported.

Let me know if there are some rules that are too annoying, disabled ones are in .pylintrc and you can check the full list using pylint --list-msgs.

RanzQ commented 7 years ago

Closing this for due to inactivity.