xLightsSequencer / xLights

xLights is a sequencer for Lights. xLights has usb and E1.31 drivers. You can create sequences in this object oriented program. You can create playlists, schedule them, test your hardware, convert between different sequencers.
GNU General Public License v3.0
554 stars 209 forks source link

Value curves set to random don't honor the set number of points selected #4803

Open fone626 opened 1 month ago

fone626 commented 1 month ago

When you set a value curve to random and the number of points to a low number, in my case, 1, the graph shows a randomly chosen flat line, so I expect the value to be randomly chose but stay flat for the length of the effect, but what you actually get is a new random number per frame so your effect jumps around violently. This appears to affect all the value curves for all the effects (at least all the ones I've tested).

Steps to reproduce the behavior: Create a new sequence select any effect, but in my case single strand set Chase types to static left-right Then set the value curve on offset to random and then number of points to 1. the graph will show a flat line. after clicking OK the preview will show a line randomly jumping all over the model, instead of just picking a random location and not moving for the duration of the effect.

derwin12 commented 1 month ago

it recalcs a random number on each frame. Not saying that is right, but that appears to be what the code does.

fone626 commented 1 month ago

That's what I was guessing, but it doesn't do what it visually says it will do, and if it's going to recalculate at every frame there is no point in having the points setting. It appears to be working incorrectly to what was intended but if it is then can a setting be added to not recalculate every frame, because it would make it a lot more useful to everyone.

kylegrymonprez commented 1 month ago

I added https://github.com/xLightsSequencer/xLights/pull/4858 which should be something that can be used here. Generate a new timing track and mess with the values to 'look' random. Then this can be pointed to using the timing track in the value curve setting.

fone626 commented 1 month ago

I added #4858 which should be something that can be used here. Generate a new timing track and mess with the values to 'look' random. Then this can be pointed to using the timing track in the value curve setting.

While useful, a randomized timing track doesn't accomplish what I need for my use case.