Daily effects #2
Replies: 35 comments 19 replies
-
Daily effect, December 1 - Twinkling starsHere is the first daily effect. A simple effect to start with. It is similar to the Star effect in the Twinkly app. However, in the app all stars have the same purple-tinted sharp white color ("Twinkly-white"). Here instead the stars have different color temperatures, from warm, through neutral white to cold - just like real stars. Make sure you have installed xled_plus somewhere where python can find it. Connect your Twinkly to the network. Start a python prompt and input the following three lines:
|
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 2 - WaterBluish, greenish and white, like glittering water in a pond. Similar to what can be achieved by the Glow effect in the app, but colors change into each other instead of just pulsing, and the transition to the first frame is smooth, rather than with that annoying glitch you get with the effect in the app. Input the following to python:
Alternatively, if you have upgraded to the latest version of xled_plus today, you can launch it with: |
Beta Was this translation helpful? Give feedback.
-
Hey. Hey, Thanks, |
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 3 - GoldSimilar to the Sparkles effect in the app, of bright flashing leds against a solid background. This example is meant to mimic the "metallic luster" effects of AWW leds, i.e glittering gold.
|
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 4 - Tinted white gradientSlowly changing gradient between two complementary light colors, such that the middle stays white and the colors above and below traverses the spectrum on opposite sides. This effect uses the physical layout of the leds. It only uses one coordinate though (y-axis), so it should work for 2D, 3D, or linear layouts. (Older firmware do not store the layout on the leds. For them the effect will follow the string instead.)
Or update to latest version and run This pattern is not trying to mimic anything from the app. Rather, this is not easy to achieve on the app. |
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 5 - Dark to light colorsGradient from dark to light of a slowly changing hue across the spectrum.
The same principle as yesterday is used, just another function to calculate the color. |
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 6 - Flash with mixed colorsLight colors starting with a flash and then fading out.
This one uses a "predefined" class of effects, SparkleEffect, which is highly customizable. The number 4 above is the average number of new "sparks" per time point, then follows a callback function for providing the color of new sparks, and then a callback function for how to evolve that color over time. There are some predefined alternatives, as the ones above, taking different parameters. You will see more alternatives coming days. But if you think there are too many chaotic colors in today's pattern, you can experiment with adding a parameter |
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 7 - Breathing selected colorsAnd then an attempt to mimic a pattern from the app again. This is actually more similar to the Glow effect on the app than the Day 2 example: Each led stays the same hue but varies in brightness. The hues are picked from a fixed list. Differences from Glow on the app are: The color positions are random and not regular, and (just as in the Day 2 example) a smooth transition to the first frame. You can select other colors by changing the cols list below. A second example is provided, remove the # in front of the line to see it. Colors are given as (hue, saturation, lightness) where hue and saturation has range [0, 1] and lightness range [-1, 1] where -1 is black, +1 is white, and 0 the most colored.
Actually I give you two color variants of this effect. If you don't like the first colors, try the second variant:
And if you didn't like that one either - produce your own: Check out the interactive color picker checked in with today's version of xled_plus: #5 |
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 8 - Flash with pair of slowly changing colorsSparkling effect, starting with a flash and fading out, just like Day6,
I just had to complicate things a little more - was not happy with the limitations posed by the color generating functions I added in "effects.py", so I wrote a new one, letting two colors traverse the spectrum at fixed distance from each other. You can play with the distance if you like, its the argument that is 0.25 above. |
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 9 - Pulselights greenSmoothly pulsing lights with random colors from the green spectrum.
Using SparkleEffect just like yesterday and day 6, but now with pulselight_func instead of flashlight_func. Also, adjusting some parameters to make the lights change smoother (frames per second to 12, and increase the number of pulselight steps correspondingly). The calculation of nsparks which was missing before, is to adapt the density of sparks to the size of your led lights (ie number of leds). |
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 10 - Pulselights pinkSame principle as yesterday, but now smoothly pulsing lights with random colors from the pink spectrum.
Yes I know - you are quick learners and already knew how to do this one. But then, if you find the color scheme too ghastly, you know that you can play with the parameters in the call to
|
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 11 - Gradients of yellowGradients of yellow, green and orange sweeping diagonally over the lights.
|
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 12 - Gradients of blueGradients of blue, green and purple sweeping over the lights in rotating direction. Note: you need to update the installation to today's version (0.1.13),
And if you get dizzy by the rotation, you know what to do - just set the "torque" parameter to zero. Note however, if you play with other values of "torque", that it is currently not so user friendly: you have to make sure yourself that it makes a whole cycle during the length of the movie. "speed=0.04" means that it takes 1/0.04 = 25 seconds for the whole cycle, and the torque is given in degrees per second, so in 25 seconds it makes 25*7.2 = 180 degrees. We would thus need 50 seconds to go all way around. With 8 frames per second (the default) that requires 400 frames. Thus the explicit setting of "preferred_frames". So you can try to set torque to 4.8 and preferred frames to 600, that should also work. Sorry for the math. |
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 13 - FireSaint Lucia day, and the trees are on fire.
Some of you may already have found this effect among the predefined effects in "effects.py". (If you find a particularly beautiful combination of colors, you are of course welcome to share it here.)
|
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 14 - Looping lights, red, magenta, greenAnother variant of SparkleEffect, this time each led "looping" from black
|
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 20 - KaleidoscopeSlowly changing symmetric pattern of random colors.
There will be a number of effects along these lines now, based on moving shapes. The principle here is quite similar to the December 18 effect with randomly moving shapes of random color. However a light background is added and a slice of the scene is mirrored to get the symmetry. Small details that make a huge difference in the appearance! |
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 21 - MoonIt is winter solstice - the longest night of the year. Again, gives best effect on a fairly dense 2D layout, and adjust the aspect ratio below if you need.
|
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 22 - SnowflakesFalling snowflakes against a purple-blue background.
|
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 23 - CrystalGlittering white crystal, yet shimmering in all colors at once.
|
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 24 - Christmas Tree BallsColored balls moving against a glittering white background. Note: This is not the last daily effect! I will continue for the rest of December. Tomorrow there will be quite another kind of effect. So check in again!
|
Beta Was this translation helpful? Give feedback.
-
Merry Christmas Anders |
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 25 - Random walk through color spaceUp until now all effects have uploaded movies onto the device, by using This possibility opens up for effects which are not easily squeezed into a movie, either because they are too long to fit within the device's movie capacity, or because it is hard to guarantee a smooth transition back to the first frame after a fixed number of frames. In the following days a few such effects will be explored. It requires a steady connection to the leds, and that your computer can be awake, feeding them. The code sleeps between frames though, so the burden on the load should be limited. (All the following effects can be launched as movies too, if you have no to let your computer feed them continuously - but they will not vary indefinitely and the transition back to the start will not be smooth.) First out is a random walk through color space - a solid color that changes randomly throughout all of color space and never returns with exactly the same sequence. However, it changes so slowly that it is hard to see when it changes if you look at it, but whenever you do something else and then look back, it has a different color.
And if you really prefer the non-continuous variant, you get it the "usual" way below. It will then make a sudden jump to gray and repeat itself after about 42 minutes.
|
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 26 - Random walk with complementary colorsA variant of yesterday's effect, with a gradient between a randomly changing color and its complement. May be reminiscent of the Day 4 effect, but the colors wander randomly.
|
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 27 - Infinite KaleidoscopeSlowly changing symmetric pattern of random colors, this time in continuous mode, so it never repeats.
|
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 28 - FlowersDifferent colored flowers that bloom from the center.
I will eventually add the recent days' effects into the main python files - these "snippets" of code are beginning to get ridiculously long... |
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 29 - Bouncing ballsBalls of slowly changing colors, bouncing over the breathing white leds.
|
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 30 - Random walk in colorspace with random gradient directionAnother variant of the Day 25 effect. Here the colors form a gradient that moves over the leds at a slowly and randomly changing angle and change rate.
|
Beta Was this translation helpful? Give feedback.
-
Daily effect, December 31 - FireworksMy take on the fireworks theme. Colored blobs growing and sparkling and fading away. Again a continuous effect. You can convert it the usual way to a movie effect though, but it will be quite repetitive. Maybe I should have waited with publishing this until tonight. However, please turn your leds off when the real firework starts! The leds come to their own best when there is no competition... or lets call it light disturbance. Here is the simple version:
And here is the version for larger 2D installations. The only differences are in the FireworksScene class.
|
Beta Was this translation helpful? Give feedback.
-
Happy new year!I hope you have enjoyed this expose of sample effects possible to produce by xled_plus!
As you probably noticed, some effects were written on the fly the same evening as published, some containing bugs that had to be fixed afterwards, some requiring simultaneous changes in the main package files. I have now some cleaning up to do, to include the larger new classes in the main package files, and document it all much better. Maybe I will write a proper tutorial and publish in the discussion forum. My hope is that the package will become useful and easy to use. I have a vague idea to provide some sort of GUI too, so simper effects can be produced without needing to deal directly with python. If you manage to play with these examples and come up with a pattern that you find extra beautiful, or suggested modification of a class, or entirely new effect, please contribute it in the forum, and maybe I will add it to the collection. The idea is to maintain a large collection of possible effects. I will also clean up and rename the samples from "dayN" to something more descriptive. Again I wish you a Happy 2022, and see you around in the forum! / Anders |
Beta Was this translation helpful? Give feedback.
-
You notice that I have not posted any new effects since 2021. Other things came in between. Cleaning up and renaming the effects to descriptive names also remains, and I still hope to do that. But what I have done is the ColorControl python program, which lets you create your own daily effects in an interactive GUI. Check it out: #29 |
Beta Was this translation helpful? Give feedback.
-
Of course you can not have the same pattern on your lights several days in a row - what will the neighbors think: That you are lazy, or that you don't really care about your lights? On the other hand, you should not switch more often than once a day, to make sure that all the neighbors have a chance to see and admire it. 😉
I intend to publish here a kind of "advent calendar", from December 1 to December 24, of daily effects for your lights that you can produce with this package. Some are straightforward and you can find them in the code yourself, whereas others are variants that require some further lines of code. My focus is on beautiful effects, not just (tastelessly) flashy. But the taste can of course vary.
Some effects will be similar to what you can achieve with the app but not exactly. Most will however be unique and impossible or very difficult to mimic with the app. Either way, see it as an example collection of what you can do when taking full programmatic control over your lights!
Beta Was this translation helpful? Give feedback.
All reactions