mirror of
https://github.com/thestk/stk
synced 2026-01-12 04:21:52 +00:00
84 lines
7.0 KiB
HTML
84 lines
7.0 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"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
|
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="faq.html">FAQ</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
|
<HR>
|
|
<!-- Generated by Doxygen 1.5.8 -->
|
|
<div class="navpath"><a class="el" href="dir_d499f4756a454d8a02faa5ebe57d576f.html">include</a>
|
|
</div>
|
|
<div class="contents">
|
|
<h1>PluckTwo.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef STK_PLUCKTWO_H</span>
|
|
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define STK_PLUCKTWO_H</span>
|
|
<a name="l00003"></a>00003 <span class="preprocessor"></span>
|
|
<a name="l00004"></a>00004 <span class="preprocessor">#include "Instrmnt.h"</span>
|
|
<a name="l00005"></a>00005 <span class="preprocessor">#include "DelayL.h"</span>
|
|
<a name="l00006"></a>00006 <span class="preprocessor">#include "DelayA.h"</span>
|
|
<a name="l00007"></a>00007 <span class="preprocessor">#include "OneZero.h"</span>
|
|
<a name="l00008"></a>00008
|
|
<a name="l00009"></a>00009 <span class="keyword">namespace </span>stk {
|
|
<a name="l00010"></a>00010
|
|
<a name="l00011"></a>00011 <span class="comment">/***************************************************/</span>
|
|
<a name="l00029"></a>00029 <span class="comment">/***************************************************/</span>
|
|
<a name="l00030"></a>00030
|
|
<a name="l00031"></a><a class="code" href="classstk_1_1PluckTwo.html">00031</a> <span class="keyword">class </span><a class="code" href="classstk_1_1PluckTwo.html" title="STK enhanced plucked string model class.">PluckTwo</a> : <span class="keyword">public</span> <a class="code" href="classstk_1_1Instrmnt.html" title="STK instrument abstract base class.">Instrmnt</a>
|
|
<a name="l00032"></a>00032 {
|
|
<a name="l00033"></a>00033 <span class="keyword">public</span>:
|
|
<a name="l00035"></a>00035 <a class="code" href="classstk_1_1PluckTwo.html#a121655f6007003aebb5de425e98d099" title="Class constructor, taking the lowest desired playing frequency.">PluckTwo</a>( StkFloat lowestFrequency );
|
|
<a name="l00036"></a>00036
|
|
<a name="l00038"></a>00038 <span class="keyword">virtual</span> <a class="code" href="classstk_1_1PluckTwo.html#c8a0720b08d20741b0d8a312f1cf7e5c" title="Class destructor.">~PluckTwo</a>( <span class="keywordtype">void</span> );
|
|
<a name="l00039"></a>00039
|
|
<a name="l00041"></a>00041 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1PluckTwo.html#71821e47009a94de9e8a1f3305263840" title="Reset and clear all internal state.">clear</a>( <span class="keywordtype">void</span> );
|
|
<a name="l00042"></a>00042
|
|
<a name="l00044"></a>00044 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1PluckTwo.html#9f0618a28243b235f6c0f424a236709c" title="Set instrument parameters for a particular frequency.">setFrequency</a>( StkFloat frequency );
|
|
<a name="l00045"></a>00045
|
|
<a name="l00047"></a>00047 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1PluckTwo.html#6b355a495d9122273fb8c88009bf79d6" title="Detune the two strings by the given factor. A value of 1.0 produces unison strings...">setDetune</a>( StkFloat detune );
|
|
<a name="l00048"></a>00048
|
|
<a name="l00050"></a>00050 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1PluckTwo.html#3cd8e9135b1d8a97b87f9486dd3cd671" title="Efficient combined setting of frequency and detuning.">setFreqAndDetune</a>( StkFloat frequency, StkFloat detune );
|
|
<a name="l00051"></a>00051
|
|
<a name="l00053"></a>00053 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1PluckTwo.html#fffb424a2957fc691363ba1227809695" title="Set the pluck or &quot;excitation&quot; position along the string (0.0 - 1.0).">setPluckPosition</a>( StkFloat position );
|
|
<a name="l00054"></a>00054
|
|
<a name="l00056"></a>00056
|
|
<a name="l00061"></a>00061 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1PluckTwo.html#168f563174e22b221744ef66b35a5277" title="Set the base loop gain.">setBaseLoopGain</a>( StkFloat aGain );
|
|
<a name="l00062"></a>00062
|
|
<a name="l00064"></a>00064 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1PluckTwo.html#0d5d81db10c145f3d5bafc5775d147bf" title="Stop a note with the given amplitude (speed of decay).">noteOff</a>( StkFloat amplitude );
|
|
<a name="l00065"></a>00065
|
|
<a name="l00066"></a>00066 <span class="keyword">virtual</span> StkFloat tick( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 0 ) = 0;
|
|
<a name="l00067"></a>00067
|
|
<a name="l00068"></a>00068 <span class="keyword">protected</span>:
|
|
<a name="l00069"></a>00069
|
|
<a name="l00070"></a>00070 <a class="code" href="classstk_1_1DelayA.html" title="STK allpass interpolating delay line class.">DelayA</a> delayLine_;
|
|
<a name="l00071"></a>00071 <a class="code" href="classstk_1_1DelayA.html" title="STK allpass interpolating delay line class.">DelayA</a> delayLine2_;
|
|
<a name="l00072"></a>00072 <a class="code" href="classstk_1_1DelayL.html" title="STK linear interpolating delay line class.">DelayL</a> combDelay_;
|
|
<a name="l00073"></a>00073 <a class="code" href="classstk_1_1OneZero.html" title="STK one-zero filter class.">OneZero</a> filter_;
|
|
<a name="l00074"></a>00074 <a class="code" href="classstk_1_1OneZero.html" title="STK one-zero filter class.">OneZero</a> filter2_;
|
|
<a name="l00075"></a>00075
|
|
<a name="l00076"></a>00076 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> length_;
|
|
<a name="l00077"></a>00077 StkFloat loopGain_;
|
|
<a name="l00078"></a>00078 StkFloat baseLoopGain_;
|
|
<a name="l00079"></a>00079 StkFloat lastFrequency_;
|
|
<a name="l00080"></a>00080 StkFloat lastLength_;
|
|
<a name="l00081"></a>00081 StkFloat detuning_;
|
|
<a name="l00082"></a>00082 StkFloat pluckAmplitude_;
|
|
<a name="l00083"></a>00083 StkFloat pluckPosition_;
|
|
<a name="l00084"></a>00084
|
|
<a name="l00085"></a>00085 };
|
|
<a name="l00086"></a>00086
|
|
<a name="l00087"></a>00087 } <span class="comment">// stk namespace</span>
|
|
<a name="l00088"></a>00088
|
|
<a name="l00089"></a>00089 <span class="preprocessor">#endif</span>
|
|
</pre></div></div>
|
|
<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>©1995-2009 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|