This is incredibly instructive - for me anyway!
- You might be the first person to use the new palettes feature!
I can immediately see a really nice new feature - “SET DEFAULT PALETTE”. If you had that you’d lose half a dozen lines of code or more.
Nice! Yeah, that’d been a nice touch. In truth, the amount of actual code to the results is super small so I wasn’t hurting. The bigger pain point was finding where it was supported and which animations didn’t yet use it. Glad seeing it used is helpful.
- Question - I see you’re using numpy colorlists (because you have the numbers: float32 section enabled). Did you notice any performance differences with that?
It’s particularly noticeable in real-time things like fades for me, less so in other things.
I don’t think I was using a fade at the time I switched, but I did see it improve. It absolutely wasn’t slower so I went with it based on your comments in docs. I haven’t seen any problems with it.
- Pro-tip - for re-use!
Consider dividing this into two .yml files:
File base.yml:
shape: 160
driver:
typename: SPI
ledtype: WS2801
interface: PERIPHERY
c_order: RBG
numbers: float32
layout:
typename: strip
brightness: 50
palettes:
halloween: [lime, orange, purple]
and animation.yml:
animation:
typename: .sequence
length: 30 # Seconds before switching to next item in the sequence
animations:
- typename: $bpa.strip.Wave
color: lime
- typename: $bpa.strip.Searchlights
palette: halloween
- typename: $bpa.strip.ColorPattern
palette: halloween
- typename: $bpa.strip.LarsonScanners.LarsonScanner
color: orange
- typename: $bpa.strip.PixelPingPong
palette: purple
fade_delay: 50
- typename: $bpa.strip.Rainbows.RainbowCycle
palette: halloween
- typename: $bpa.strip.LarsonScanners.LarsonRainbow
palette: halloween
- typename: $bpa.strip.PartyMode
palette: halloween
Then you can run your project like this:
$ bp base.yml + animation.yml
Three big advantages:
- You can have have the same strip and different animation files halloween.yml arbor-day.yml new-years.yml
- You can keep adding to your palettes and aliases so they’re always available in all your projects.
- You can quickly “audition” new animations from the command line - like this:
$ bp base.yml + ‘{animation: $bpa.strip.Rainbows.RainbowCycle}’
You can divide your project up into lots of tiny files that way. I have a document planned detailing workflow, when I get past these somewhat obscure bugs I’m working through (POV, who knew that existed? :-D)
Oh, this’ll be really useful for my bigger project where these lights will ultimately land. Also, see how that audition feature would have been useful as I was trying to figure out options for animations as well. Thanks!
···
On Friday, November 2, 2018 at 9:23:55 AM UTC-6, Tom Swirly wrote:
On Fri, Nov 2, 2018 at 4:04 PM Josiah Ritchie josiah....@gmail.com wrote:
I used this little project code to add a little fun to the office halloween party. It took me awhile to figure out sequence and some other things so I thought I’d share so other searches might find.
shape: 160
driver:
typename: SPI
ledtype: WS2801
interface: PERIPHERY
c_order: RBG
numbers: float32
layout:
typename: strip
brightness: 50
palettes:
halloween: [lime, orange, purple]
animation:
typename: .sequence
length: 30 # Seconds before switching to next item in the sequence
animations:
- typename: $bpa.strip.Wave
color: lime
- typename: $bpa.strip.Searchlights
palette: halloween
- typename: $bpa.strip.ColorPattern
palette: halloween
- typename: $bpa.strip.LarsonScanners.LarsonScanner
color: orange
- typename: $bpa.strip.PixelPingPong
palette: purple
fade_delay: 50
- typename: $bpa.strip.Rainbows.RainbowCycle
palette: halloween
- typename: $bpa.strip.LarsonScanners.LarsonRainbow
palette: halloween
- typename: $bpa.strip.PartyMode
palette: halloween
–
You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.
To post to this group, send email to maniacal-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/6757b1be-0cb7-432b-b0e0-fc4119a52a9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
–
/t
https://tom.ritchford.com
https://tom.swirly.com