Okay so I'm kinda proud of this one, conditional logic in pd has been a bit confusing for me so far, coming from 'normal' programming languages.
Basically I want to send values (from an external source) to a volume-control slider, but instead of having it change immediately, I want it to slide over to the expected value smoothly and automatically. I came up with a solution that works quite well. I might have done some overkill in the logic, I'm not sure, if someone knows a more elegant solution for this, I'd love to see it and learn.
Now, the mechanism works fine, but I've got a strange little quirk that I don't know how to get rid of: the value of the slider keeps dancing around the expected value... I was thinking this shouldn't happen since moses uses < and >= if I understand correctly? And I've used a small enough increment [ + or - .001] with expected values that don't require more precision.... Any ideas?
Oh and one more thing: if I wanted to get a bang for when the value has been achieved, I'm guessing I should just use a [==] with [r slidVal] in the right inlet? I haven't been able to test this yet due to the quirk.