Giter Site home page Giter Site logo

ravelights's Introduction

RaveLights

ui-demo.mp4

Ravelights is a library for LED stripes or similar light fixtures. It aims to offer more interesting and advanced visual patterns than similar libraries such as LedFx and ColorChord. This is achieved by providing a rendering pipeline that is used to chain together visual generators. Through variation of the generators used and other settings, endless different visual performances can be achieved. The visual output can by synchronized with the music by using bpm (beats per minute) system.

Ravelights is written in Python and leverages Numpy for fast rendering. It runs reasonably fast and can be run on a Raspberry Pi 3B+ to control ~5000 Leds at 20 fps.

Ravelights also features a user interface written in Quasar (vue.js / rest api) for realtime interaction. Rivelights also provides various interfaces to connect different light fixtures. Currently, Serial/Artnet and UDP/Artnet transmitters are implemented, but additional transmitters can easily be added. The generated output can be routed and distributed through one ore more transmitters at the same time. For example, frames can be sent to low-level pixel driver via Art-Net.

Features

  • 30+ Patterns, Vfilters and Dimmers and Effects that can be combined to create unique visual output.
  • Web-UI offers fine grained control and programming in realtime.
  • BPM system to match the music tempo
  • Visualizer to preview the image output, without having access to the actual image fixtures

Examples

To generate image output, many patterns and effects are implemented already. More so called generators can easily be added (see usage).

lights-demo.mp4

Installation

Requirements

  • Python 3.10 environment (Windows/Linux/MacOS)
  • Linux, make port 80 work as unprivileged user:
sudo sysctl net.ipv4.ip_unprivileged_port_start=80

Git

Clone with --recurse-submodules flag for web interface submodule:

git clone --recurse-submodules [email protected]:danuo/ravelights.git
git submodule update --init    // add submodule after normal cloning
git submodule update --remote  // update submodules

Setup virtual environment

This is optional. To create a virtual environment, run

python3 -m venv .env

.env\Scripts\activate.bat  // activate on windows
source .env/bin/activate   // activate on Unix

Install python package

To install, run

pip install .[gui]         // normal installation with visualizer support
pip install .              // normal installation without visualizer support
pip install .[serial]      // normal installation without visualizer support but artnet-over-serial support
pip install -e .[gui,dev]  // editable installation with dev packages and visualizer support

Usage

Run main.py --help

Add generators

Patterns, VFilters, Dimmers and Thinners are so called Generators. They are used in combination to generate the visual output. To create a new pattern, the following steps have to be performed.

  1. Create a new class that inherits from Pattern
  2. Implement the required functions, most importantly render() for the visual output.
  3. Register the new pattern for usage in configs/components.py

ravelights's People

Contributors

danuo avatar niliha avatar

Stargazers

Mathias avatar Sean Stevens avatar Björn Rave avatar  avatar

Watchers

 avatar

ravelights's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.