<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>qinf</title> <link rel="stylesheet" type="text/css" href="csound.css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /> <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" /> <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" /> <link rel="prev" href="pwd.html" title="pwd" /> <link rel="next" href="qnan.html" title="qnan" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">qinf</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="pwd.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="qnan.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry" title="qinf"> <a id="qinf"></a> <div class="titlepage"></div> <a id="IndexQinf" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">qinf</span> </h2> <p>qinf — Questions whether the argument is a infinite number </p> </div> <div class="refsect1" title="Description"> <a id="idp39760184"></a> <h2>Description</h2> <p> Returns the number of times the argument is not a number, with the sign of the first infinity. </p> </div> <div class="refsect1" title="Syntax"> <a id="idp39760896"></a> <h2>Syntax</h2> <pre class="synopsis"><span class="command"><strong>qinf</strong></span>(x) (no rate restriction)</pre> </div> <div class="refsect1" title="Examples"> <a id="idp39761920"></a> <h2>Examples</h2> <p> Here is an example of the qinf opcode. It uses the file <a class="ulink" href="examples/qinf.csd" target="_top"><em class="citetitle">qinf.csd</em></a>. </p> <div class="example"> <a id="idp39804872"></a> <p class="title"> <strong>Example 694. Example of the qinf opcode.</strong> </p> <div class="example-contents"> <p>See the sections <a class="link" href="UsingRealTime.html" title="Real-Time Audio"><em class="citetitle">Real-time Audio</em></a> and <a class="link" href="CommandFlags.html" title="Csound command line"><em class="citetitle">Command Line Flags</em></a> for more information on using command line flags.</p> <pre class="programlisting"> <span class="csdtag"><CsoundSynthesizer></span> <span class="csdtag"><CsOptions></span> -+rtaudio=alsa -o dac:hw:0 <span class="csdtag"></CsOptions></span> <span class="csdtag"><CsInstruments></span> <span class="ohdr">nchnls</span> <span class="op">=</span> 2 <span class="ohdr">ksmps</span> <span class="op">=</span> 400 <span class="omacro">#define</span> WII_B #3# <span class="omacro">#define</span> WII_A #4# <span class="omacro">#define</span> WII_R_A #304# <span class="omacro">#define</span> WII_PITCH #20# <span class="omacro">#define</span> WII_ROLL #21# gkcnt <span class="opc">init</span> 1 <span class="oblock">instr</span> 1 i1 wiiconnect 3,1 wiirange $WII_PITCH., <span class="op">-</span>20, 0 kt wiidata $WII_B. ka wiidata $WII_A. kra wiidata $WII_R_A. gka wiidata $WII_PITCH. gkp wiidata $WII_ROLL. <span class="comment">; If the B (trigger) button is pressed then activate a note</span> <span class="octrl">if</span> (kt<span class="op">==</span>0) <span class="octrl">goto</span> ee <span class="octrl">if</span> (qinf(gka)) <span class="octrl">goto</span> ee <span class="octrl">if</span> (qinf(gkp)) <span class="octrl">goto</span> ee <span class="opc">event</span> "i", 2, 0, 5 gkcnt <span class="op">=</span> gkcnt <span class="op">+</span> 1 <span class="opc">printk2</span> kb <span class="oblock">endin</span> <span class="oblock">instr</span> 2 a1 <span class="opc">oscil</span> <span class="opc">ampdbfs</span>(gka), 440<span class="op">+</span>gkp, 1 <span class="opc">outs</span> a1, a1 <span class="oblock">endin</span> <span class="csdtag"></CsInstruments></span> <span class="csdtag"><CsScore></span> <span class="stamnt">f</span>1 0 4096 10 1 <span class="stamnt">i</span>1 0 300 <span class="csdtag"></CsScore></span> <span class="csdtag"></CsoundSynthesizer></span> </pre> </div> </div> <p><br class="example-break" /> </p> </div> <div class="refsect1" title="Credits"> <a id="idp39807136"></a> <h2>Credits</h2> <p>Written by John ffitch.</p> <p>New in Csound 5.14</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="pwd.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="OpcodesTop.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="qnan.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">pwd </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> qnan</td> </tr> </table> </div> </body> </html>