<?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>exitnow</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="event_i.html" title="event_i" /> <link rel="next" href="exp.html" title="exp" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">exitnow</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="event_i.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="exp.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry" title="exitnow"> <a id="exitnow"></a> <div class="titlepage"></div> <a id="IndexExitnow" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">exitnow</span> </h2> <p>exitnow — Exit Csound as fast as possible, with no cleaning up. </p> </div> <div class="refsect1" title="Description"> <a id="idp19450752"></a> <h2>Description</h2> <p> In Csound4 calls an exit function to leave Csound as fast as possible. On Csound5 exits back to the driving code. </p> </div> <div class="refsect1" title="Syntax"> <a id="idp19451480"></a> <h2>Syntax</h2> <pre class="synopsis"> <span class="command"> <strong>exitnow</strong> </span> </pre> </div> <div class="refsect1" title="Performance"> <a id="idp19452408"></a> <h2>Performance</h2> <p> Stops Csound on the initialisation cycle. </p> </div> <div class="refsect1" title="Examples"> <a id="idp19503648"></a> <h2>Examples</h2> <p> Here is an example of the exitnow opcode. It uses the file <a class="ulink" href="examples/exitnow.csd" target="_top"><em class="citetitle">exitnow.csd</em></a>. </p> <div class="example"> <a id="idp19504544"></a> <p class="title"> <strong>Example 212. Example of the exitnow 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> <span class="comment">; Select audio/midi flags here according to platform</span> -n <span class="comment">;;;no sound</span> <span class="comment">;-iadc ;;;uncomment -iadc if realtime audio input is needed too</span> <span class="comment">; For Non-realtime ouput leave only the line below:</span> <span class="comment">; -o exitnow.wav -W ;;; for file output any platform</span> <span class="csdtag"></CsOptions></span> <span class="csdtag"><CsInstruments></span> <span class="comment">;after an example by Iain McCurdy</span> <span class="ohdr">sr</span> <span class="op">=</span> 44100 <span class="ohdr">ksmps</span> <span class="op">=</span> 32 <span class="ohdr">nchnls</span> <span class="op">=</span> 2 <span class="ohdr">0dbfs</span> <span class="op">=</span> 1 <span class="opc">FLcolor</span> 200, 200, 200, 0, 0, 0 <span class="comment">; LABEL | WIDTH | HEIGHT | X | Y</span> <span class="opc">FLpanel</span> "rtclock", 500, 130, 0, 0 <span class="comment">; ON,OFF,TYPE,WIDTH, HEIGHT, X, Y, OPCODE, INS,START,IDUR</span> gkOnOff,ihOnOff <span class="opc">FLbutton</span> "On<span class="op">/</span>Off", 1, 0, 22, 150, 25, 5, 5, 0, 1, 0, 3600 gkExit,ihExit <span class="opc">FLbutton</span> "exitnow",1, 0, 21, 150, 25, 345, 5, 0, 999, 0, 0.001 <span class="opc">FLsetColor2</span> 255, 0, 50, ihOnOff <span class="comment">;reddish color</span> <span class="comment">;VALUE DISPLAY BOXES WIDTH,HEIGHT,X, Y</span> gidclock <span class="opc">FLvalue</span> "clock", 100, 25, 200, 60 <span class="opc">FLsetVal_i</span> 1, ihOnOff <span class="opc">FLpanel_end</span> <span class="opc">FLrun</span> <span class="oblock">instr</span> 1 <span class="octrl">if</span> gkOnOff <span class="op">!=</span>0 <span class="octrl">kgoto</span> <span class="olabel">CONTINUE</span> <span class="comment">;sense if FLTK on/off switch is not off (in which case skip the next line) </span> <span class="opc">turnoff</span> <span class="comment">;turn this instr. off now</span> <span class="olabel">CONTINUE</span><span class="op">:</span> ktime <span class="opc">rtclock</span> <span class="comment">;clock continues to run even </span> <span class="opc">FLprintk2</span> ktime, gidclock <span class="comment">;after the on/off button was used to stop</span> <span class="oblock">endin</span> <span class="oblock">instr</span> 999 <span class="opc">exitnow</span> <span class="comment">;exit Csound as fast as possible</span> <span class="oblock">endin</span> <span class="csdtag"></CsInstruments></span> <span class="csdtag"><CsScore></span> <span class="stamnt">f</span> 0 60 <span class="comment">;runs 60 seconds</span> <span class="stamnt">e</span> <span class="csdtag"></CsScore></span> <span class="csdtag"></CsoundSynthesizer></span> </pre> </div> </div> <p><br class="example-break" /> </p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="event_i.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="exp.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">event_i </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> exp</td> </tr> </table> </div> </body> </html>