how to sync lfo to a tempo
I am wanting to create a global transport, or use the one in Max, whereby an LFO is able to modulate the frequency of a waveform in time with a tempo. For example, I want to be able to define an LFO rate of 1/4th note and then here it modulate in time with audible tempo clicks. I tried doing this by creating my own global tempo generated by a a [phasor~] and then had various [rate~] creating note lengths - but this did not work in the end. I also tried [phasor~ 4nd @lock 1] but this did not seem to be in sync with the max transport when I turned on the click. Could anybody help me? Here is one version of the patch using the max transport.
The previous patch posted is wrong. This is the correct one. I am generating a tempo by a single [phasor~] and have two [rate~] coming off it. One [rate~] is responsible for an LFO FM and the other for creating a tempo by banging overtime the waveform sample rate is [>=~ 0.001]. Each of the [rate~] are succesful in creating note values, however, when the two are heard side by side they seem out of time. Could anyone help me determine why this is?
I have improved the patch so that everything resets when you bang a button at the top of the screen. Everything seems to keep in sync - but I would like some outside opinion.
`