Files
stk/doc/html/classInstrmnt.html
2013-09-29 23:40:35 +02:00

145 lines
10 KiB
HTML

<HTML>
<HEAD>
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<img src="princeton.gif"> &nbsp; <img src="ccrma.gif"> &nbsp; <img src="mcgill.gif"><P>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="information.html">Information</a> &nbsp; <a class="qindex" href="classes.html">Classes</a> &nbsp; <a class="qindex" href="download.html">Download</a> &nbsp; <a class="qindex" href="usage.html">Usage</a> &nbsp; <a class="qindex" href="maillist.html">Mail List</a> &nbsp; <a class="qindex" href="system.html">Requirements</a> &nbsp; <a class="qindex" href="links.html">Links</a> &nbsp; <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
<HR>
<!-- Generated by Doxygen 1.4.4 -->
<h1>Instrmnt Class Reference</h1><!-- doxytag: class="Instrmnt" --><!-- doxytag: inherits="Stk" --><code>#include &lt;<a class="el" href="Instrmnt_8h-source.html">Instrmnt.h</a>&gt;</code>
<p>
<p>Inheritance diagram for Instrmnt:
<p><center><img src="classInstrmnt.png" usemap="#Instrmnt_map" border="0" alt=""></center>
<map name="Instrmnt_map">
<area href="classStk.html" alt="Stk" shape="rect" coords="0,0,75,24">
<area href="classBandedWG.html" alt="BandedWG" shape="rect" coords="85,112,160,136">
<area href="classBlowBotl.html" alt="BlowBotl" shape="rect" coords="85,168,160,192">
<area href="classBlowHole.html" alt="BlowHole" shape="rect" coords="85,224,160,248">
<area href="classBowed.html" alt="Bowed" shape="rect" coords="85,280,160,304">
<area href="classBrass.html" alt="Brass" shape="rect" coords="85,336,160,360">
<area href="classClarinet.html" alt="Clarinet" shape="rect" coords="85,392,160,416">
<area href="classDrummer.html" alt="Drummer" shape="rect" coords="85,448,160,472">
<area href="classFlute.html" alt="Flute" shape="rect" coords="85,504,160,528">
<area href="classFM.html" alt="FM" shape="rect" coords="85,560,160,584">
<area href="classMesh2D.html" alt="Mesh2D" shape="rect" coords="85,616,160,640">
<area href="classModal.html" alt="Modal" shape="rect" coords="85,672,160,696">
<area href="classPlucked.html" alt="Plucked" shape="rect" coords="85,728,160,752">
<area href="classPluckTwo.html" alt="PluckTwo" shape="rect" coords="85,784,160,808">
<area href="classResonate.html" alt="Resonate" shape="rect" coords="85,840,160,864">
<area href="classSampler.html" alt="Sampler" shape="rect" coords="85,896,160,920">
<area href="classSaxofony.html" alt="Saxofony" shape="rect" coords="85,952,160,976">
<area href="classShakers.html" alt="Shakers" shape="rect" coords="85,1008,160,1032">
<area href="classSimple.html" alt="Simple" shape="rect" coords="85,1064,160,1088">
<area href="classSitar.html" alt="Sitar" shape="rect" coords="85,1120,160,1144">
<area href="classStifKarp.html" alt="StifKarp" shape="rect" coords="85,1176,160,1200">
<area href="classVoicForm.html" alt="VoicForm" shape="rect" coords="85,1232,160,1256">
<area href="classWhistle.html" alt="Whistle" shape="rect" coords="85,1288,160,1312">
</map>
<a href="classInstrmnt-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
STK instrument abstract base class.
<p>
This class provides a common interface for all STK instruments.<p>
by Perry R. Cook and Gary P. Scavone, 1995 - 2005.
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0"></a><!-- doxytag: member="Instrmnt::Instrmnt" ref="a0" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInstrmnt.html#a0">Instrmnt</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1"></a><!-- doxytag: member="Instrmnt::~Instrmnt" ref="a1" args="()" -->
virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInstrmnt.html#a1">~Instrmnt</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Class destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2"></a><!-- doxytag: member="Instrmnt::noteOn" ref="a2" args="(StkFloat frequency, StkFloat amplitude)=0" -->
virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInstrmnt.html#a2">noteOn</a> (StkFloat frequency, StkFloat amplitude)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Start a note with the given frequency and amplitude. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3"></a><!-- doxytag: member="Instrmnt::noteOff" ref="a3" args="(StkFloat amplitude)=0" -->
virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInstrmnt.html#a3">noteOff</a> (StkFloat amplitude)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stop a note with the given amplitude (speed of decay). <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4"></a><!-- doxytag: member="Instrmnt::setFrequency" ref="a4" args="(StkFloat frequency)" -->
virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInstrmnt.html#a4">setFrequency</a> (StkFloat frequency)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set instrument parameters for a particular frequency. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5"></a><!-- doxytag: member="Instrmnt::lastOut" ref="a5" args="() const " -->
StkFloat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInstrmnt.html#a5">lastOut</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the last output value. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a6"></a><!-- doxytag: member="Instrmnt::lastOutLeft" ref="a6" args="() const " -->
StkFloat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInstrmnt.html#a6">lastOutLeft</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the last left output value. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a7"></a><!-- doxytag: member="Instrmnt::lastOutRight" ref="a7" args="() const " -->
StkFloat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInstrmnt.html#a7">lastOutRight</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the last right output value. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8"></a><!-- doxytag: member="Instrmnt::tick" ref="a8" args="(void)" -->
StkFloat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInstrmnt.html#a8">tick</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compute one sample and output. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classStkFrames.html">StkFrames</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInstrmnt.html#a9">tick</a> (<a class="el" href="classStkFrames.html">StkFrames</a> &amp;frames, unsigned int channel=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fill a channel of the <a class="el" href="classStkFrames.html">StkFrames</a> object with computed outputs. <a href="#a9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a10"></a><!-- doxytag: member="Instrmnt::controlChange" ref="a10" args="(int number, StkFloat value)" -->
virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInstrmnt.html#a10">controlChange</a> (int number, StkFloat value)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Perform the control change specified by <em>number</em> and <em>value</em> (0.0 - 128.0). <br></td></tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a9"></a><!-- doxytag: member="Instrmnt::tick" ref="a9" args="(StkFrames &amp;frames, unsigned int channel=0)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"><a class="el" href="classStkFrames.html">StkFrames</a>&amp; Instrmnt::tick </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classStkFrames.html">StkFrames</a> &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>frames</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int&nbsp;</td>
<td class="mdname" nowrap> <em>channel</em> = <code>0</code></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Fill a channel of the <a class="el" href="classStkFrames.html">StkFrames</a> object with computed outputs.
<p>
The <code>channel</code> argument should be zero or greater (the first channel is specified by 0). An <a class="el" href="classStkError.html">StkError</a> will be thrown if the <code>channel</code> argument is equal to or greater than the number of channels in the <a class="el" href="classStkFrames.html">StkFrames</a> object. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="Instrmnt_8h-source.html">Instrmnt.h</a></ul>
<HR>
<table>
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
<tr><td>&copy;1995-2005 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
</table>
</BODY>
</HTML>