Code Monkey home page Code Monkey logo

lightdream-artnet's Introduction

Lightdream Artnet

Project to run lightdream-scripts code on an rpi instead.

What is Lightdream?

lightdream

Click here for more info.

Lightdream takes sequences of Artnet data, encoded as video files, and plays them back to your network. This allows me to pre-record light shows for songs and coordinate playback of the audio and visuals. This has two modes so that I can play sequenced songs or generate a light show on-the-fly using premade clips and audio detection algorithms.

This currently supports about 40 uniiverses @ 40 fps, but you can push this farther before you hit hardware performance limits.

This is not a general purpose library, but it's intended for a workflow where you already have created Artnet data video files by using Lightjams Recorder or equivalent.

Features

  • sends out artnet data
  • autoplay mode
  • sequenced audio mode
  • metronome / calibration mode
  • filter system to modify frame data in realtime
  • Playlist Mode: Sync music files and video files.
    • Add the track info to util/track_metadata.yml and then add key.ogg to the audio folder and key.mp4 to video\sequences
  • Autoplay Mode: Play clips at random.
    • Add these clips to video\autoclips. Any .mp4 files should get picked up.

Setup

After running once, you'll have a config.yml file to work with. Check util/config.py for descriptions of the settings.

Installation Scripts

# Windows
pip install -r requirements.txt

For audio listener, you need
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
PyAudio‑0.2.11‑cp310‑cp310‑win_amd64.whl
then `pip install PyAudio‑0.2.11‑cp310‑cp310‑win_amd64.whl`


# RPi: you also need these:
pip install gstreamer-player PyGObject pycairo mesa-utils

# RPi: not sure how many of these are necessary but hey why not
sudo apt-get install gstreamer1.0-tools gstreamer1.0-pulseaudio \
  libgirepository1.0-dev libcairo2-dev gir1.2-gstreamer-1.0

# check audio output device and make sure it's not HDMI
https://www.alsa-project.org/main/index.php/Setting_the_default_device

cat /proc/asound/cards
echo -e "defaults.pcm.card 1\ndefaults.ctl.card 1" > /etc/asound.conf

How to run at startup:

cat ~/.config/lxsession/LXDE-pi/autostart 

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash

cat /etc/xdg/autostart/lightdream.desktop
[Desktop Entry]
Exec=lxterminal -e "cd ~/lightdream-artnet && python main.py; bash"


Loading an .img file onto Rpi SD card:

  • use Win32 Disk Imager
  • to minify images:
    • sudo mount -t drvfs E: /mnt/e
    • cd /mnt/e/git/lightdream-artnet
    • sudo /usr/local/bin/pishrink.sh {imagefile.img}

lightdream-artnet's People

Contributors

apachols avatar dramamine avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.