LFO starting values set and scaled by UI objects

Edward Stumpp's icon

I'll try to make this as clear as I can; I've been working on this for the whole day and I'm a bit closer to a solution but I can help and think that there is some fundamental concept I'm missing here:

I am currently working on a piece and interface that uses the [multislider] and the [picslider] to change some colors, shapes, and positions of objects in Jitter. Basically, I have run in to an issue where I can manually change the value of something, like color for instance, and then when I activate an LFO it jumps to the value that has been scaled.

I've attached my attempt to fix this and it's really close. What's off now if the depth of the LFO gets 'off' the values I want to control. Or, if you place a slider towards the top or bottom and increase the depth it will not modulate between all the values (0 -1 in this case).

Has anyone else run into this problem? I really feel like there is a simple solution and it's right there...but I can't find it!

LFO Scaling Quiestion.maxpat
Max Patch

TFL's icon

Here is another approach:

Start the LFO with phase at 0.25 so the cycle start at 0., and add the value of the LFO to the last value of your slider, before the LFO get activated.

The main downside is that when you turn the LFO off, the last LFO-modified value becomes the new "starting point" value. But you can fix this, either by forcing the slider to go back to initial value (which will give some value jump when turning the LFO off), or wait for the LFO to reach the initial value before actually turning off (but you can get a delay before turning the LFO off, and getting it to stop effectively).

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

thinking to the phase of the phasor~ too. Maybe not exactely what you search... And... why phasor~ if you need float ? Maybe stay with line in Max, not MSP ?

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

interesting how to interfere inside a regular process :-)

hth

zz

Roman Thilenius's icon


you are modulating the modulator output with the fixed value, i would do it the other way round.


and for jitter i would base the LFO on frames, not signal objects/snapshot.

Edward Stumpp's icon

Thank you all for you help and insight! I've been able to approach the issue grom a few new angles. Apologies for the late reply, midterm grading and all that.

Edward Stumpp's icon

Roman,

Could you elaborate a bit more on what you mean when you say "modulating the modulator output with the fixed value?" I think I understand but I must admit I am a bit confused. Rather that taking the new value for modulation from the output of a UI object, I should take a 'fixed' vaule and have the modulation sale around that...?

Roman Thilenius's icon

hm.... unless i misunderstand the example, the "modulation" happens in your [scale] object. which gets the LFO at its hot inlet, and a fixed value somewhere left of it.

mathematically it is somehow irrelevant - and even more for pure signal patches - but it looks confusing. the "modulator" usually is the right operand.

Peter Ostry's icon

Not sure if it helps in this case, but when I want stoppable LFOs/Envelopes I use [metro] > [counter] > [function]. When metro stops, the counter remains at the current value until it gets fed again.