Creating a circular LFO

    Sep 28 2012 | 5:13 pm
    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.

    • Sep 28 2012 | 5:38 pm
      Maybe I'm not understanding you, but I think what you want is a cosine and a sine.
    • Sep 28 2012 | 5:53 pm
      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.
      p.s. this is the gen forum :)
    • Sep 28 2012 | 6:34 pm
      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...
    • Sep 28 2012 | 7:09 pm
      So far I've gotten this far, but cannot figure out how to configure it to actually draw perfect circles... any ideas?
      (edited by admin - use 'copy compressed')
    • Sep 28 2012 | 7:29 pm
      Like this? Tip - use Edit/Copy Compressed! Cheers Roger
    • Sep 30 2012 | 3:05 am
      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.