1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> 2<head> 3<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 4<title>SND_CalcTimer</title> 5<link rel="stylesheet" href="../css/nitro.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.65.1"> 7</head> 8<body> 9<div class="refentry" lang="ja"><a name="IDAKKWT"></a><div class="titlepage"> 10<div></div> 11<div></div> 12</div> 13<h1>SND_CalcTimer <IMG src="../image/NTR.gif" width="24" height="12" border="0" align=middle><IMG src="../image/TWL.gif" width="24" height="12" border="0" align=middle></h1> 14<h2>Syntax</h2> 15<dl> 16<dd><pre class="funcsynopsisinfo"><code>#include <nitro/snd.h></code></pre></dd> 17<dd><pre class="funcprototype"><code class="funcprototype">u16 SND_CalcTimer( int <var>orgTimer</var>, int <var>pitch</var> );</code><br></pre></dd> 18</dl> 19<div class="refsection" lang="ja"><a name="IDA0LWT"></a> 20 <h2>Arguments</h2> 21 22 <div class="variablelist"> 23<table border="0"> 24<col align="left" valign="top"> 25<tbody> 26<tr> 27<td><em><strong><font face="Courier New">orgTimer</font></strong></em></td> 28<td>The original timer value.</td> 29</tr> 30<tr> 31<td><em><strong><font face="Courier New">pitch</font></strong></em></td> 32<td>The pitch-change value.</td> 33</tr> 34</tbody> 35</table> 36</div> 37 38 </div> 39<div class="refsection" lang="ja"><a name="IDAQMWT"></a> 40 <h2>Return Values</h2> 41 42 <p>The timer value after pitch conversion.</p> 43 </div> 44<div class="refsection" lang="ja"><a name="IDAXMWT"></a> 45 <h2>Description</h2> 46 <p> 47Calculates the timer value after pitch conversion. 48</p> 49 <p> 50When the pitch-conversion value <code>pitch</code> is a positive number, the timer cycle speeds up. When it is negative, the time cycle slows down. Pitch changes by exactly a half-tone when value is set to 64. In other words, timer frequency = 2 ** ( 1 / 12 ) tone. 51</p> 52 <p> 53The calculation is performed using the following equation: 54</p> 55 <pre class="programlisting"><em><strong><code>orgTimer</code></strong></em> ÷ (2 ** ( <em><strong><code>pitch</code></strong></em> / ( 64 × 12 ) ) )</pre> 56 </div> 57<h2>See Also</h2> 58<p>None.</p> 59<h2>Revision History</h2> 60<p>2004/07/20 Initial version.</p> 61</div> 62<hr><p>CONFIDENTIAL</p></body> 63</html> 64