how to produce triangle wave over time

Discuss Lemur and share techniques.
Post Reply
Softcore
Regular
Posts:1639
Joined:04 Nov 2012 08:34
how to produce triangle wave over time

Post by Softcore » 15 Mar 2013 14:31

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:475
Joined:07 Jul 2012 15:04

Re: how to produce triangle wave over time

Post by Joe Soap » 15 Mar 2013 20:24

You might want to take a look at Jay's LModIT in the Lib . . . it seems to do . . . stuff! :)

Macciza
Regular
Posts:1325
Joined:07 Dec 2011 04:57
Location:Sydney, Australia.

Re: how to produce triangle wave over time

Post by Macciza » 17 Mar 2013 12:58

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:1639
Joined:04 Nov 2012 08:34

Re: how to produce triangle wave over time

Post by Softcore » 18 Mar 2013 18:07

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 » 18 Mar 2013 18:19

Sorry,but I don't understand:
this is "x" from what object?
SignalScope?
What about the "y",so ?

Joe Soap
Regular
Posts:475
Joined:07 Jul 2012 15:04

Re: how to produce triangle wave over time

Post by Joe Soap » 18 Mar 2013 18:36

Doesn't have to be a Signalscope.

Could be any parameter you want to modulate.

Could even be a Y. :shock:

Post Reply