how to produce triangle wave over time

Discuss Lemur and share techniques.
Post Reply
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

how to produce triangle wave over time

Post by Softcore »

Taken from the manual, we can use:

x = sin(time*2)*0.5+0.5 to produce x values that will form a sine wave.....

Is there a similar way to achieve x output for a triangle wave?

In fact what I want to achieve is for x to linearly move from 0 to 1 to 0 over time......Any suggestions?

Thanks!
Joe Soap
Regular
Posts: 462
Joined: 07 Jul 2012 15:04

Re: how to produce triangle wave over time

Post by Joe Soap »

You might want to take a look at Jay's LModIT in the Lib . . . it seems to do . . . stuff! :)
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: how to produce triangle wave over time

Post by Macciza »

Hi

Maybe x=abs((time%2)-1) . . .
or as a function lfoTri(freq) = abs((time*freq%2)-1) with freq being the argument to vary the speed . . .

Can also modify these equations for amp and offset if needed . . .

Cheers
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: how to produce triangle wave over time

Post by Softcore »

Thanks for the suggestions! ;)
nitefish
Regular
Posts: 56
Joined: 24 Aug 2012 07:43

Re: how to produce triangle wave over time

Post by nitefish »

Sorry,but I don't understand:
this is "x" from what object?
SignalScope?
What about the "y",so ?
Joe Soap
Regular
Posts: 462
Joined: 07 Jul 2012 15:04

Re: how to produce triangle wave over time

Post by Joe Soap »

Doesn't have to be a Signalscope.

Could be any parameter you want to modulate.

Could even be a Y. :shock:
Post Reply