Forums > Max For Live

Retrigger for LFO

April 28, 2014 | 6:08 am

Hi. Hopelessly opening this topic.

Well could anybody, please, tell me how to make a normal amplitude LFO retrigger for poly~?
By retrigger i mean that when it is turned on, every note i play begins it’s modulation from 0 phase.
When it is turned off, LFO is acting like it were out of poly object, in other words it is modulating whole signal.

Here is what i have
Patch:

– Pasted Max Patch, click to expand. –

Poly:

– Pasted Max Patch, click to expand. –
  • This topic was modified 5 months by  IvnOs.

April 28, 2014 | 10:46 am

havent run your patch, but in principal it looks right what you are doing.

(i dont know offhand but you are sure that you may use int 0 for the phase?)


April 28, 2014 | 11:43 am

Thanks Roman.
Becoming blind within big projects. Yes, it must be float.
But it is not solved my problem.

  • This reply was modified 5 months by  IvnOs. Reason: Problem still remains not solved

May 1, 2014 | 12:34 pm

Still hoping that somebody will help me.
For now a made something like this
Patch:

– Pasted Max Patch, click to expand. –

Poly:

– Pasted Max Patch, click to expand. –

At this patch retrig is working, but i have some bugs that are driving me crazy.

1) Retrig is inverted. In other words every voice have it’s "own" LFO, when retrig is OFF. It is not so big problem to solve for me (just some math), but i must tell about it.
2) When retrig is ON, it is working not so good as i want.
Every new voice is retriging whole LFO, but i just want from LFO to be independent from every voice when retrig is OFF (in this patch ON).

Any ideas will be useful, because at this moment i really fell stuck.


May 1, 2014 | 2:25 pm

Made some kind pf retrig with metro.

– Pasted Max Patch, click to expand. –

Any ideas on doing it without metro? Or metro interpretation in this case is the most CPU cheap?

P.S. I love to talk with myself ^_^

  • This reply was modified 5 months by  IvnOs. Reason: PS add

May 1, 2014 | 4:48 pm

what about sending 0. to frequency, then set phase to 0. and then set new frequency again. does that retrigger? [t f 0. 0.]


May 1, 2014 | 4:53 pm

i liked your first attempt better. ;) using the "note on" event inside the poly instance seems to be the right approach.


May 1, 2014 | 5:55 pm

Hi, i’m not sure i entirely understand the problem beyond trying to have each individual voice with its lfo reset to 0…
so i think this might be what you want for your poly~, like Roman said, taking the ‘note on’ event within the poly~ voice:

– Pasted Max Patch, click to expand. –

see here for more explanation or a gen~ version(unnecessary :p) on how you can reset phasor~ sample accurately(without having to use the non-signal phase inlet), which might also apply nicely to your voice-by-voice offsetting of phasor~-driven LFOs:

http://cycling74.com/forums/topic/reset-phasor-when-click-is-detected-at-signal-rate/

no wait! this one’s even better, i hadn’t even seen this one til now :p

http://cycling74.com/forums/topic/reset-the-phase-phasor-at-signal-rate/

Anyways, hope i understood correctly and that it helps :)


May 5, 2014 | 4:41 am

@ROMAN i did not understood you well. Where should i place this trigger. And i really can’t understand how it will be retriggering the LFO? As i can see retrig will happen wit this trigger, only when i’m changing LFO frequency.

@RAJA
Sorry, but this is not the solution of my problem. =)
(But thanks for sah~ features, wich will be helpful in expanding my LFO.)

My problem is not how to retrig, it is how to make my LFO possible to switch between whole amplitude modulation like this

– Pasted Max Patch, click to expand. –
– Pasted Max Patch, click to expand. –

And separate modulation for every voice, like i posted above earlier.

  • This reply was modified 4 months by  IvnOs.

May 5, 2014 | 1:40 pm

ah, i c…
in that case, maybe something like this? (i realize you’re not looking for a individual vs. global retrig, but this also achieves similar to ‘whole-modulation’ vs. ‘individual-voice-modulation’)

– Pasted Max Patch, click to expand. –

or you could use the patch you posted for ‘separate modulation for every voice’ but instead, figure out how to keep the phasor~ external to poly~ and switch internally between tracking the phasor~ per-voice or globally(it’s 2pm in the afternoon and i’m feeling too lazy to patch that solution… :p :D)


May 6, 2014 | 3:37 am

@RAJA Thanks for sharing your thoughts. Idea you have suggested is awesome, but retrig in patch you provided working a little bit strange. By strange i mean, that LFO start point of every note is inverted, e.g. i press C2 then A2, after that LFO cycle begins with A2 first. Also if i add one more note, two last notes will be LFOed like one.

Also finally i’m coming to idea, that is the most CPU cheap and easily to make LFO is just to have two instances of the same LFO (one in poly~ and one out of poly~).


May 6, 2014 | 7:14 am

If they’re all supposed to be going at the same rate, you could just have one phasor~ outside of poly~. (Use in~ instead of send~/receive~)

From there you’ll need to capture the phase of the phasor~ on a note on. Use stripnote into button into click~ into sah~’s right inlet for this. (Phasor into sah left)

1. For local reset, take the captured value, and subtract that from the input value.

2. For global reset, put a receive on the button, and have any note on trigger the button via a send from the main patch (Again, use stripnote so you don’t retrograde on release). Use a gate to enable/disable global sync.

Inside the poly~ patch, you can then use phasor~ to run whatever lookup table you need.


May 12, 2014 | 3:00 am

@PETER
Thanks for help, but your solution either not working as well as it should.
If i play 2 notes everything is ok retrig functioning as it should, but if add one more the last two notes beginning to be in sync, but first one is going on its own.

Patch

– Pasted Max Patch, click to expand. –

Poly~

– Pasted Max Patch, click to expand. –

Viewing 13 posts - 1 through 13 (of 13 total)