Dev kit for creating audio visualizations for hyperion.
sudo apt-get install libgstreamer1.0-0 gir1.2-gstreamer-1.0 gir1.2-glib-2.0 gir1.2-gst-plugins-base-1.0 gstreamer1.0-plugins-good gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-pulseaudio python-gi
sudo apt-get install python-tk
sudo apt-get install python-pip
sudo pip install -r requirements.txt
(or use virtualenv if you like)options snd-aloop index=-2
in end of /etc/modprobe.d/alsa-base.conf
to prevent loopback device for getting first card indexmodprobe snd-aloop
(and type line snd-aloop
to /etc/modules to make it permanent).asoundrc
to your home folder (backup old if exists) and change the soundcard index if needed ("hw:<card>,<device>"
, check aplay -l
) *sudo alsa force-reload
python main.py
with options:
--config=<path>
path to hyperion config file (defaults to ./hyperion.config.json
)--gui
for gui--json
for network connection (--host=<ip> --port=<port>
)--help
to see all optionsdtparam=audio=on
to /boot/config.txt
.
sudo apt-get install libgstreamer1.0-0 gir1.2-gstreamer-1.0 gir1.2-glib-2.0 gir1.2-gst-plugins-base-1.0 gstreamer1.0-plugins-good gstreamer1.0-tools gstreamer1.0-alsa alsa-base alsa-utils python-gi python-pip
sudo apt-get install git
) and clone this repo (git clone https://github.com/RanzQ/hyperion-audio-effects.git
), or just download as zip and extractcd hyperion-audio-effects/ && sudo pip install -r requirements.txt
options snd-aloop index=-2
in end of /etc/modprobe.d/alsa-base.conf
(the file doesn't exist, just create it) to prevent loopback device for getting first card indexsudo modprobe snd-aloop
(and type line snd-aloop
to /etc/modules to make it permanent).asoundrc
to your home folder and change the soundcard index on line 21 if needed (check aplay -l
, for me "hw:0,0"
works, this depends on if you use usb-audio etc.)sudo apt-get install mpd mpc
.
mpd
, I needed to copy the alsa config to be global sudo cp .asoundrc /etc/asound.conf
/var/lib/mpd/music
run mpc ls | mpc add
to add all files to playlist, then mpc play
(check mpc help
for all commands).amixer cset numid=3 2
(HDMI) / amixer cset numid=3 1
(Headphone)cd hyperion-audio-effects/
python main.py --effect vumeter
"band-width-exp": 4-5
but uses quite a lot of CPU. python main.py --effect color_spectrum
config.json
and just run python main.py
x
and entereffects/
(e.g. myeffect.py
and myeffect.json
) and then it can be passed as --effect=myeffect
(json values can be read from hyperion.args
like in normal hyperion effects)spectrum_dump.py
for explanation of parameters for GstSpectrumDumpvumeter
and bands
you can adjust the type of received magnitudes (self.magnitudes
)
vumeter=True
you get 4 magnitudes which correspond to peaks and decays for the L/R channelsvumeter=False
you get spectrum magnitudes for the amount of bands
(defaults to 128)self.ledsData
according to values in self.magnitudes
(I've done it in method update_leds()
)band-width-exp
, if you have performance issues, try with higher values (it sets FFT bin size to 2^x Hz, e.g. 2^3 = 8 Hz, affects on bass accuracy)mirror
to false if you want to use whole strip instead of splitting and mirroringhue-from
and hue-to
parameters (0.0-1.0
)matrix
{
"json": false,
"proto": true,
"effect": "color_spectrum",
"config": "/etc/hyperion/hyperion.config.json",
"host": "localhost",
"port": 19445,
"audiosrc": "autoaudiosrc",
"interval": 50,
"matrix": true
}
Pull requests are welcome but try to follow the style in existing code and check yours using pylint (.pylintrc
included).
* Check this if you have pulseaudio: #4
** Windows istructions were removed since performance was poor due to the fact that Gstreamer is meant for Linux