Help getting rid of clicks when using [phasor~] as control signal for LFO

DJF's icon

I would like some help in getting rid of clicks in a FM LFO when it is turned off an on. Could anyone recommend a solution for this problem? Does anyone know anything about using the [trapezoid~] as an envelope?

Peter McCulloch's icon

Can you post your patch? (or at least part of it) If you don't interpolate the off/on, you will probably get clicks. (use line~ and *~)

DJF's icon

Certainly. I this patch I am using a sequencer as a modulate source for an LFO patch. The sequencer switches cells on a matrix on and off - which is routed to the amplifier of the LFO. I am having trouble getting rid of the click the LFO produces when the matrix is turned on and off. I tried to incorporate the [line] object like you suggested, but I could not get it to work.

Max Patch
Copy patch and select New From Clipboard in Max.

In my patch space bar is play and enter is reset counters - integral switches rely on these keyboard actions. Any kind of advice would be appreciated.

Peter McCulloch's icon

Some thoughts:

You need to send line~ into the right inlet of *~ You can send a float and a signal into the same inlet of *~ and they get multiplied, but it doesn't work that way with signals; they'll be ADDED together, which is not what you want when you're trying to apply an envelope. For this reason, I always recommend explicitly using both inlets of *~, so if you decide to change a number into a signal you don't mess things up.

Trick to know on matrix~: if you provide it with a third argument (can be 0), it will operate in ramp mode. (see attached examples--note specification of ramp time, since it defaults to zero)

It looks like you've put a lot of time into the sequencer part. Have you checked out live.grid? It does most, if not all, of this. (set to matrix mode, then 1 row and 32 columns)

Max Patch
Copy patch and select New From Clipboard in Max.

My general experience is that when you find yourself having to add graphical objects to grow the size of a sequence, etc. you're probably not doing it the easy way. If you have time, check out the live.step and live.grid objects You also might want to look at objects like table and coll for storing data.

DJF's icon

Thanks for the help - I will look into that. I have also included extra features with the sequencer i.e. a counting mechanism to make it change presets after a specified number of repetitions etc. - but for some reason it wouldn't let me include that section in the post. I am doing it as part of a University project, with the rationale of eventually creating a synthesiser that reduces the need for automation within a DAW. I will definatley look into those live objects, and will also check out the [line~]. Thanks for the help.

DJF's icon
Max Patch
Copy patch and select New From Clipboard in Max.

In this simplified/uncluttered version of the LFO part of my patch do you mind showing me how I would incorporate a [line~]? I have only involved about six objects in total.

Peter McCulloch's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here ya go: