### Creating a circular LFO

Hello, I am trying to create a circular LFO that I can eventually use to modulate parameters in Live, however I am having some simple mathematical difficulties and am confused as to what the best way to achieve this within max would be.

Basically I just want an oscillator that traces the contour of a circle over and over again. My goal ultimately is to be able to hook this up to two parameters so say you hook up the X coordinate being drawn to effect the gain of an EQ point, and the Y coordinate being drawn to the frequency of the EQ point- you get an automatic version of grabbing an EQ point and moving it around in a circle.

If anybody could point me in the right direction of any objects I should start playing with to achieve this or any simple mathematical formulas for tracing the contour of a circle on an x y grid that would be extremely helpful.

Thanks!

Maybe I’m not understanding you, but I think what you want is a cosine and a sine.

it is easier if you leave out that "tracing" stuff, and only have a circle GUI which is driven by in fact two simple cosine LFOs (and not the other way round)

for the GUI i would draw a little dot using the "paintoval" message to an [lcd] object, and for the number-LFOs [line] and [cos] are your friends.

-110

p.s. this is the gen forum :)

Hi Roman,

That makes perfect sense, but how can I setup the two cosine LFOs to work in sync to ‘draw’ the circle? I know that my way of thinking about drawing the circle is somewhat backward however I am not sure how else to know that I have gotten them in sync and that they aren’t just wobbling around all over the place if that makes any sense…

So far I’ve gotten this far, but cannot figure out how to configure it to actually draw perfect circles… any ideas?

**all**of the following text. Then, in Max, select

*New From Clipboard*.

----------begin_max5_patcher---------- 1549.3oc0a0tiiZCE82IOEHT+QqZFj+FSUUk5yQU0JRh2YXWBDAjsS2U67rW aCYByzPhSp4VPynjIDFmCGN2y8dsc91xEgqKeVUGF7KA+QvhEea4hE1CYNvh tWuHbW5yaxSqsmVXg5uJW+ovUsuUi54F6gyKS2tNs3wiuwGKKZpy9px7lXZD p6vEG1kUjqZriEt6f6Sa17TVwienRsooEKbhLhI3BZ7p.ZbDQRXrUABldfBH 3HTvedZ.KOz79Qr8PM+8dU6vEZg1q+SYasXVec7.G2GwEo6r+Gg+dUVZdn4M 99xklGV4H8rSUWm9n5ewOaxUoUmkbHmmbHCSNLBMJNgJkZJAijFNQyQ5Gwxa mYNOqf7KqLfnYe5mCPAnaQyPbSyfYFZMfSuWAyY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+V2i0WfhXskD0FjgYR+NOF 9kgx2r8VqkkSo8T.jtRiLOMvEHanKv7rZarxwm6BcN+By1+pydB1skv69ZYX gq43u8Rtt7P0liepcabqfSvcqptIqHsISWX+oyI9MmySYa2pJ5G4uMq1XFXg H5rTuqnQ5.ZXISJ3nkgZakoBZHRvHmXWfCXjivAz.G2X9dBcckCbBYy2Pmqh GLbvwkvbvPCyEOPLbhGlStfvYJyhmThGlKg5L.ucwcEOv3DZ1k5WEOvY8X9F W3TdBBLvwEmYNbriKFyTzzBOD.C1cI1h.FbntjpfilV3ggmX3YhwOT4DCOwS K7fmXwWX.0ORWsmgI2NM1U6YfviK09PgqTdJy0IP.OcvCErhentTZHAtZCoN 0lLEN73T0XvkNk7Vk5.3AtpUMq95Uwi.N33jbFtrWDmZ0AP9wkvKBbgWDjqc JCicHwU3v.AN3DWwCEF73z7PAmbFKcv8gwgEOWM7BMs3GLbY2wbGm4GffiK0 hggyMD6R1KLfxYWrCwvUKO1orE268q1ENMc+9unpp6FSKTB2k9o18CicgsC2 kUz9R6HFVo9R1wyOdoYz99x+A03u4jA -----------end_max5_patcher-----------

(edited by admin – use ‘copy compressed’)

Like this?

Tip – use Edit/Copy Compressed!

Cheers

Roger

**all**of the following text. Then, in Max, select

*New From Clipboard*.

----------begin_max5_patcher---------- 604.3oc0VFsaaCBEF9Z6mBjucYQ.1lTu61ywTUEASSnxFrrIcosp4Ye.1z5V QxbczhxtAKNfg+y24b.dINJYsZOuKA7Cvu.QQuDGE4LYMDMzOJoltmUQ6bSK gopq4Rcxh9wz78Zm8lszNt2pnzYSs9guiPdi2qjZIsl6F5msBZkejFplsUH2 bWKmo6ESJoXIbA.Urx9IK01hgKgfaG9G4tZgrhqcpB8tQ0Ns2JzuwsaV65uD NRJchmcRAgWBsVeMN11rXhb39JkY2B3vEyyegXm+hxrexgSyeanslMPyauiK oqq3i85OxB7Q77Ay8yT+TCuWNV2iZBxfj0T4lDvsyfP7mKorCAHzMmfCYNQA v8Q7rbeaXNfCG2mgX6XpFdHwRNgXwXhUeooCgKTeJawWTtCVYzJFSsS5V7z7 yNmzLjn1z0FoeKPOxyxlUhZFZbg40Whp24ERuyCmU8sj+aCjBdLmp8..ACjq fOqR+bWx9JzoIZ3bHzWjZchMRinlUc8QHC6IVUvJnTxLwhiG39DszabLZ04i khKJUZTxMlrkklrPSa.5jkOO5fcWTfINHQHmlNoWoz4aGLbAmGBKjyBKotRp Lz+mIMGsTJGNKpfytJJkbaWRkP94Wb5jr09GQUmZWKyuf9ZEv6ptj2oERpVn jilj83F.5sIsUTVxkiuuoTzYuBp73OUXx5gLA87IQ+uTO3oHGxESNESPN3qJ 3XqutT4NSMVcYjiyy+a54xk5jRlnblCc5OGh1z7HusaXIcJwb37CpVaWxh39 GQ120shIs7GE94uJ1tZuF+G.tbyegB -----------end_max5_patcher-----------

how to get them in sync? … by using the same [line] object for both LFOs.

in your case: * -1 (or + 0.5, % 1.) for the second cosine should do it.

btw, you are right, of course there is the problem that [line] will have a certain

interval, for example 25 milliseconds – and that doesnt give you a perfect circle

when just writing those coordinates to an lcd (depending on the way you

want to represent it graphically. for a bigger dot it might be no problem.)

so if that is an issue here, i´d pull back my suggestion to write the "cosines"

directly to the GUI but use carthesian(the line´s 0-1 output)-to-polar mapping instead.

actually, you could go one step further and make a signal-rate LFO – and a line-based

one with some 40 ms grains in parallel which is just doing the graphics.

-110

Forums > MaxMSP