-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
122 changed files
with
129,505 additions
and
191 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,89 @@ | ||
# YALP20 | ||
yalp 20 mods | ||
YALP MVP: | ||
multi-core render | ||
fx + model notebooks/interactive preview | ||
install proc | ||
pi-fm | ||
git, merge with past hist vs. FWP + GpuPort? | ||
sms, log | ||
AP/fixed IP, easy display | ||
FPS/univlen calculator | ||
Vixen2, xLights real-time adapter | ||
eSOL MVP: | ||
audience interactivity (kids games) | ||
arch diagram | ||
|
||
# shm | ||
//ipcs | ||
//ipcs -i ### -m | ||
//ipcrm -M 0x59414c4f | ||
|
||
|
||
# Intro | ||
What, another Lightshow player? | ||
Well, yeah. :P This one has very specific use cases (described down below). (although it can may be useful in other scenarios as well). | ||
|
||
demos/videos: | ||
|
||
# getting started | ||
installation: | ||
setup: | ||
customization: | ||
startup: | ||
documentation: | ||
|
||
# github info | ||
## installation | ||
Raspbian lite, Ubuntu MATE, etc | ||
node + nvm | ||
mkdir folder; cd folder | ||
npm init #your project settings | ||
npm install --save yalp | ||
or git clone | ||
npm run setup #install dpi24 overlay; set static IP; enable AP | ||
(custom show settings) | ||
pm2 start yalp | ||
|
||
## architecture/What is it? | ||
YALP is a software-only Lightshow player. | ||
The RPi itself provides all of the hardware necessary to run a production show up to ~27K WS281X nodes (@30 FPS) or 40K nodes (@20 FPS). With the help of the dpi24 device tree overlay, the RPi GPU provides a high-speed 24-bit parallel port that generates a constantly refreshed data stream for the WS281X LEDs. | ||
|
||
arch-diagram.png | ||
ctlr-photo.jpg | ||
|
||
The primary use case for YALP was: | ||
- *highly* custom props/models | ||
- *highly* custom effects | ||
- *highly* custom scheduling and/or audience interaction | ||
- very extensible, simple, open architecture | ||
- *does not* crash; it just runs | ||
- simple experimentation/easy tinkering; can be customized/extended entirely in Javascript, no build process | ||
- text editing vs mouse + gui | ||
- software-only*, commodity hardware* | ||
|
||
## * minimum configuration: | ||
In the lab, all you need is a (headless) RPi, WS281X LEDs, speaker (if syncing to audio), power supply, and maybe a Pi breakout board. The RPi *is* the controller. | ||
For a real show, you *might* need a Pi Hat with voltage level shifters or differential (RS485) transceivers, depending on how far the LEDs are from the RPi, and of cource an FM transmitter or other audio system if syncing to music. | ||
|
||
## * commodity hardware: | ||
Treats the RPi controller as commodity/disposable. If it breaks, just replace it. (have spares on hand, like any other parts) | ||
|
||
## What it *is not* | ||
YALP is not intended to compete with other existing Lightshow hardware or software. It was designed to address a very specific usage scenario (as described earlier), although there is likely some cross-over into other hardware/software. | ||
|
||
## documentation | ||
jsnotebooks for models, fx, scheduling, audience/interactivity; incl (3D) photos of props with fx experiments | ||
|
||
# folder sttr | ||
Yalp folder | ||
├── (build) | ||
├── config | ||
├── fx | ||
├── graphics | ||
├── incl | ||
├── layouts | ||
├── models | ||
├── (node_modules) | ||
├── seq | ||
│ ├── songs | ||
│ └── tests | ||
└─── src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
- dummy credentials.js overlay file | ||
mp3data taglib, read data stream | ||
playback.js threading | ||
mp3 playlist test + schedule -> playlist | ||
vids: | ||
- rgb meteors on icicles | ||
- global color wheel w gift face + box/fence waves, angel colored | ||
- static photos for preview bkgs, wiring | ||
- Nat scene | ||
|
||
- gar reorg: | ||
- trn rm reorg | ||
|
||
- RPi: fresh install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
#node-gyp uses this file to generate a Makefile | ||
#for node-gyp info see https://gyp.gsrc.io/docs/UserDocumentation.md | ||
#file format: https://gyp.gsrc.io/docs/InputFormatReference.md | ||
#keys ending with "=" will completely replace old value | ||
#keys ending with "?" will be used only if key doesn't already have a value | ||
#keys ending with "+" will prepend to previous value | ||
#undecorated keys will append to previous value | ||
#example files: https://github.com/nodejs/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild | ||
#NOTE: node-gyp reads all uncommented entries | ||
#NOTE: after changing this file, delete build folder to remove cached info | ||
#NOTE: nvm uses an internal copy of node.gyp; https://github.com/nodejs/node-gyp/wiki/Updating-npm%27s-bundled-node-gyp | ||
#NOTE?: cflags needs node.gyp ver >= 3.6.2; see https://gist.github.com/TooTallNate/1590684 | ||
#to upgrade node.gyp: | ||
# [sudo] npm explore npm -g -- npm install node-gyp@latest | ||
{ | ||
'targets': | ||
[ | ||
{ | ||
"target_name": "yalp-addon", #3p24 | ||
# 'type': '<(library)', | ||
# 'type': 'executable', | ||
"sources": ["src/yalp-napi.cpp"], | ||
# "cflags_cc!": [ "-fno-exceptions" ], | ||
#CAUTION: cflags requires node.gyp ver >= 3.6.2 ?? | ||
#use "npm install --verbose" to verify these options are being passed correctly to compiler: | ||
"cflags": | ||
[ | ||
#"-E", | ||
#debug: "-E", #show cpp output; goes to build/Release/obj.target/gpuport/src/GpuPort.o | ||
# "-S", #generate assembler output and stop | ||
"-g", #include debug symbols | ||
"-O3", #optimization | ||
# "-O0", #no optimization | ||
"-ftemplate-depth=100", #__LINE__ used by COUNTER() | ||
"-std=c++17", "-Weffc++", #"-std=c++11", "-std=c++14" | ||
"-fPIC", "-pthread", "-fno-omit-frame-pointer", #"-fno-rtti", | ||
"-Wall", "-Wextra", "-Wno-unused-parameter", "-w", "-Wall", "-pedantic", "-Wvariadic-macros", | ||
"-fexceptions", #"-fno-exceptions", | ||
# "-DNODEJS_ADDON", #using node-gyp => want Node.js add-on | ||
], | ||
#CAUTION: check common.gypi for whether to use cflags or cflags_cc | ||
#path ~/.node-gyp/*/include/node/common.gypi/.node-gyp/*/include/node/common.gypi | ||
"cflags_cc!": #conflict with above; turn off these options (in case common.gypi turns them on) | ||
[ | ||
"-fno-exceptions", | ||
"-std=gnu++1y", | ||
], | ||
#NOTE?: node-gyp only reads *one* "cflags_cc+" here, otherwise node-gyp ignores it | ||
# 'cflags_cc': ["-w", "-Wall", "-pedantic", "-Wvariadic-macros", "-g", "-std=c++11"], #-std=c++0x | ||
# 'cflags+': ["-w", "-g", "-DNODEJS_ADDON", "-Wall", "-std=c++11"], | ||
# 'cflags+': ["-w", "-g", "-Wall", "-std=c++11"], | ||
'variables': | ||
{ | ||
# 'hasSDL': "<!(type -p sdl2-config && echo \"-DHAS_SDL\" || exit 0)", | ||
# 'hasX': "<!(type -p X && echo \"-DHAS_XWINDOWS\" || exit 0)", #for dev/debug only | ||
#NOTE: node-gyp doesn't like "type -P", so use "command -v" instead | ||
'hasSDL': "<!(command -v sdl2-config >/dev/null && echo \"HAS_SDL\" || echo \"HASNT_SDL\")", #exit 0)", | ||
# 'hasX': "<!(command -v X >/dev/null && echo \"HAS_XWINDOWS\" || echo \"HASNT_XWINDOWS\")", #exit 0)", #for dev/debug only | ||
}, | ||
'defines': | ||
[ | ||
# "NODEJS_ADDON", #using node-gyp => want Node.js add-on | ||
'NAPI_DISABLE_CPP_EXCEPTIONS', #?? https://github.com/nodejs/node-addon-api/blob/master/doc/setup.md | ||
'BUILT="<!(date +\"%F %T\")"', | ||
#runt chk only 'XWINDOWS="<!(echo $DISPLAY)"', #don't compile for framebuffer | ||
# 'XWINDOWS="<!(type -p X &>/dev/null && echo \"yes\" || echo \"no\")"', #installed, but might not be running | ||
"VERSION=<!@(node -p \"JSON.parse(require('fs').readFileSync('package.json')).version\")", | ||
"<(hasSDL)", | ||
# "<(hasX)", | ||
# "<!(command -v sdl2-configg >/dev/null && echo \"HAS_SDL\" || echo \"HASNT_SDL\")", | ||
# "<!(command -v X >/dev/null && echo \"HAS_XWINDOWS\" || echo \"HASNT_XWINDOWS\")", #for dev/debug only | ||
], | ||
'include_dirs': | ||
[ | ||
# "<!@(node -p \"require('nan')\")", | ||
# "<!(node -e \"require('nan')\")", | ||
"<!@(node -p \"require('node-addon-api').include\")", | ||
# 'include_dirs+' : ["<!(node -e \"require('nan')\")"], | ||
# "<!@(node -p \"require('node-addon-api').include\")" | ||
# "<!@(node -p \"require('node-addon-api').include + '/src'\")" | ||
# 'include_dirs+': [" <!(sdl2-config --cflags)"], #CAUTION: need "+" and leading space here | ||
# " <!(test -x sdl2-config && sdl2-config --cflags || exit 0)", #CAUTION: need leading space here | ||
# " <!@(command -v sdl2-config && sdl2-config --cflags || exit 0)", #CAUTION: need leading space here | ||
# " <!@(test -n <!(hasSDL) && sdl2-config --cflags)", #CAUTION: need leading space here | ||
" <!@(test -n \"<(hasSDL)\" && sdl2-config --cflags || exit 0)", #CAUTION: need leading space here | ||
], | ||
# 'OTHER_LDFLAGS+': ['-stdlib=libc++'], | ||
'libraries': | ||
[ | ||
# " <!@(command -v sdl2-config && sdl2-config --libs || exit 0)", #-lGL #-lSDL2 | ||
" <!@(test -n \"<(hasSDL)\" && sdl2-config --libs || exit 0)", #CAUTION: need leading space here | ||
# " <!@(test -n <!(hasSDL) && sdl2-config --libs)", #-lGL #-lSDL2 | ||
#handled by SDL? " <!@(test -n \"<(hasX)\" && echo \"-lX11 -lXxf86vm\" || exit 0)", #for dev/debug only | ||
# " -L'<!(pwd)'", | ||
# "<(module_root_dir)/build/Release/", | ||
" -lmpg123 -lao", #audio | ||
], | ||
'dependencies': | ||
[ | ||
"<!(node -p \"require('node-addon-api').gyp\")", | ||
# 'dependencies': [ 'deps/mpg123/mpg123.gyp:output' ], | ||
# "dependencies": [ "<!(node -p \"require('node-addon-api').gyp\")" ], | ||
#TODO: 'deps/sdl2/sdl2.gyp:output', | ||
# "<!(node -p \"console.log('add SDL2 compile');\")", | ||
], | ||
# 'conditions': | ||
# [ | ||
# [ | ||
# 'OS=="linux-rpi"', | ||
# '<!@(uname -p)=="armv7l"', #RPi 2 | ||
# 'target_arch=="arm"', #RPi 2 | ||
# { | ||
# 'defines': ["IS_RPI"], | ||
# 'defines': ["RPI_NO_X"], #don't want X Windows client | ||
## 'cflags+': ["-DNODEJS_ADDON"], | ||
##? 'libraries+': ["-L/opt/vc/lib", "-lbcm_host"], | ||
##? 'include_dirs+': | ||
##? [ | ||
##? "/opt/vc/include", | ||
##? "/opt/vc/include/interface/vcos/pthreads", | ||
##? "/opt/vc/include/interface/vmcs_host/linux", | ||
## ], | ||
# }, | ||
# 'OS=="linux-pc"', #else | ||
# '<!@(type -p Xxx &>/dev/null && echo \"yes\" || echo \"no\") == "yes"', | ||
# { | ||
## "xcode_settings": { | ||
## 'defines': ["UNIV_LEN=32"], #for dev/testing | ||
## 'defines': ["SHADER_DEBUG"], #for dev/testing | ||
## 'libraries': ["-lX11"] | ||
# 'libraries': ["-lX11", "-lXxf86vm"], #, "-lXext", "-lXxF86vm"] #for dev/debug only | ||
## 'libraries+': ["-lGLESv2", "-lEGL", "-lm"], | ||
# }, | ||
# ], | ||
# ], | ||
}, | ||
], | ||
} | ||
#eof |
Oops, something went wrong.