mirror of
https://github.com/thestk/stk
synced 2026-01-15 14:01:52 +00:00
127 lines
7.3 KiB
HTML
127 lines
7.3 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="namespacestk.html">stk</a>::<a class="el" href="classstk_1_1Drummer.html">Drummer</a>
|
|
</div>
|
|
<div class="contents">
|
|
<h1>stk::Drummer Class Reference</h1><!-- doxytag: class="stk::Drummer" --><!-- doxytag: inherits="stk::Instrmnt" -->STK drum sample player class.
|
|
<a href="#_details">More...</a>
|
|
<p>
|
|
<code>#include <<a class="el" href="Drummer_8h-source.html">Drummer.h</a>></code>
|
|
<p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for stk::Drummer:</div>
|
|
<div class="dynsection">
|
|
|
|
<p><center><img src="classstk_1_1Drummer.png" usemap="#stk::Drummer_map" border="0" alt=""></center>
|
|
<map name="stk::Drummer_map">
|
|
<area href="classstk_1_1Instrmnt.html" alt="stk::Instrmnt" shape="rect" coords="0,56,84,80">
|
|
<area href="classstk_1_1Stk.html" alt="stk::Stk" shape="rect" coords="0,0,84,24">
|
|
</map>
|
|
</div>
|
|
|
|
<p>
|
|
<a href="classstk_1_1Drummer-members.html">List of all members.</a><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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1Drummer.html#f5262dd2b29ae453323c0a514d79d26a">Drummer</a> (void)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Class constructor. <a href="#f5262dd2b29ae453323c0a514d79d26a"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="365fb4b2c501129f2efd6edfad1f5453"></a><!-- doxytag: member="stk::Drummer::~Drummer" ref="365fb4b2c501129f2efd6edfad1f5453" args="(void)" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1Drummer.html#365fb4b2c501129f2efd6edfad1f5453">~Drummer</a> (void)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Class destructor. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1Drummer.html#5ea03a0ef9a3db02942799b5cbca2ea2">noteOn</a> (StkFloat instrument, StkFloat amplitude)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Start a note with the given drum type and amplitude. <a href="#5ea03a0ef9a3db02942799b5cbca2ea2"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a735313fbdf7f1201fcb167874ecc7cc"></a><!-- doxytag: member="stk::Drummer::noteOff" ref="a735313fbdf7f1201fcb167874ecc7cc" args="(StkFloat amplitude)" -->
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1Drummer.html#a735313fbdf7f1201fcb167874ecc7cc">noteOff</a> (StkFloat amplitude)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </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="d65c63bfad0ffac03db7f56cf706e4ba"></a><!-- doxytag: member="stk::Drummer::tick" ref="d65c63bfad0ffac03db7f56cf706e4ba" args="(unsigned int channel=0)" -->
|
|
StkFloat </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1Drummer.html#d65c63bfad0ffac03db7f56cf706e4ba">tick</a> (unsigned int channel=0)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Compute and return one output sample. <br></td></tr>
|
|
</table>
|
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
STK drum sample player class.
|
|
<p>
|
|
This class implements a drum sampling synthesizer using <a class="el" href="classstk_1_1WvIn.html" title="STK audio input abstract base class.">WvIn</a> objects and one-pole filters. The drum rawwave files are sampled at 22050 Hz, but will be appropriately interpolated for other sample rates. You can specify the maximum polyphony (maximum number of simultaneous voices) via a define in the <a class="el" href="Drummer_8h-source.html">Drummer.h</a>.<p>
|
|
by Perry R. Cook and Gary P. Scavone, 1995 - 2009. <hr><h2>Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" name="f5262dd2b29ae453323c0a514d79d26a"></a><!-- doxytag: member="stk::Drummer::Drummer" ref="f5262dd2b29ae453323c0a514d79d26a" args="(void)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">stk::Drummer::Drummer </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Class constructor.
|
|
<p>
|
|
An <a class="el" href="classstk_1_1StkError.html" title="STK error handling class.">StkError</a> will be thrown if the rawwave path is incorrectly set.
|
|
</div>
|
|
</div><p>
|
|
<hr><h2>Member Function Documentation</h2>
|
|
<a class="anchor" name="5ea03a0ef9a3db02942799b5cbca2ea2"></a><!-- doxytag: member="stk::Drummer::noteOn" ref="5ea03a0ef9a3db02942799b5cbca2ea2" args="(StkFloat instrument, StkFloat amplitude)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void stk::Drummer::noteOn </td>
|
|
<td>(</td>
|
|
<td class="paramtype">StkFloat </td>
|
|
<td class="paramname"> <em>instrument</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">StkFloat </td>
|
|
<td class="paramname"> <em>amplitude</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td><code> [virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Start a note with the given drum type and amplitude.
|
|
<p>
|
|
Use general MIDI drum instrument numbers, converted to frequency values as if MIDI note numbers, to select a particular instrument. An <a class="el" href="classstk_1_1StkError.html" title="STK error handling class.">StkError</a> will be thrown if the rawwave path is incorrectly set.
|
|
<p>Implements <a class="el" href="classstk_1_1Instrmnt.html#0736ccd253b446660938d51909a32f44">stk::Instrmnt</a>.</p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<hr>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="Drummer_8h-source.html">Drummer.h</a></ul>
|
|
</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>
|