<?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>GEN Routines</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="ScoregensTop.html" title="Score Statements and GEN Routines" /> <link rel="prev" href="rightbrace.html" title="} Statement" /> <link rel="next" href="GEN01.html" title="GEN01" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">GEN Routines</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="rightbrace.html">Prev</a> </td> <th width="60%" align="center">Score Statements and GEN Routines</th> <td width="20%" align="right"> <a accesskey="n" href="GEN01.html">Next</a></td> </tr> </table> <hr /> </div> <div class="section" title="GEN Routines"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"><a id="ScoreGenRef"></a>GEN Routines</h2> </div> </div> </div> <p>GEN routines are used as data generators for function tables. When a function table is created using the <a class="link" href="f.html" title="f Statement (or Function Table Statement)"><em class="citetitle">f score statement</em></a> the GEN function is given as its fourth argument. A negative GEN number implies that the function is not rescaled, and maintains its original values.</p> <h3><a id="idp76985512"></a>Sine/Cosine Generators: </h3> <div class="itemizedlist"> <ul class="itemizedlist" type="disc"> <li class="listitem"><a class="link" href="GEN09.html" title="GEN09"><em class="citetitle">GEN09</em></a> - Composite waveforms made up of weighted sums of simple sinusoids.</li> <li class="listitem"><a class="link" href="GEN10.html" title="GEN10"><em class="citetitle">GEN10</em></a> - Composite waveforms made up of weighted sums of simple sinusoids.</li> <li class="listitem"><a class="link" href="GEN11.html" title="GEN11"><em class="citetitle">GEN11</em></a> - Additive set of cosine partials.</li> <li class="listitem"><a class="link" href="GEN19.html" title="GEN19"><em class="citetitle">GEN19</em></a> - Composite waveforms made up of weighted sums of simple sinusoids.</li> <li class="listitem"><a class="link" href="GEN30.html" title="GEN30"><em class="citetitle">GEN30</em></a> - Generates harmonic partials by analyzing an existing table.</li> <li class="listitem"><a class="link" href="GEN33.html" title="GEN33"><em class="citetitle">GEN33</em></a> - Generate composite waveforms by mixing simple sinusoids.</li> <li class="listitem"><a class="link" href="GEN34.html" title="GEN34"><em class="citetitle">GEN34</em></a> - Generate composite waveforms by mixing simple sinusoids.</li> </ul> </div> <h3><a id="idp76992112"></a> Line/Exponential Segment Generators: </h3> <div class="itemizedlist"> <ul class="itemizedlist" type="disc"> <li class="listitem"><a class="link" href="GEN05.html" title="GEN05"><em class="citetitle">GEN05</em></a> - Constructs functions from segments of exponential curves.</li> <li class="listitem"><a class="link" href="GEN06.html" title="GEN06"><em class="citetitle">GEN06</em></a> - Generates a function comprised of segments of cubic polynomials.</li> <li class="listitem"><a class="link" href="GEN07.html" title="GEN07"><em class="citetitle">GEN07</em></a> - Constructs functions from segments of straight lines.</li> <li class="listitem"><a class="link" href="GEN08.html" title="GEN08"><em class="citetitle">GEN08</em></a> - Generate a piecewise cubic spline curve.</li> <li class="listitem"><a class="link" href="GEN16.html" title="GEN16"><em class="citetitle">GEN16</em></a> - Creates a table from a starting value to an ending value.</li> <li class="listitem"><a class="link" href="GEN25.html" title="GEN25"><em class="citetitle">GEN25</em></a> - Construct functions from segments of exponential curves in breakpoint fashion.</li> <li class="listitem"><a class="link" href="GEN27.html" title="GEN27"><em class="citetitle">GEN27</em></a> - Construct functions from segments of straight lines in breakpoint fashion.</li> </ul> </div> <h3><a id="idp76998760"></a> File Access GEN Routines: </h3> <div class="itemizedlist"> <ul class="itemizedlist" type="disc"> <li class="listitem"><a class="link" href="GEN01.html" title="GEN01"><em class="citetitle">GEN01</em></a> - Transfers data from a soundfile into a function table.</li> <li class="listitem"><a class="link" href="GEN23.html" title="GEN23"><em class="citetitle">GEN23</em></a> - Reads numeric values from a text file.</li> <li class="listitem"><a class="link" href="GEN28.html" title="GEN28"><em class="citetitle">GEN28</em></a> - Reads a text file which contains a time-tagged trajectory.</li> <li class="listitem"><a class="link" href="GEN49.html" title="GEN49"><em class="citetitle">GEN49</em></a> - Transfers data from an MP3 soundfile into a function table.</li> </ul> </div> <h3><a id="idp77002632"></a> Numeric Value Access GEN Routines </h3> <div class="itemizedlist"> <ul class="itemizedlist" type="disc"> <li class="listitem"><a class="link" href="GEN02.html" title="GEN02"><em class="citetitle">GEN02</em></a> - Transfers data from immediate pfields into a function table.</li> <li class="listitem"><a class="link" href="GEN17.html" title="GEN17"><em class="citetitle">GEN17</em></a> - Creates a step function from given x-y pairs.</li> <li class="listitem"><a class="link" href="GEN52.html" title="GEN52"><em class="citetitle">GEN52</em></a> - Creates an interleaved multichannel table from the specified source tables, in the format expected by the <span class="emphasis"><em>ftconv</em></span> opcode.</li> </ul> </div> <h3><a id="idp77005984"></a> Window Function GEN Routines </h3> <div class="itemizedlist"> <ul class="itemizedlist" type="disc"> <li class="listitem"><a class="link" href="GEN20.html" title="GEN20"><em class="citetitle">GEN20</em></a> - Generates functions of different windows.</li> </ul> </div> <h3><a id="idp77015848"></a> Random Function GEN Routines </h3> <div class="itemizedlist"> <ul class="itemizedlist" type="disc"> <li class="listitem"><a class="link" href="GEN21.html" title="GEN21"><em class="citetitle">GEN21</em></a> - Generates tables of different random distributions.</li> <li class="listitem"><a class="link" href="GEN40.html" title="GEN40"><em class="citetitle">GEN40</em></a> - Generates a random distribution using a distribution histogram.</li> <li class="listitem"><a class="link" href="GEN41.html" title="GEN41"><em class="citetitle">GEN41</em></a> - Generates a random list of numerical pairs.</li> <li class="listitem"><a class="link" href="GEN42.html" title="GEN42"><em class="citetitle">GEN42</em></a> - Generates a random distribution of discrete ranges of values.</li> <li class="listitem"><a class="link" href="GEN43.html" title="GEN43"><em class="citetitle">GEN43</em></a> - Loads a PVOCEX file containing a PV analysis.</li> </ul> </div> <h3><a id="idp77020608"></a> Waveshaping GEN Routines </h3> <div class="itemizedlist"> <ul class="itemizedlist" type="disc"> <li class="listitem"><a class="link" href="GEN03.html" title="GEN03"><em class="citetitle">GEN03</em></a> - Generates a stored function table by evaluating a polynomial.</li> <li class="listitem"><a class="link" href="GEN13.html" title="GEN13"><em class="citetitle">GEN13</em></a> - Stores a polynomial whose coefficients derive from the Chebyshev polynomials of the first kind.</li> <li class="listitem"><a class="link" href="GEN14.html" title="GEN14"><em class="citetitle">GEN14</em></a> - Stores a polynomial whose coefficients derive from Chebyshevs of the second kind.</li> <li class="listitem"><a class="link" href="GEN15.html" title="GEN15"><em class="citetitle">GEN15</em></a> - Creates two tables of stored polynomial functions.</li> </ul> </div> <h3><a id="idp77024800"></a> Amplitude Scaling GEN Routines </h3> <div class="itemizedlist"> <ul class="itemizedlist" type="disc"> <li class="listitem"><a class="link" href="GEN04.html" title="GEN04"><em class="citetitle">GEN04</em></a> - Generates a normalizing function.</li> <li class="listitem"><a class="link" href="GEN12.html" title="GEN12"><em class="citetitle">GEN12</em></a> - Generates the log of a modified Bessel function of the second kind.</li> <li class="listitem"><a class="link" href="GEN24.html" title="GEN24"><em class="citetitle">GEN24</em></a> - Reads numeric values from another allocated function-table and rescales them.</li> </ul> </div> <h3><a id="idp77028032"></a> Mixing GEN Routines </h3> <div class="itemizedlist"> <ul class="itemizedlist" type="disc"> <li class="listitem"><a class="link" href="GEN18.html" title="GEN18"><em class="citetitle">GEN18</em></a> - Writes composite waveforms made up of pre-existing waveforms.</li> <li class="listitem"><a class="link" href="GEN31.html" title="GEN31"><em class="citetitle">GEN31</em></a> - Mixes any waveform specified in an existing table.</li> <li class="listitem"><a class="link" href="GEN32.html" title="GEN32"><em class="citetitle">GEN32</em></a> - Mixes any waveform, resampled with either FFT or linear interpolation.</li> </ul> </div> <h3><a id="idp77031192"></a> Pitch and Tuning GEN Routines </h3> <div class="itemizedlist"> <ul class="itemizedlist" type="disc"> <li class="listitem"><a class="link" href="GEN51.html" title="GEN51"><em class="citetitle">GEN51</em></a> - fills a table with a fully customized micro-tuning scale, in the manner of Csound opcodes <span class="emphasis"><em>cpstun</em></span>, <span class="emphasis"><em>cpstuni</em></span> and <span class="emphasis"><em>cpstmid</em></span>.</li> </ul> </div> <h3><a id="idp77033208"></a> Named GEN Routines </h3> <p>Csound's GEN routines can be extended with GEN function plugins. There is currently a simple GEN plugin that provides exponential and hyperbolic tangent functions, and the sone function. There is also a generator called farey for the Farey sequence operations. These GEN functions are not called by number, but by name.</p> <div class="itemizedlist"> <ul class="itemizedlist" type="disc"> <li class="listitem"><a class="link" href="GENtanh.html" title="GENtanh"><em class="citetitle">"tanh"</em></a> - fills a table from a hyperbolic tangent formula.</li> <li class="listitem"><a class="link" href="GENexp.html" title="GENexp"><em class="citetitle">"exp"</em></a> - fills a table from an exponential formula.</li> <li class="listitem"><a class="link" href="GENsone.html" title="GENsone"><em class="citetitle">"sone"</em></a> - fills a table from a sone function formula.</li> <li class="listitem"><a class="link" href="GENfarey.html" title="GENfarey"><em class="citetitle">"farey"</em></a> - fills a table from a Farey sequence.</li> <li class="listitem"><a class="link" href="GENwave.html" title="GENwave"><em class="citetitle">"wave"</em></a> - fills a table from a wavelet transform.</li> </ul> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="rightbrace.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="ScoregensTop.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="GEN01.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">} Statement </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> GEN01</td> </tr> </table> </div> </body> </html>