Added per song configurations

Merged
#70 · Created  · Last updated

Merged pull request

Merged in tom_slick/lightshowpi (pull request #70)

fbfc619·Author: ·Closed by: ·2015-11-27

Description

  • minor update to get_free and get_swap, result just looks a little better

  • Added per song configurations config options [custom_lightshow] preshow postshow always_on_channels always_off_channels invert_channels

    [custom_audio_processing] min_frequency max_frequency custom_channel_mapping custom_channel_frequencies

    Refactoed configuration_manager.py for this, lots of changes.

    minor changes in fft.py

    check_sms.py and commands.py modified for changes in configruation_manager.py

    Some changes made in hardware_controller.py for per song configs and for changes to configuration_manager.py

    prepostshow.py minor changes for configuration_manager.py

    synchronized_lights.py, added per song configs, refactored play_song function (more modular now), added option for output sound card to config, setup for future additions.

    default.cfg added option audio_out_card

fft.py, prepostshow, and default.cfg are minor changes. check_sms and commands are a little more. check_sms imports configuration_manager and shares that with commands, so commands does not need to import it any more. All the changes in commands are related to that. The other changes to check_sms are error checking and logging.

hardware_controller, synchronized_lights, prepostshow, and fft all share a single copy of configuration_manager as well.

hardware_controller was just moving things around a little, so also minor synchronized_lights got a lot of work done to it. I refactored play_song(), breaking it down in to smaller functions that were task specific and of course added a function to handle the per song configs. I didn't know where to add the instructions for using then so I just placed a string in that function.

configuration_manager, major rewrite, it is now a class. About the only things that are the same are the sms functions (now methods) and the state section. Each section of the config is broken out separately, So adding new sections is really easy. All of the config options are processed there, so you you want a list of gpio pins just get it cm.gpio_pins, etc. for all the other options. Also you can run the configuration_manager by itself to view the config. And editor is coming soon. I am working on one using the curses module, so a user can edit there config right on the RPI and I can make it so that they can edit there per song configs with it too.

0 attachments

0 comments

Loading commits...