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

Future of project? #37

Open
ahodges9 opened this issue Jun 21, 2018 · 4 comments
Open

Future of project? #37

ahodges9 opened this issue Jun 21, 2018 · 4 comments

Comments

@ahodges9
Copy link
Contributor

Matt is back! I figured I would start up a discussion around the best way to evolve this. I have been (slowly) working on a pretty much complete rewrite on the base for this that is friendlier to develop in and more expandable. I should hopefully be able to share something soon, but there obviously a lot of missing functionality (like a UI, and only a few effects) currently. However, effects get boiled down to a few lines of human readable code.

Here are a few of the issues I currently think should be addressed hopefully soon rather than later:

  • Its nearly impossible to understand and read most of the code base. The shear amount of [][][][][] everywhere just makes the development experience terrible. I know most of this code was just inherited from the fork, but it could use a new foundation.
  • Some of the effects are just extremely over complicated (mostly due to the above issue) and there is just a lot of repeated code that could benefit from some solid base classes
  • Extending the current code to support different types of input, like video streams, would require a lot of refactor.
  • Threading model needs some work as it is very easy to get stuck flushing pixels causing buffer overflows
  • Code organization is also a problem as 95% of the code base is just in main.py
  • No infrastructure for things like requirements, pip installs, or testing making it more difficult for new users to get going. Should just be a simple pip install systematic-leds or setup.py script until things get more flushed out.
  • PyQt is great for desktop applications, but "headless" is really what most people seen ti want. Ideally you just have this running on some raspberry pi tucked behind whatever you use to play music with a direct audio line in. That means if you want remote control you need some REST or MQTT style interfaces for 3rd party software (i.e. HomeAssistant) to plug into. Additionally, there probably needs to be a web-based UI that can be used for setup and debugging. The server can just dumps the visualization graphs to websockets, and the client can handle the heavy lifting.

Overall, I see a lot of potential in this project and the effects produced are incredible, but I feel there are some drastic changes that are needed to get it on the right path. What are everyone's thoughts of this? How many people would be able and willing to contribute?

@ahodges9
Copy link
Contributor Author

ahodges9 commented Jul 2, 2018

So, I just pushed the initial version to github which don't support nearly everything that is currently supported here, but it does add a good amount of features and is more manageable. Its designed to run headless, and the entire UI is just a website that still allows for realtime visualization.

Main features:

  • Web Interface for control and visualizations
  • Effect (and Device) configuration Schema's that allow for easily adding new effect properties
  • Nested effect schema's that allows for generic properties like "morrior", "flip" and "blur" to be set for any effect, while other properties like "gradient", "gradient_roll" to be set for gradient effects
  • Multiple device support, while still maintaining good performance. A single melbank curve is calculated for all effects and upsampled as needed. These are all cached as well, so having 50 devices with the same LED count, has very litter perf impact on top of a single one.

Big features missing:

  • Supported Devices: I only added support for the device I had which is a ESP8266 running ESPixelStick.
  • Supported Effects: I only added enough effects to finalize the design and have a proof of concept. This include a few non-reactive effects and some reactive ones. I still need to factor out some of the common filter updates
  • Effect Configuration: Everything is based on JSON Schemas, but I have no easy Web UI for this. In the meantime there is a text box for specifying the configuration JSON. i.e. you can set the config for Waveform with {"mirror": True, "gradient": "Dancefloor"} which will give you a different gradient mirrored on the strip

Take a look https://github.com/ahodges9/LedFx

@not-matt
Copy link
Owner

Good stuff man! Really like what you've done. It definitely needed some cleaning up, and a rewrite was in order. I've got very little experience with large projects like this, so it was getting a little out of hand...

I'm mostly interested in making effects and the audio processing side of things, but found I was getting bogged down in everything else.

@ahodges9
Copy link
Contributor Author

This is my first large open-source project and really first time dabbling in a lot of this world, however I have a ton of experience working on large projects just typically in C/C++. I am quite enjoying the "everything else" in this project and its giving me an excuse the learn python, js, and a bunch of web technologies.

I encourage you to take a look at the project and see the difference with adding effects to it. It should be significantly easier and you get a bunch of things for free. I tried to design things to be as extensible as possible. The effects part is actually what interest me the least (from a coding standpoint) so would be great to have someone assist in that side of the world.

@not-matt
Copy link
Owner

not-matt commented Jul 20, 2018 via email

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

2 participants