Author Topic: Nutcracker - newbie confused on Spiral generation.  (Read 2229 times)

Offline dpitts

  • Restrictive
  • Sr. Member
  • *
  • Posts: 466
Well I am copying/making my spiral effect. The generated animation looks exactly as I want. The spiral is red, white and blue. The parameters are listed below.

Questions

1)  How does the program generate the blue when that color is not defined in the parameters? Internal VooDu magic? :).

2)  The sequence duration is defines as 9 seconds but when I import to LSP it imports in as at least 50 seconds or more. I do not know because their is only 50 seconds left of the sequence where I paste it in. The timing marks it creates are all 1 second long. I would think they would need to be shorter.

So far I am impressed with the Nutcracker great work Sean.
 

Effect Settings
username   dpitts
user_target   MEGATREE
effect_class   spirals
effect_name   REDWHITEBLUE_BARBERPOLE
handiness   R
number_spirals   3
number_rotations   2
spiral_thickness   3
window_degrees   360
start_color   #FF0000
end_color   #FFFFFF
frame_delay   100
direction   ccw
sparkles   0
use_background   n
background_color   #FFFFFF
show_frame   n
effect_type   S
seq_duration   9
fade_in   
fade_out   
submit   Submit Form to create your effect
OBJECT_NAME   spirals

Offline urthegman

  • Sr. Member
  • ****
  • Posts: 960
Re: Nutcracker - newbie confused on Spiral generation.
« Reply #1 on: August 19, 2012, »
I usually find it is even longer than 50 seconds.

Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
Re: Nutcracker - newbie confused on Spiral generation.
« Reply #2 on: August 19, 2012, »
You are not allowed to view links. Register or Login
Well I am copying/making my spiral effect. The generated animation looks exactly as I want. The spiral is red, white and blue. The parameters are listed below.

Questions

1)  How does the program generate the blue when that color is not defined in the parameters? Internal VooDu magic? :).

2)  The sequence duration is defines as 9 seconds but when I import to LSP it imports in as at least 50 seconds or more. I do not know because their is only 50 seconds left of the sequence where I paste it in. The timing marks it creates are all 1 second long. I would think they would need to be shorter.

So far I am impressed with the Nutcracker great work Sean.
 

Effect Settings
username   dpitts
user_target   MEGATREE
effect_class   spirals
effect_name   REDWHITEBLUE_BARBERPOLE
handiness   R
number_spirals   3
number_rotations   2
spiral_thickness   3
window_degrees   360
start_color   #FF0000
end_color   #FFFFFF
frame_delay   100
direction   ccw
sparkles   0
use_background   n
background_color   #FFFFFF
show_frame   n
effect_type   S
seq_duration   9
fade_in   
fade_out   
submit   Submit Form to create your effect
OBJECT_NAME   spirals

I notice that when i sometimes have a pattern when i drag it to the timeline in LSP , the single cell i have in my effect is shown as 10 frames in LSP.

I havenet figured out why it sometimes does this. i am trying different effects to see if i can tell what magic make it work.

as far as the blu, i used to have magic in the code (If you do 3 spirals i hard coded RED, WHITE BLUE).

Now with the new release of spirals with a 6 color palette that voodoo has been removed. You pick the 3 colors you want for a 3 spiral effect.
Sean
Littleton, CO
Latest releases You are not allowed to view links. Register or Login
xLights/Nutcracker Forum You are not allowed to view links. Register or Login
Fbook You are not allowed to view links. Register or Login

Offline dpitts

  • Restrictive
  • Sr. Member
  • *
  • Posts: 466
Re: Nutcracker - newbie confused on Spiral generation.
« Reply #3 on: August 20, 2012, »
Sean,

I created small pattern in LSP 2.5. It is two tracks that turn red, white then blue. The color switches every 1/10 second for 1 second.

The effect used mostly is effect type '3'. The nutcracker file was using mostly type '7'. I have attached the file.


Offline bajadahl

  • Full Member
  • ***
  • Posts: 38
Re: Nutcracker - newbie confused on Spiral generation.
« Reply #4 on: August 20, 2012, »
I thought this was just me... I am also seeing the effects get stretched out to a much longer duration then intended.  I have played with it a little by trying to force the effect to use the LSP timings I have setup. Since I am new to both LSP and Nutcracker I thought I was doing something wrong. 

Alan

dandyman

  • Guest
Re: Nutcracker - newbie confused on Spiral generation.
« Reply #5 on: August 20, 2012, »
I have the effect "snap to closest timings" in LSP when pasting... Works much better...

Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
Re: Nutcracker - newbie confused on Spiral generation.
« Reply #6 on: August 20, 2012, »
You are not allowed to view links. Register or Login
Sean,

I created small pattern in LSP 2.5. It is two tracks that turn red, white then blue. The color switches every 1/10 second for 1 second.

The effect used mostly is effect type '3'. The nutcracker file was using mostly type '7'. I have attached the file.

fun, reverse engineering?

i made a small pattern and saved it and say eff=3, sometime eff=4 starting a color on, eff=7 to say the color goes off.

LSP has the ability to rampe between the start of the frame and the end of teh frame. In Nutcracker, whatever rgb value i start a frame with, i end with same value.

to try and make a small pattern to match what i do , paint solid colors in some frames, RGB , put them on a few rows annd save as a pattern

If you can see something that is should change in the UserPatterns.xml, please let me know.

Maybe make a very tiny Nutcracker animation, say 1 sec and only 2 strings by 5 pixels.

generate and effect and make a UserPatterns.xml and bring it down. Now that file is small enough you could play around editing it to see if you can make it behave better.

When i get some more time, i meant to do this playing around also
Sean
Littleton, CO
Latest releases You are not allowed to view links. Register or Login
xLights/Nutcracker Forum You are not allowed to view links. Register or Login
Fbook You are not allowed to view links. Register or Login

Offline urthegman

  • Sr. Member
  • ****
  • Posts: 960
Re: Nutcracker - newbie confused on Spiral generation.
« Reply #7 on: August 20, 2012, »
Sean, I don't know the answer and it in no way affects how appreciative I am for all you do but it has to affect the file sizes we store and I would think it would be easier to copy paste a 10 second effect than a 2 minute one. It may be because I tried adding it to a new blank sequence with no timing marks to Not to mention that if all we want is a 10 second effect we would have to go back into LSP and turn off the area's we don't want the effect, which with all the channels on RGBs can be a huge amount of work. Again not trying to be unappreciative or critical, just constructive.

Offline dpitts

  • Restrictive
  • Sr. Member
  • *
  • Posts: 466
Re: Nutcracker - newbie confused on Spiral generation.
« Reply #8 on: August 21, 2012, »
OK. I did some more digging. I think the only problem with the 9 sec UserPattern file I tried to import was the time values for the 'pos' of each effect.

The time scale for LSP is follows:

8820 units = 1/10 of a second
88200 = 1 second.

All the values in Nutcracker generated file had a one second delta from the effect before it. (88200 units). To test it I deleted all tracks but one and removed a trailing zero from all effects in that track. The track then pasted in with a 9s duration when I choose "Use clipboard timings".




Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
Re: Nutcracker - newbie confused on Spiral generation.
« Reply #9 on: August 21, 2012, »
You are not allowed to view links. Register or Login
OK. I did some more digging. I think the only problem with the 9 sec UserPattern file I tried to import was the time values for the 'pos' of each effect.

The time scale for LSP is follows:

8820 units = 1/10 of a second
88200 = 1 second.

All the values in Nutcracker generated file had a one second delta from the effect before it. (88200 units). To test it I deleted all tracks but one and removed a trailing zero from all effects in that track. The track then pasted in with a 9s duration when I choose "Use clipboard timings".

Thanks!

I had this code, $f is the number of frames into your animation. $frame-delay would be 50 for 50 ms, 100 for 100ms
   $time=$f*$frame_delay*1000;
   $time = $time * .882;   // just imperical measurement that one second timing = 88200

i have changed it to
   $time=($f*$frame_delay)/1000;
   $time = $time * 88200;   // just imperical measurement that one second timing = 88200


Since i always pasted with
"Snap to nearest timings"
"Use clipboard timings"
maybe that is why sometimes it works? I had pasted 9 second sequences and in lsp they ended up as 9 seconds, other times when i pasted they would be 90 seconds.

It pastes now without these two things selected.


I would also suggest double clicking the pattern and waiting until it says "Pattern pasted", then go to the cell where you want the pattern and type Ctl-v. Works much easier than trying to drag and drop.


thanks again


i have released it so give it a try now....

« Last Edit: August 21, 2012, by smeighan »
Sean
Littleton, CO
Latest releases You are not allowed to view links. Register or Login
xLights/Nutcracker Forum You are not allowed to view links. Register or Login
Fbook You are not allowed to view links. Register or Login

Offline dpitts

  • Restrictive
  • Sr. Member
  • *
  • Posts: 466
Re: Nutcracker - newbie confused on Spiral generation.
« Reply #10 on: August 21, 2012, »
The paste is working great now. Thanks Sean. I now have another question. I am trying to generate a spiral that makes a complete loop. Then I can paste it in several times to get a continuous multiple loops with seemless transitions from one loop to the next. How do I generate a single loop?

Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
Re: Nutcracker - newbie confused on Spiral generation.
« Reply #11 on: August 21, 2012, »
You are not allowed to view links. Register or Login
The paste is working great now. Thanks Sean. I now have another question. I am trying to generate a spiral that makes a complete loop. Then I can paste it in several times to get a continuous multiple loops with seemless transitions from one loop to the next. How do I generate a single loop?

choose seq duration = number of strands time your frame timing.


for example a 32x50 tree, each string making one strand with 50 ms timing

seq_duration = #strand * frame timing
                    =   32 * 50ms
                    = 1.600 seconds

now this should generate one rotation of the spiral

same as above but fold each string into two strands
 total strands is now 64
seq_duration = #strand * frame timing
                    =   64 * 50ms
                    = 3.200 seconds

not all my effects does this work, meteors, snowstorm currently build 80 frames no matter what the seq duration. I am going to change that so that

frames = (seq_duration*1000)/frame_delay

with that change you will get one entire sequence lasting seq_duration. Now if you wanted a 10 second sequence and i run out of frames, i repeat them again,


Sean
Littleton, CO
Latest releases You are not allowed to view links. Register or Login
xLights/Nutcracker Forum You are not allowed to view links. Register or Login
Fbook You are not allowed to view links. Register or Login

Offline dpitts

  • Restrictive
  • Sr. Member
  • *
  • Posts: 466
Re: Nutcracker - newbie confused on Spiral generation.
« Reply #12 on: August 21, 2012, »
Thanks Sean. Does speed of rotation effect this calculation?

Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
Re: Nutcracker - newbie confused on Spiral generation.
« Reply #13 on: August 21, 2012, »
You are not allowed to view links. Register or Login
Thanks Sean. Does speed of rotation effect this calculation?

You are right, i forget the speed setting since  i only added them in thsi last week.

for spirals

seq_duration = (#strand * frame timing)/ speed

so for the 3.2 sec example above,
ig speed is .5 then duration is 6.4 seconds
Sean
Littleton, CO
Latest releases You are not allowed to view links. Register or Login
xLights/Nutcracker Forum You are not allowed to view links. Register or Login
Fbook You are not allowed to view links. Register or Login

Offline mykroft

  • Restrictive
  • Sr. Member
  • *
  • Posts: 424
Re: Nutcracker - newbie confused on Spiral generation.
« Reply #14 on: August 21, 2012, »
would it not just be easier for us math challenged ppls to have a prompt for # of rotations and it changes the other fields as required?

Myk