<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div>There are probably a lot more ways to implement ramps.  For example, you</div><div dir="ltr" id="yui_3_16_0_1_1443799821638_12529">could increment only at block boundaries and just repeat that value for the</div><div id="yui_3_16_0_1_1443799821638_12614" dir="ltr">rest of the block.  That would looks a lot like Supercollider's "kr" ugens.  (I</div><div id="yui_3_16_0_1_1443799821638_13045" dir="ltr">actually thought that's how [line~] worked until I looked at the code.)</div><div id="yui_3_16_0_1_1443799821638_13075" dir="ltr"><br></div><div id="yui_3_16_0_1_1443799821638_13337" dir="ltr">Btw-- does it cost anything significant to dereference x->x_inc inside the</div><div id="yui_3_16_0_1_1443799821638_13311" dir="ltr">while loop of line_tilde_perform?  Or is the compiler able to somehow</div><div id="yui_3_16_0_1_1443799821638_13336" dir="ltr">optimize that?</div><div id="yui_3_16_0_1_1443799821638_13310" dir="ltr"><br></div><div id="yui_3_16_0_1_1443799821638_13350" dir="ltr">-Jonathan<br></div><div id="yui_3_16_0_1_1443799821638_12483"><span></span></div>  <br><div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_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 dir="ltr"> <font face="Arial" size="2"> On Friday, October 2, 2015 11:36 AM, i go bananas <hard.off@gmail.com> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container"><div id="yiv8848188203"><div>Hi, me again.  <div><br clear="none"></div><div>Thanks for the discussion.  It has really opened my eyes.  </div><div><br clear="none"></div><div>So, i got my naive c++ implementation of line~ basically working.  </div><div><br clear="none"></div><div>And of course, just running a for loop incrementing by ticks, i run into the exact precision error that this block quantizing seems to avoid.  My line from 0 to 100 over 44100 samples only gets to 99.93   </div><div><br clear="none"></div><div>So, i also need to add something like pd's block quantization to make sure my line goes all the way to the specified value.  </div><div><br clear="none"></div><div>My questions then are 2:  </div><div><br clear="none"></div><div>Is pd's method the way i should do it?  Or is there a better alternative?  </div><div><br clear="none"></div><div>And, if i do it the pd way, how does that work?  Does the increment get updated every block?   Or is it just the last block that is stretched?  </div></div></div><br><br></div>  </div> </div>  </div></div></body></html>