# Control rate lfo

**URL:** <https://forum.critterandguitari.com/t/control-rate-lfo/4041>\
**Category:** Patching\
**Created:** [March 21, 2019, 7:51pm UTC](https://forum.critterandguitari.com/t/control-rate-lfo/4041 "2019-03-21T19:51:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![thetechnobear](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/thetechnobear/32/42_2.png) [@thetechnobear](https://forum.critterandguitari.com/u/thetechnobear)\
**Post date:** [March 21, 2019, 7:51pm UTC](https://forum.critterandguitari.com/t/control-rate-lfo/4041/1 "2019-03-21T19:51:29Z")

</div>

anyone have a good example of a control rate lfo?

I want something low cpu, so **not** based off audio rate objects e.g using [osc~] -\> [snapshot~]

Im assuming I can do it by driving with a [metro] at an appropriate rate  
then for triangle and ramp lfos using [line] and sine using [sin]

I’m sure I could work it out (which I’ll do if no-one has a easy solution)  
but Im equally sure its out there already…

I also don’t want anything thats not vanilla pd, or too complex - Im picky aren’t I 🙂

---

<div class="post-metadata">

**Author:** ![Jaffasplaffa](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/jaffasplaffa/32/2053_2.png) [@Jaffasplaffa](https://forum.critterandguitari.com/u/Jaffasplaffa)\
**Post date:** [March 21, 2019, 8:25pm UTC](https://forum.critterandguitari.com/t/control-rate-lfo/4041/2 "2019-03-21T20:25:36Z")

</div>

For a simple control rate sine lfo, this works.

I made this a while ago and then concluded that it is probably better to make the waveforms in a table.

But try it out 🙂

![52](https://canada1.discourse-cdn.com/flex035/uploads/critterandguitari/original/2X/6/6e45eb5a8e2603d91d4c5d613e4d5a478f02befd.png)

---

<div class="post-metadata">

**Author:** ![thetechnobear](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/thetechnobear/32/42_2.png) [@thetechnobear](https://forum.critterandguitari.com/u/thetechnobear)\
**Post date:** [March 21, 2019, 9:00pm UTC](https://forum.critterandguitari.com/t/control-rate-lfo/4041/3 "2019-03-21T21:00:12Z")

</div>

I think your right - I’m better off generating the waveforms (probably as the user selects them) at a given resolution, then just running a phasor over it… (probably line)  
that way I can also do any maths I want whist during the generation stage…

---

<div class="post-metadata">

**Author:** ![Jaffasplaffa](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/jaffasplaffa/32/2053_2.png) [@Jaffasplaffa](https://forum.critterandguitari.com/u/Jaffasplaffa)\
**Post date:** [March 21, 2019, 9:38pm UTC](https://forum.critterandguitari.com/t/control-rate-lfo/4041/4 "2019-03-21T21:38:19Z")

</div>

There is also a line control rate lfo here. I have not tested it, but saved the link to check it out later:

> **[Creating an LFO?](https://forum.pdpatchrepo.info/topic/10577/creating-an-lfo/3)**
>
> Hi all, PD beginner here, ive got an assignment to create a dub siren, really simple i thought, but i've got lost on how to create a pitch lfo? any thoughts would be appreciated, thanks!

---

<div class="post-metadata">

**Author:** ![WyrdAl](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/wyrdal/32/1260_2.png) [@WyrdAl](https://forum.critterandguitari.com/u/WyrdAl)\
**Post date:** [March 21, 2019, 9:48pm UTC](https://forum.critterandguitari.com/t/control-rate-lfo/4041/5 "2019-03-21T21:48:32Z")

</div>

You can try something like this if you want to send a bang at any time to get the current value of a phasor:  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/critterandguitari/original/2X/8/86ce0bd6b8732ebdd089ab9b08c48338158d79bc.png)  
If you are always going to be running it on a metro you can get rid of the timer and just send the period of the metro with every bang.

Then you could use [sin] or an equation/look-up table to generate any LFO shape.

---

<div class="post-metadata">

**Author:** ![thetechnobear](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/thetechnobear/32/42_2.png) [@thetechnobear](https://forum.critterandguitari.com/u/thetechnobear)\
**Post date:** [March 22, 2019, 7:21pm UTC](https://forum.critterandguitari.com/t/control-rate-lfo/4041/6 "2019-03-22T19:21:52Z")

</div>

thanks @Jaffasplaffa & @WyrdAl

so I went for a table approach using sinesum, as Im happy with approximations, it’ll give it character 🙂

 ![28](https://canada1.discourse-cdn.com/flex035/uploads/critterandguitari/original/2X/0/08ae4d095af3914a73ae91397aaf430eeaee4e0d.png)

pretty straightforward and hopefully pretty low cpu (tabread should be cheap),  
also its pretty easy to add user defined waves if we want.

---

<div class="post-metadata">

**Author:** ![Jaffasplaffa](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/jaffasplaffa/32/2053_2.png) [@Jaffasplaffa](https://forum.critterandguitari.com/u/Jaffasplaffa)\
**Post date:** [March 22, 2019, 8:04pm UTC](https://forum.critterandguitari.com/t/control-rate-lfo/4041/7 "2019-03-22T20:04:04Z")

</div>

Cool. Happy to hear you got something going.

Was actually wondering how to approach different waveshapes at control rate.

Sinesum it is 🙂
