<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yiv2711238482"><div id="yui_3_16_0_1_1443245170344_14467"><div id="yui_3_16_0_1_1443245170344_14466" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"><div dir="ltr">One helpful reminder is that you're still triggering control events on block</div><div dir="ltr" id="yiv2711238482yui_3_16_0_1_1443245170344_5338">boundaries.</div><div dir="ltr" id="yiv2711238482yui_3_16_0_1_1443245170344_5339"><br clear="none"></div><div dir="ltr" id="yiv2711238482yui_3_16_0_1_1443245170344_5360">For example: imagine you set the block size to such a large value that each</div><div dir="ltr" id="yiv2711238482yui_3_16_0_1_1443245170344_5362">block lasts one day long.  In that case if you sent a message to vline~ at noon</div><div dir="ltr" id="yiv2711238482yui_3_16_0_1_1443245170344_5363">on Monday to jump to zero then ramp up to one in three seconds, then at noon</div><div dir="ltr" id="yiv2711238482yui_3_16_0_1_1443245170344_6235">on Tuesday it would jump to zero then ramp up to one in three seconds.<br clear="none"></div><div dir="ltr" id="yiv2711238482yui_3_16_0_1_1443245170344_5408"><br clear="none"></div><br clear="none"><div id="yiv2711238482yui_3_16_0_1_1443245170344_5485"><span></span></div>  <br clear="none"><div id="yui_3_16_0_1_1443245170344_14478" class="yiv2711238482qtdSeparateBR"><br clear="none"><br clear="none"></div></div></div></div><div class=".yiv2711238482yahoo_quoted"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div class="qtdSeparateBR"><br><br></div><div class="yiv2711238482yqt4858091858" id="yiv2711238482yqt12961"><div dir="ltr"> <font face="Arial" size="2"> On Saturday, September 26, 2015 1:22 AM, Matt Barber <brbrofsvl@gmail.com> wrote:<br clear="none"> </font> </div>  <br clear="none"><br clear="none"> <div class="yiv2711238482y_msg_container"><div id="yiv2711238482"><div><div dir="ltr"><div class="yiv2711238482gmail_default" style="font-family:verdana, sans-serif;">Very quickly:</div><div class="yiv2711238482gmail_default" style="font-family:verdana, sans-serif;"><br clear="none"></div><div class="yiv2711238482gmail_default" style="font-family:verdana, sans-serif;">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.</div><div class="yiv2711238482gmail_default" style="font-family:verdana, sans-serif;"><br clear="none"></div><div class="yiv2711238482gmail_default" style="font-family:verdana, sans-serif;">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 </div><div class="yiv2711238482gmail_default" style="font-family:verdana, sans-serif;"><br clear="none"></div><div class="yiv2711238482gmail_default" style="font-family:verdana, sans-serif;">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).<br clear="none"><br clear="none">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</div><div class="yiv2711238482gmail_default" style="font-family:verdana, sans-serif;"><br clear="none"></div><div class="yiv2711238482gmail_default" style="font-family:verdana, sans-serif;">Hopefully this is all correct. If not, someone else please chime in.</div></div><div class="yiv2711238482gmail_extra"><br clear="none"><div class="yiv2711238482gmail_quote">On Fri, Sep 25, 2015 at 3:21 AM, i go bananas <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:hard.off@gmail.com" target="_blank" href="mailto:hard.off@gmail.com">hard.off@gmail.com</a>></span> wrote:<br clear="none"><blockquote class="yiv2711238482gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv2711238482yqt0265312479" id="yiv2711238482yqt18030"><div dir="ltr"><div>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?</div><div><br clear="none"></div><div>in the source code, there is a calculation for elapsed logical time, and i assume that has something to do with it?</div><div><br clear="none"></div><div>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?</div><div><br clear="none"></div><div>any help would be appreciated!</div></div></div>
<br clear="none">_______________________________________________<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:Pd-list@lists.iem.at" target="_blank" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br clear="none">
UNSUBSCRIBE and account-management -> <a rel="nofollow" shape="rect" target="_blank" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div><br clear="none"><div class="yiv2711238482yqt0265312479" id="yiv2711238482yqt31974">_______________________________________________<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:Pd-list@lists.iem.at" target="_blank" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br clear="none">UNSUBSCRIBE and account-management -> <a rel="nofollow" shape="rect" target="_blank" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a><br clear="none"></div><br clear="none"><br clear="none"></div></div>  </div> </div>  </div></div></body></html>