<?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>Macros</title> <link rel="stylesheet" type="text/css" href="csound.css" /> <link rel="stylesheet" type="text/css" href="syntax-highlighting.css" /> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /> <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" /> <link rel="up" href="OrchTop.html" title="Syntax of the Orchestra" /> <link rel="prev" href="OrchNomen.html" title="Nomenclature" /> <link rel="next" href="OrchNamedInstruments.html" title="Named Instruments" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">Macros</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="OrchNomen.html">Prev</a> </td> <th width="60%" align="center">Syntax of the Orchestra</th> <td width="20%" align="right"> <a accesskey="n" href="OrchNamedInstruments.html">Next</a></td> </tr> </table> <hr /> </div> <div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"><a id="OrchMacros"></a>Macros</h2> </div> </div> </div> <p> Orchestra macros work like C preprocessor macros, and replace the content of the macro in the orchestra before it is compiled. The opcodes one can use to create, call, or undefine orchestra macros are: </p> <div class="itemizedlist"> <ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> <p> <a class="link" href="define.html" title="#define"> <em class="citetitle">#define</em> </a> </p> </li> <li class="listitem"> <p> <a class="link" href="dollar.html" title="$NAME"> <em class="citetitle">$NAME</em> </a> </p> </li> <li class="listitem"> <p> <a class="link" href="ifdef.html" title="#ifdef"> <em class="citetitle">#ifdef</em> </a> </p> </li> <li class="listitem"> <p> <a class="link" href="ifndef.html" title="#ifndef"> <em class="citetitle">#ifndef</em> </a> </p> </li> <li class="listitem"> <p> <a class="link" href="ifdef.html" title="#ifdef"> <em class="citetitle">#end</em> </a> </p> </li> <li class="listitem"> <p> <a class="link" href="ifdef.html" title="#ifdef"> <em class="citetitle">#else</em> </a> </p> </li> <li class="listitem"> <p> <a class="link" href="include.html" title="#include"> <em class="citetitle">#include</em> </a> </p> </li> <li class="listitem"> <p> <a class="link" href="undef.html" title="#undef"> <em class="citetitle">#undef</em> </a> </p> </li> </ul> </div> <p> </p> <p> Orchestra macros can also be defined using the command line flag <a class="link" href="CommandFlagsCategory.html#FlagsCatMinusOmacro"><em class="citetitle">--omacro:</em></a>. </p> <p> More information and examples on the usage of orchestra macros can be found in the entry for <a class="link" href="define.html" title="#define"><em class="citetitle">#define</em></a>. </p> <p> These opcodes refer to orchestra macros; for score macros, refer to <a class="link" href="ScoreMacros.html" title="Score Macros"><em class="citetitle">Score Macros</em></a>. </p> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="OrchNomen.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="OrchTop.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="OrchNamedInstruments.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">Nomenclature </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> Named Instruments</td> </tr> </table> </div> </body> </html>