<br><br><div><span class="gmail_quote">On 26/11/2007, <b class="gmail_sendername">Juan-Pablo Caceres</b> &lt;<a href="mailto:jcaceres@ccrma.stanford.edu">jcaceres@ccrma.stanford.edu</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello list,</blockquote><div><br><br>Hey there! <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">This is kind of a silly question, but do you guys remember how to print
<br>a duration on a specific unit? What I mean is something like this:<br><br>1::second =&gt; dur mydur;<br>&lt;&lt;&lt; mydur &gt;&gt;&gt;; //see the output in seconds (or another time unit) rather<br>than samples</blockquote>
<div><br>Well, as mydur is some amount of time we can simply divide it by &quot;a second&quot;, It&#39;s that simple :-).<br><br>&lt;&lt;&lt; mydur / 1.0::second, &quot;seconds&quot; &gt;&gt;&gt;;<br><br>I put the 1.0 there to make sure we don&#39;t get that weird integer math rounding business, I don&#39;t think we actually need that but i&#39;m not on a chucking computer right now so i can&#39;t test it.
<br>&nbsp;<br>Anyway, using this logic you can also express it in days or bars or beats (asuming you define those last two) or whatever, as long as it&#39;s some sort of time. the result will be a flaot without a unit, as per highschool physics.
<br></div><br><br>Happy ChucKing!<br>Kas.<br></div>