One helpful reminder is that you're still triggering control events on block
boundaries.

For example: imagine you set the block size to such a large value that each
block lasts one day long.  In that case if you sent a message to vline~ at noon
on Monday to jump to zero then ramp up to one in three seconds, then at noon
on Tuesday it would jump to zero then ramp up to one in three seconds.







On Saturday, September 26, 2015 1:22 AM, Matt Barber <brbrofsvl@gmail.com> wrote:


Very quickly:

1) vline~ stores a linked list of events with start times and target times (the end point of the linear movement) using the t_vseg struct; events are scheduled in the vline_tilde_float routine.

2) vline_tilde_new sets all of the relevant struct members. You'll want to see how the x_referencetime member works because it's used to measure time everywhere else. There are lots of 

3) As vline_tilde_perform runs, it checks every sample to see if the start time of the next event(s) have elapsed (it's possible to have two events at the same logical time, where one leaps to a value and the other ramps from that value). It calculates the increment based on a linear interpolation from the start time to the target time, and from there it can increment until the target time has elapsed. The interpolation is how it gets subsample accuracy. Checking every sample to see if a new event should start is more expensive than checking every block (obviously).

4) A lot of the clock objects and functions are in m_sched.c; there are others in the system interface file s_inter.c

Hopefully this is all correct. If not, someone else please chime in.

On Fri, Sep 25, 2015 at 3:21 AM, i go bananas <hard.off@gmail.com> wrote:
I want to recreate the timing accuracy of vline~ in a c++ project, and there's something that i can't figure out exactly - how does it act, seemingly outside of the block construct, to get its accuracy?

in the source code, there is a calculation for elapsed logical time, and i assume that has something to do with it?

if i make a vline~ from 0 to 1, over 10ms, does this mean that it actually doesn't START right on 0, but rather starts at a slightly offset value to compensate for the block boundary?

any help would be appreciated!

_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list



_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list