new waveshape
Moderators: BTT, andy55, b.dwall, juxtiphi
Great! The thing keeps slamming the center. It should work well will most of the flowfields.
Are you submitting your waves to SoundSpectrum? You should, they will at least be part of the 'extras' page and there is a chance they could be part of the main package. I am just trying for the extras page but the flows that JayPro worked on might well be good enough for the main.
I do see a couple places that your wave could be optimized tho. Any expression used more than once could be put in a var, like B1+2*pi/3 so that it is calculated once but the result is used several times . Also, multiplying is faster than division so /3 could be *.333333 and /10 could be *.1. I am leaving now but will look at it this evening....
And yes, hitting the corners is good for flows like the gravity wells etc.
Are you submitting your waves to SoundSpectrum? You should, they will at least be part of the 'extras' page and there is a chance they could be part of the main package. I am just trying for the extras page but the flows that JayPro worked on might well be good enough for the main.
I do see a couple places that your wave could be optimized tho. Any expression used more than once could be put in a var, like B1+2*pi/3 so that it is calculated once but the result is used several times . Also, multiplying is faster than division so /3 could be *.333333 and /10 could be *.1. I am leaving now but will look at it this evening....
And yes, hitting the corners is good for flows like the gravity wells etc.
-
Linvincible
- Posts: 95
- Joined: Sat Sep 25, 2004 5:01 am
ah ha!
hey, thanks for the optimization tips
here it is in better
Aspc=0
ConB=1
A0=".6667*pi"
B0="abs(mag(s))"
B1="t-B0"
B2="B1+fft(s)"
B3="B1+A0"
B4="B1-A0"
B5="B2+A0"
B6="B2-A0"
X0="(abs(cos(B1))+abs(sin(B1)))*(s*cos(B2)+(.1+.1*B0)*cos(-t))"
Y0="(abs(cos(B1))+abs(sin(B1)))*(s*sin(B2)+(.1+.1*B0)*sin(-t))"
X1="(abs(cos(B3))+abs(sin(B3)))*(s*cos(B5)+(.1+.1*B0)*cos(-t))"
Y1="(abs(cos(B3))+abs(sin(B3)))*(s*sin(B5)+(.1+.1*B0)*sin(-t))"
X2="(abs(cos(B4))+abs(sin(B4)))*(s*cos(B6)+(.1+.1*B0)*cos(-t))"
Y2="(abs(cos(B4))+abs(sin(B4)))*(s*sin(B6)+(.1+.1*B0)*sin(-t))"
Pen="fft(s)^.5+.05*B0"
LWdt="3+20*B0"
Meta="reactive=5, detail=5, density=5, morphable=3"
Vers=260
here it is in better
Aspc=0
ConB=1
A0=".6667*pi"
B0="abs(mag(s))"
B1="t-B0"
B2="B1+fft(s)"
B3="B1+A0"
B4="B1-A0"
B5="B2+A0"
B6="B2-A0"
X0="(abs(cos(B1))+abs(sin(B1)))*(s*cos(B2)+(.1+.1*B0)*cos(-t))"
Y0="(abs(cos(B1))+abs(sin(B1)))*(s*sin(B2)+(.1+.1*B0)*sin(-t))"
X1="(abs(cos(B3))+abs(sin(B3)))*(s*cos(B5)+(.1+.1*B0)*cos(-t))"
Y1="(abs(cos(B3))+abs(sin(B3)))*(s*sin(B5)+(.1+.1*B0)*sin(-t))"
X2="(abs(cos(B4))+abs(sin(B4)))*(s*cos(B6)+(.1+.1*B0)*cos(-t))"
Y2="(abs(cos(B4))+abs(sin(B4)))*(s*sin(B6)+(.1+.1*B0)*sin(-t))"
Pen="fft(s)^.5+.05*B0"
LWdt="3+20*B0"
Meta="reactive=5, detail=5, density=5, morphable=3"
Vers=260
Good going!
I did a little more to it. B7, B8, B9 because each is used more than once and cos and sin use more CPU than multiply or divide. B10 is only 1 multiply and one add but it is used 6 times. B11 and B12 coz each is used three times.
I didn't do s*cos(B2) and the others coz each is only used one time. Could have done B10*B11 and B10*B12 as well but I didn't notice it sooner. It would save 4 multiplications.
A0=".6667*pi"
B0="abs(mag(s))"
B1="t-B0"
B2="B1+fft(s)"
B3="B1+A0"
B4="B1-A0"
B5="B2+A0"
B6="B2-A0"
B7="abs(cos(b1))+abs(sin(b1))"
B8="abs(cos(B3))+abs(sin(B3))"
B9="abs(cos(B4))+abs(sin(B4))"
B10=".1+.1*B0"
B11="cos(-t)"
B12="sin(-t)"
X0="B7*(s*cos(B2)+B10*b11)"
Y0="B7*(s*sin(B2)+B10*B12)"
X1="B8*(s*cos(B5)+B10*B11)"
Y1="B8*(s*sin(B5)+B10*B12)"
X2="B9*(s*cos(B6)+B10*B11)"
Y2="B9*(s*sin(B6)+B10*B12)"
Pen="fft(s)^.5+.05*B0"
LWdt="3+20*B0"
Meta="reactive=5, detail=5, density=5, morphable=3"
Vers=260
I did a little more to it. B7, B8, B9 because each is used more than once and cos and sin use more CPU than multiply or divide. B10 is only 1 multiply and one add but it is used 6 times. B11 and B12 coz each is used three times.
I didn't do s*cos(B2) and the others coz each is only used one time. Could have done B10*B11 and B10*B12 as well but I didn't notice it sooner. It would save 4 multiplications.
A0=".6667*pi"
B0="abs(mag(s))"
B1="t-B0"
B2="B1+fft(s)"
B3="B1+A0"
B4="B1-A0"
B5="B2+A0"
B6="B2-A0"
B7="abs(cos(b1))+abs(sin(b1))"
B8="abs(cos(B3))+abs(sin(B3))"
B9="abs(cos(B4))+abs(sin(B4))"
B10=".1+.1*B0"
B11="cos(-t)"
B12="sin(-t)"
X0="B7*(s*cos(B2)+B10*b11)"
Y0="B7*(s*sin(B2)+B10*B12)"
X1="B8*(s*cos(B5)+B10*B11)"
Y1="B8*(s*sin(B5)+B10*B12)"
X2="B9*(s*cos(B6)+B10*B11)"
Y2="B9*(s*sin(B6)+B10*B12)"
Pen="fft(s)^.5+.05*B0"
LWdt="3+20*B0"
Meta="reactive=5, detail=5, density=5, morphable=3"
Vers=260
ERRORS!!!! ERRORS!!!!! Sound the Alarm!!!!!
I was trying JayPro's suggestion about the NCap. I wanted to see what difference it would make when I realized that the newer waves weren't doing the sound thing anymore. That is, no fft zig-zagging just straight lines spinning around. I noticed that when you optimized, linvincible, that you forgot the A0 factor in B1. But that wasn't it. The big problem was that you were using B vars instead of C vars. The B vars are evaluated at the beginning of the 'frame'. In other words, only at the beginning of the draw cycle. The C vars are re-calculated for every value of 's'.
You were using B0="abs(mag(s))" all along. I guess that gives you B0="abs(mag(0))" every step of the way. Which might be okay depending on what you want but it won't change during the calculations. Using t in a B var shouldn't matter since the clock probably won't tic during the calculations but mag(s) will change coz s changes. Likewise, you would want a C var for using i in colormaps, i changes every iteration. But go to D vars for using x or y in flowfields.
So when you put fft(s) into a B var it would have the same value the whole time like using fft(0). Here is the updated wave, but I am still wondering what effect the NCap has.....
A0=".6667*pi"
C0="abs(mag(s))"
C1="t-C0+A0"
C2="C1+fft(s)"
C3="C1+A0"
C4="C1-A0"
C5="C2+A0"
C6="C2-A0"
C7="abs(cos(C1))+abs(sin(C1))"
C8="abs(cos(C3))+abs(sin(C3))"
C9="abs(cos(C4))+abs(sin(C4))"
C10="(.1+.1*C0)"
C11="C10*cos(-t)"
C12="C10*sin(-t)"
X0="C7*(s*cos(C2)+C11)"
Y0="C7*(s*sin(C2)+C12)"
X1="C8*(s*cos(C5)+C11)"
Y1="C8*(s*sin(C5)+C12)"
X2="C9*(s*cos(C6)+C11)"
Y2="C9*(s*sin(C6)+C12)"
Pen="fft(s)^.5+.05*C0"
LWdt="3+20*C0"
NCap=1
Meta="reactive=5, detail=5, density=5, morphable=3"
Vers=260
I was trying JayPro's suggestion about the NCap. I wanted to see what difference it would make when I realized that the newer waves weren't doing the sound thing anymore. That is, no fft zig-zagging just straight lines spinning around. I noticed that when you optimized, linvincible, that you forgot the A0 factor in B1. But that wasn't it. The big problem was that you were using B vars instead of C vars. The B vars are evaluated at the beginning of the 'frame'. In other words, only at the beginning of the draw cycle. The C vars are re-calculated for every value of 's'.
You were using B0="abs(mag(s))" all along. I guess that gives you B0="abs(mag(0))" every step of the way. Which might be okay depending on what you want but it won't change during the calculations. Using t in a B var shouldn't matter since the clock probably won't tic during the calculations but mag(s) will change coz s changes. Likewise, you would want a C var for using i in colormaps, i changes every iteration. But go to D vars for using x or y in flowfields.
So when you put fft(s) into a B var it would have the same value the whole time like using fft(0). Here is the updated wave, but I am still wondering what effect the NCap has.....
A0=".6667*pi"
C0="abs(mag(s))"
C1="t-C0+A0"
C2="C1+fft(s)"
C3="C1+A0"
C4="C1-A0"
C5="C2+A0"
C6="C2-A0"
C7="abs(cos(C1))+abs(sin(C1))"
C8="abs(cos(C3))+abs(sin(C3))"
C9="abs(cos(C4))+abs(sin(C4))"
C10="(.1+.1*C0)"
C11="C10*cos(-t)"
C12="C10*sin(-t)"
X0="C7*(s*cos(C2)+C11)"
Y0="C7*(s*sin(C2)+C12)"
X1="C8*(s*cos(C5)+C11)"
Y1="C8*(s*sin(C5)+C12)"
X2="C9*(s*cos(C6)+C11)"
Y2="C9*(s*sin(C6)+C12)"
Pen="fft(s)^.5+.05*C0"
LWdt="3+20*C0"
NCap=1
Meta="reactive=5, detail=5, density=5, morphable=3"
Vers=260
Last edited by chkman on Wed Oct 05, 2005 11:04 am, edited 1 time in total.
-
Linvincible
- Posts: 95
- Joined: Sat Sep 25, 2004 5:01 am
collegial waveshape ;o)
there was something wrong, some variables had to be "C" vars otherwise the blades were straight
NCap=1
Aspc=0
ConB=1
A0=".6667*pi"
B0="abs(mag(s))"
B1="t-B0"
B2="B1+A0"
B3="B1-A0"
B4=".1+.1*B0"
B5="B4*cos(-t)"
B6="B4*sin(-t)"
C0="B1+fft(s)"
C1="C0+A0"
C2="C0-A0"
C3="s*(abs(cos(B1))+abs(sin(B1)))"
C4="s*(abs(cos(B2))+abs(sin(B2)))"
C5="s*(abs(cos(B3))+abs(sin(B3)))"
X0="C3*cos(C0)+B5"
Y0="C3*sin(C0)+B6"
X1="C4*cos(C1)+B5"
Y1="C4*sin(C1)+B6"
X2="C5*cos(C2)+B5"
Y2="C5*sin(C2)+B6"
Pen="fft(s)^.5+.05*B0"
LWdt="3+20*B0"
Meta="reactive=5, detail=5, density=5, morphable=3"
Vers=260
Thanks for all your help guys!
L'invincible
NCap=1
Aspc=0
ConB=1
A0=".6667*pi"
B0="abs(mag(s))"
B1="t-B0"
B2="B1+A0"
B3="B1-A0"
B4=".1+.1*B0"
B5="B4*cos(-t)"
B6="B4*sin(-t)"
C0="B1+fft(s)"
C1="C0+A0"
C2="C0-A0"
C3="s*(abs(cos(B1))+abs(sin(B1)))"
C4="s*(abs(cos(B2))+abs(sin(B2)))"
C5="s*(abs(cos(B3))+abs(sin(B3)))"
X0="C3*cos(C0)+B5"
Y0="C3*sin(C0)+B6"
X1="C4*cos(C1)+B5"
Y1="C4*sin(C1)+B6"
X2="C5*cos(C2)+B5"
Y2="C5*sin(C2)+B6"
Pen="fft(s)^.5+.05*B0"
LWdt="3+20*B0"
Meta="reactive=5, detail=5, density=5, morphable=3"
Vers=260
Thanks for all your help guys!
L'invincible
L'invicible,
Okay, but again, using B0="abs(mag(s))" is the same as B0="abs(mag(0))" If you want to see the mag values you need to change it to a C var.
In comparing the last two waves there is not a big difference since the wave is doing so much spinning and such. With fft the effect is on the leading edge of the lines but with mag it goes in both directions. I think fft is always 0 or positive but mag will go negative.
Willrob,
Thanks, but I was just getting the wave back to what it was....
Okay, but again, using B0="abs(mag(s))" is the same as B0="abs(mag(0))" If you want to see the mag values you need to change it to a C var.
In comparing the last two waves there is not a big difference since the wave is doing so much spinning and such. With fft the effect is on the leading edge of the lines but with mag it goes in both directions. I think fft is always 0 or positive but mag will go negative.
Willrob,
Thanks, but I was just getting the wave back to what it was....
-
Linvincible
- Posts: 95
- Joined: Sat Sep 25, 2004 5:01 am
very funny!
hey chkman,
looks like I was preparing my post when you posted yours, quite funny!
L'invincible
looks like I was preparing my post when you posted yours, quite funny!
L'invincible
- JayPro
- Posts: 738
- Joined: Sat May 01, 2004 10:51 pm
- Location: Huntington Station, Long Island, New York
Just a thought:
If any of you are a bit concerned about the minimal rotation that occurs with this, jacking up the numbers in B4 will make it rotate around screen. Just keep it below 1; I tried .9 .
Also adding fft() to the first "s" to C's 3, 4 and 5, as will make the arms of the shape bend as the sound gets louder. Try replacing that func with mag(), too.
If any of you are a bit concerned about the minimal rotation that occurs with this, jacking up the numbers in B4 will make it rotate around screen. Just keep it below 1; I tried .9 .
Also adding fft() to the first "s" to C's 3, 4 and 5, as will make the arms of the shape bend as the sound gets louder. Try replacing that func with mag(), too.
"God is syntax."
-
Linvincible
- Posts: 95
- Joined: Sat Sep 25, 2004 5:01 am
and here's a new one!
title: H bars, you'll see why if you try ;o)
Aspc=0
NCap=1
ConB=1
A0="100" // Thickness
C0="2*s-1"
Y0=" C0"
X0=" -0.875"
Y1=" C0"
X1=" -0.625 "
Y2=" C0"
X2=" -0.375 "
Y3=" C0"
X3=" -0.125 "
Y4=" C0"
X4=" 0.125 "
Y5=" C0"
X5=" 0.375 "
Y6=" C0"
X6=" 0.625 "
Y7=" C0"
X7=" 0.875 "
LWdt=" A0 "
C1=" fft(s)"
Pen= " C1"
Meta="reactive=5 detail=5 density=5 morphable=3"
Vers=260
oh and I updated another one, the scrolling spectrograph, so that it will work with more flowfields
NCap=0
Aspc=0
ConB=1
B0="abs(mag(s))"
B1=".2*t"
B2="B0*.15"
B3="0.99-B2"
C0="2*s-1"
C1="2*(B1-trnc(B1))-1"
X0="C1-B2"
Y0="C0"
X1="B3"
Y1="C0"
X2="-B3"
Y2="C0"
X3="C0"
Y3="B3"
X4="C0"
Y4="-B3"
Pen="fft(s)^.5+B0"
LWdt="15+10*B2"
Meta="reactive=5, detail=5, density=5, morphable=3"
Vers=260
L'invincible
Aspc=0
NCap=1
ConB=1
A0="100" // Thickness
C0="2*s-1"
Y0=" C0"
X0=" -0.875"
Y1=" C0"
X1=" -0.625 "
Y2=" C0"
X2=" -0.375 "
Y3=" C0"
X3=" -0.125 "
Y4=" C0"
X4=" 0.125 "
Y5=" C0"
X5=" 0.375 "
Y6=" C0"
X6=" 0.625 "
Y7=" C0"
X7=" 0.875 "
LWdt=" A0 "
C1=" fft(s)"
Pen= " C1"
Meta="reactive=5 detail=5 density=5 morphable=3"
Vers=260
oh and I updated another one, the scrolling spectrograph, so that it will work with more flowfields
NCap=0
Aspc=0
ConB=1
B0="abs(mag(s))"
B1=".2*t"
B2="B0*.15"
B3="0.99-B2"
C0="2*s-1"
C1="2*(B1-trnc(B1))-1"
X0="C1-B2"
Y0="C0"
X1="B3"
Y1="C0"
X2="-B3"
Y2="C0"
X3="C0"
Y3="B3"
X4="C0"
Y4="-B3"
Pen="fft(s)^.5+B0"
LWdt="15+10*B2"
Meta="reactive=5, detail=5, density=5, morphable=3"
Vers=260
L'invincible
Cool!
I like the H-Bars. They will keep any flow field busy.
I was watching the Spectrograph with some Rovastar flows. When it passes the center it really lights up the flow. But the screen is clear by the time it passes again. Interesting. But it doesn't light up the wallpapers too well. I wonder how it would look with all three of the vertical ones scrolling? Just a thought...
I was watching the Spectrograph with some Rovastar flows. When it passes the center it really lights up the flow. But the screen is clear by the time it passes again. Interesting. But it doesn't light up the wallpapers too well. I wonder how it would look with all three of the vertical ones scrolling? Just a thought...
-
Linvincible
- Posts: 95
- Joined: Sat Sep 25, 2004 5:01 am
-
Linvincible
- Posts: 95
- Joined: Sat Sep 25, 2004 5:01 am
same one with a little scribbling thing in the middle
NCap=0
Aspc=0
ConB=1
B0="abs(mag(s))"
B1=".2*t"
B2="B0*.15"
B3="0.99-B2"
C2="2*pi*s"
C3=".5*fft(s)"
C0="2*s-1"
C1="2*(B1-trnc(B1))-1"
X0="C1-B2"
Y0="C0"
X1="B3"
Y1="C0"
X2="-B3"
Y2="C0"
X3="C0"
Y3="B3"
X4="C0"
Y4="-B3"
X5="C3*cos(C2)"
Y5="C3*sin(C2)"
Pen="fft(s)^.5+B0"
LWdt="15+10*B2"
Meta="reactive=5, detail=5, density=5, morphable=3"
Vers=260
Aspc=0
ConB=1
B0="abs(mag(s))"
B1=".2*t"
B2="B0*.15"
B3="0.99-B2"
C2="2*pi*s"
C3=".5*fft(s)"
C0="2*s-1"
C1="2*(B1-trnc(B1))-1"
X0="C1-B2"
Y0="C0"
X1="B3"
Y1="C0"
X2="-B3"
Y2="C0"
X3="C0"
Y3="B3"
X4="C0"
Y4="-B3"
X5="C3*cos(C2)"
Y5="C3*sin(C2)"
Pen="fft(s)^.5+B0"
LWdt="15+10*B2"
Meta="reactive=5, detail=5, density=5, morphable=3"
Vers=260