From: Raine M. E. <ra...@ik...> - 2012-05-23 08:10:44
|
Quoting Alexander Liebendorfer <ale...@gm...>: > About the interpolation, I was using standard linear interpolation > here, I didn't think that's really all that expensive. > As for caching information about the last CP, yeah, that sounds like a > good idea, but I have 0 idea how to implement that. I'm not that great at C++ or Qt, but after having a look at the code I'm thinking along the lines of either: - making the iterator in AutomationPattern::valueAt static or - making the iterator a member of the object ...and then check something like ( iterator.peekNext().getTime() > _time && iterator.peekPrevious().getTime() < _time ) each time valueAt is called and unless so, iterate until it is true (most likely 1 step forwards every now and then). -- ra...@ik... http://www.mikseri.net/radioproject |