Triangular wave problem

Discussion forum for G-Force users

Moderators: BTT, andy55, b.dwall, juxtiphi

User avatar
tpatana
Posts: 9
Joined: Sat Aug 28, 2004 4:58 am

Triangular wave problem

Post by tpatana »

I've been making some waveshapes and flowfields back from the 1.x times, and now with the new gold-version I'm trying to make some new experiments. Before I submit the configs for SoundSpectrum for evaluation, I wanted to make one superb waveshape. I have great idea, but I haven't yet got it work, so could anyone here give hint how to do it?

The problem is, I want to make funny things with triangular wave, but I'm not getting it right.

I tried tons of different triangular wave fourier series, but this one was working quite good: http://www.rfcafe.com/references/electr ... series.htm

I used A=0.32, and for omega_0*t I used pi*3.5*s

With just 3-5 terms, I got quite nice triangular wave. The problem was, I want the triangular wave to start from [0,0.8] and to go to [0.8,0]. So it would look like a ladder, descending from middle top, to center right. Got the picture?

Using that formula, I get normal level triangular wave, not one descending and looking like stairs. I know I have to implement it in both X and Y -coordinates, but my brain is stuck on how to do it.

And now comes the best part, after I get it to look like stairs, I want to rotate it around the origo :)

It's quite simple to rotate the starting point around the origo, but I also need to rotate the triangular wave at the same rate so that it keeps in correct angle.

I think I can handle the rotation, when I get the ladder look correct, but I'm having trouble with that... anyone has any idea?


Actually I worked around the problem by using small lines, each one at 90 degree angle to the previous. It was quite easy to make that ladder and also rotate it around the origo.

The problem was, I would need 21 lines to make the figure which I want to draw, and the current version supports 15, so I'm a little bit short of waveforms.

So if there's any workaround to rise that 15 to 21, then I could solve the problem easier with existing formulas. If not, I have to try to make that ladder somehow :)

User avatar
tpatana
Posts: 9
Joined: Sat Aug 28, 2004 4:58 am

Post by tpatana »

Hooray !

B0="t",

X0="(s * 0.8 ) * sin(b0+pi/2) + (0.8 - flor(s*2)*0.8/2) * sin(b0)",
Y0="(s * 0.8 ) * sin(-b0) + (0.8 - flor(s*2)*0.8/2) * sin(b0+pi/2)",

That makes it :)

Now I just have to make all other lines...

User avatar
tpatana
Posts: 9
Joined: Sat Aug 28, 2004 4:58 am

Post by tpatana »

Is it OK to post here the configs, for questions and suggestions which should be made better?

User avatar
tpatana
Posts: 9
Joined: Sat Aug 28, 2004 4:58 am

Post by tpatana »

Eh, here's a screenshot:

http://patana.no-ip.org/cgi-bin/photo/i ... Width=9999

(that's direct link, which eats away the frames, if you want frames, take only the address, and there select "Kuvat", "Sekalaiset" and then "G-Force".

Rovastar
Posts: 295
Joined: Wed May 05, 2004 9:25 am
Location: Derby/London, England

Post by Rovastar »

tpatana wrote:Is it OK to post here the configs, for questions and suggestions which should be made better?
I would think so. I certainly do. :)
Andy has never really expessed an opinion on it.

I think sharing configs helps to build a community here amongst us GF users. So please do share.

I haven't made any waveshapes yet only Flowfields I suppose I should port some of my MilKDrop ones over to GF. I should be able to do the mushroom ones like:

http://www.milkdrop.co.uk/images/screen ... ry_big.jpg

but I haven't even looked at the syntax yet.

User avatar
JayPro
Posts: 738
Joined: Sat May 01, 2004 10:51 pm
Location: Huntington Station, Long Island, New York

Post by JayPro »

John

if your WaveShapes are anywherre near as promising as your FlowFields, you should have some real beauts comung up.

BTW This other waveShape looks pretty good. I'll get to looking at it soon.
"God is syntax."

Roger Bigod
Posts: 29
Joined: Mon Aug 23, 2004 8:17 pm

Post by Roger Bigod »

It might be helpful not to ignore people who post configs. I submitted a batch a few weeks ago, and never received an acknowledgement. Nor a reply from a sysop asking about which ones were accepted and with what changes. Since I have no idea what's going on, there is no point in sending anything else. I'm going to be busy with other things in the next few weeks, so it doesn't matter for me. But I think that people who submit things for the first time would in general appreciate feedback in the sense of pointing out good and bad features of configs. Otherwise, it's a mildly unpleasant guessing game.

Rovastar
Posts: 295
Joined: Wed May 05, 2004 9:25 am
Location: Derby/London, England

Post by Rovastar »

Hi Roger,

Normally I find Andy responsive but true I don't know what configs will be included and what will not.

I am sure some of your configs are in the next version of G-Force.

3 wallpaper ones and about 6 others. TriGear, etc.

Really nice stuff btw. There is a thread about your stuff here. See you have not been ignored by some of us. :)

http://soundspectrum.com/v-web/bulletin ... .php?t=153

They have infact inspired me to create some versions of them. Feedback on what I have done to those is appricated to be honest it seems like only me and JayPro post here - so I only get feedback from Jay. :/

http://soundspectrum.com/v-web/bulletin ... .php?t=164
http://soundspectrum.com/v-web/bulletin ... .php?t=168
http://soundspectrum.com/v-web/bulletin ... .php?t=170

I only got added to the GF gold/beta mailing list a couple of days ago. So I didn't know myself that you had done anything and then I did some mods of them.

User avatar
tpatana
Posts: 9
Joined: Sat Aug 28, 2004 4:58 am

Post by tpatana »

So, here's one which I worked for many hours until I got it working as I wanted. I've already sent it to Andy, but opinions/comments from everyone else too are also interested to hear.


// "TP Rammstein", by TP


Aspc=1,

A0=" 0 ",
A1="rnd( 0.2 ) ",
A2="rnd( 1 )",
A3="rnd( 1 )",


B0=" t *0.0001",



C0="A2 * B0*5000 + A3 * (B0*(Sin(.3*t)+Sin(.3*t*3)/3+Sin(.3*t*5)/5+Sin(.3*t*7)/7)+pi/2-pi/2)*2+BASS*a1",
C1="1.1 - 0.2 * mag( s )",




X0="(s * 0.75 +0.05) * sin(c0+pi/2) * c1 + (0.8 - flor(s*2)*0.775/2) * sin(c0) * c1",
Y0="(s * 0.75 +0.05) * sin(-c0) * c1 + (0.8 - flor(s*2)*0.775/2) * sin(c0+pi/2) * c1",

X1="c1 * ((s * 0.75 + 0.05) * sin(c0+pi/2) + (0.8 - flor(s*2)*0.775/2) * sin(-c0))",
Y1="c1 * (-(s * 0.75 + 0.05) * sin(c0) + (0.8 - flor(s*2)*0.775/2) * sin(-c0-pi/2))",

X2="c1 * ((-s * 0.4 ) * sin(-c0+pi/2) + 0.4 * sin(c0) + (0.4 - flor(s)*0.35 ) * sin(c0))",
Y2="c1 * ((s * 0.4 ) * sin(c0) + 0.4 * SIN(-c0+pi/2) + (0.4 - flor(s)*0.35 ) * sin(c0+pi/2))",

X3="c1 * ((s * 0.4) * sin(c0+pi*3/2) + 0.4 * sin(c0+pi) + (0.4 - flor(s)*0.35) * sin(c0+pi))",
Y3="c1 * ((s * 0.4) * sin(-c0+pi) + 0.4 * sin(c0+pi*3/2) + (0.4 - flor(s)*0.35) * sin(c0+pi*3/2))",

X4="c1 * ((s * 0.4) * sin(c0+pi*3/2) + 0.4 * sin(c0+pi*3/2) + (0.4 - flor(s)*0.375) * sin(c0))",
Y4="c1 * ((s * 0.4) * sin(c0) + 0.4 * sin(c0) + (0.4 - flor(s)*0.375) * sin(c0+pi/2))",

X5="c1 * ((s * 0.4) * sin(c0+pi*3/2) + 0.4 * sin(c0+pi*3/2) - (0.4 - flor(s)*0.375) * sin(c0))",
Y5="c1 * ((s * 0.4) * sin(c0) + 0.4 * sin(c0) - (0.4 - flor(s)*0.375) * sin(c0+pi/2))",

X6="c1 * ((s*0.4)*sin(c0)-(flor(s)*0.4)*sin(c0+pi/2))",
Y6="c1 * (s*0.4*sin(c0+pi/2)+flor(s)*0.4*sin(c0))",

X7="c1 * (s*0.447)*sin(c0+pi-0.4636)",
Y7="c1 * s*0.447*sin(c0+pi*3/2-0.4636)",

X8="c1 * (0.4*sin(c0+pi*3/2)-s*0.4*sin(c0))",
Y8="c1 * (0.4*sin(-c0+pi)+s*0.4*sin(c0+pi*3/2))",

X9="c1 * (0.4*sin(c0+pi*3/2)-s*0.447*sin(c0-0.4636))",
Y9="c1 * (0.4*sin(-c0+pi)+s*0.447*sin(c0+pi*3/2-0.4636))",

X10="c1 * (0.447*sin(c0+pi-0.4636)+s*0.4*sin(c0+pi*3/2))",
Y10="c1 * (0.447*sin(c0+pi*3/2-0.4636)+s*0.4*sin(c0))",

ConB=1,

LWdt="( 3.5 * abs( mag( s ) ) ) ^ (2)",


Meta="reactive=3, detail=5, density=5, morphable=2",

Vers=260

User avatar
JayPro
Posts: 738
Joined: Sat May 01, 2004 10:51 pm
Location: Huntington Station, Long Island, New York

Post by JayPro »

I very much like how it reacts to sound. Am I right in guessing that you're trying to make block-letter versions of T and R? That's what it looks like to me.
"God is syntax."

User avatar
tpatana
Posts: 9
Joined: Sat Aug 28, 2004 4:58 am

Post by tpatana »

JayPro wrote:I very much like how it reacts to sound. Am I right in guessing that you're trying to make block-letter versions of T and R? That's what it looks like to me.
Close but no banana. You must try harder :) If you apply C1="1" and C0="B0" then you will see the figure more clearly (If I recalled the constants corretly)

Actually I tried several different reactions which I liked none :( The current one was something I disliked least. Due to the flor-command it doesn't react to music the same way as normal waveshapes. I might try implementing radius-effect from the sound, but the current version has already took enough of my time, so I will let it cool down for some time and then make some adjustments.

Toby
Posts: 101
Joined: Fri May 14, 2004 3:43 pm
Location: Houston TX

Post by Toby »

I tried to check out your TP Rammstein waveshape, but after hitting a SHIFT-U to rescan folders, G-Force 2.7 Gold gave me a 'Not using WaveShape "TP Rammstein" because it did not have enough qualifying meta ratings' error message. I removed all of the commas, tried again, and got the same result. Any thoughts or suggestions? Thanks.

Take care.

User avatar
JayPro
Posts: 738
Joined: Sat May 01, 2004 10:51 pm
Location: Huntington Station, Long Island, New York

Aha! To the Rescue!

Post by JayPro »

In regards to the Qualifying Meta Ratings question, I've come to learn both thru consultation and hard experience-garnering that the best way to assure that waveshapes like these get the right amount is if the four basic parameters are set to level "4".
The middle two can be set to 5 if need be (usually this is in cases of waveshapes with many lines or squiggles), but especially as far as "long-winded" WaveShapes go (i.e. complicated ones with a lotta code), *anything less than 4 anywhere in the Meta statement* will most likely cause the processor to ralph it.
Both Reactive and Morphable especially need "4" ratings IMO if they're to work well. If you have the later at 5, I suppose it's okay; but I wouldn't recommend it.
I'd imagine that if you have, say, a 4-3-2-4 pattern or something like that, this I *think* allows the effect to appear as both a true Wave and a Particle. I'm still trying to figure it out, so please don't quote me; I'm citing these, as I said before, thru consultation and bitter experience (especially as a long-time user pre v2.6 when Meta numbers first started appearing).

JwP


BTW, if you want a WaveShape to appear as a particle, try the following:
Reactive=1, Detail=3, Density=3. Notice the absence of Morphable; otherwise, of course, you'll have a WaveShape.
PS: Particles that have sound-generative coding--i.e. BASS, mag(s) or fft(s)--will react independently of their Meta files. This indicates that Meta ratings *on the whole* are more in keeping with the look of the effect and not the sound of it. If I'm right, The "Reactive" param merely reflects/verifies/corroborates the integrity and value of the effect's sound-response code and is *not* meant as a prompt to make it dance to sonic throughput. Again, that's what the code's for.

Of course, there are other parameters to use as well, and Ted has some nice examples in his subfolder in the Waves folder. We'll most likely see more complicated samples in future contributions.
Last edited by JayPro on Sat Sep 04, 2004 11:32 pm, edited 1 time in total.
"God is syntax."

Toby
Posts: 101
Joined: Fri May 14, 2004 3:43 pm
Location: Houston TX

Post by Toby »

Thanks for the help JayPro. It worked. AND thanks for the explanation; that helps a lot as far as my understanding of just what "META" does.

Take care.

User avatar
JayPro
Posts: 738
Joined: Sat May 01, 2004 10:51 pm
Location: Huntington Station, Long Island, New York

Post by JayPro »

Glad to be of help. I just didn't realize your response as I was busy editing on the fly on an "oh-by-the-way" basis.

Again, these aren't meant to be concrete; but merely as a guide that was given to me. Take a look at some of the Gold Waveshapes that Andy created and see how his metas stack up. Also (not that I'd call myself an expert here but it's common sense to me), look at the effect code and try to understand why/how he chose he numbers he chose and how everything when taken into mutual consideration makes sense.
Of course, he's the man with the knowledge and knows exactly how to pull it off.
"God is syntax."

Post Reply