mirror of
https://github.com/thestk/stk
synced 2026-01-13 04:51:53 +00:00
103 lines
7.8 KiB
HTML
103 lines
7.8 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"><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="tutorial.html">Tutorial</a></CENTER>
|
|
<HR>
|
|
<!-- Generated by Doxygen 1.2.8.1 -->
|
|
<h1>FM Class Reference</h1>STK abstract FM synthesis base class.
|
|
<a href="#_details">More...</a>
|
|
<p>
|
|
<code>#include <<a class="el" href="FM_8h-source.html">FM.h</a>></code>
|
|
<p>
|
|
<p>Inheritance diagram for FM::
|
|
<p><center><img src="classFM.gif" usemap="#FM_map" border="0"></center>
|
|
<map name="FM_map">
|
|
<area href="classInstrmnt.html" alt="Instrmnt" shape="rect" coords="240,56,310,80">
|
|
<area href="classStk.html" alt="Stk" shape="rect" coords="240,0,310,24">
|
|
<area href="classBeeThree.html" alt="BeeThree" shape="rect" coords="0,168,70,192">
|
|
<area href="classFMVoices.html" alt="FMVoices" shape="rect" coords="80,168,150,192">
|
|
<area href="classHevyMetl.html" alt="HevyMetl" shape="rect" coords="160,168,230,192">
|
|
<area href="classPercFlut.html" alt="PercFlut" shape="rect" coords="240,168,310,192">
|
|
<area href="classRhodey.html" alt="Rhodey" shape="rect" coords="320,168,390,192">
|
|
<area href="classTubeBell.html" alt="TubeBell" shape="rect" coords="400,168,470,192">
|
|
<area href="classWurley.html" alt="Wurley" shape="rect" coords="480,168,550,192">
|
|
</map>
|
|
<a href="classFM-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
|
|
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a0" doxytag="FM::FM"></a>
|
|
</td><td valign=bottom><a class="el" href="classFM.html#a0">FM</a> (int operators=4)</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Class constructor, taking the number of wave/envelope operators to control.</em></font><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a1" doxytag="FM::~FM"></a>
|
|
virtual </td><td valign=bottom><a class="el" href="classFM.html#a1">~FM</a> ()</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Class destructor.</em></font><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a2" doxytag="FM::clear"></a>
|
|
void </td><td valign=bottom><a class="el" href="classFM.html#a2">clear</a> ()</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Reset and clear all wave and envelope states.</em></font><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a3" doxytag="FM::loadWaves"></a>
|
|
void </td><td valign=bottom><a class="el" href="classFM.html#a3">loadWaves</a> (const char **filenames)</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Load the rawwave filenames in waves.</em></font><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a4" doxytag="FM::setFrequency"></a>
|
|
virtual void </td><td valign=bottom><a class="el" href="classFM.html#a4">setFrequency</a> (MY_FLOAT frequency)</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Set instrument parameters for a particular frequency.</em></font><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a5" doxytag="FM::setRatio"></a>
|
|
void </td><td valign=bottom><a class="el" href="classFM.html#a5">setRatio</a> (int waveIndex, MY_FLOAT ratio)</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Set the frequency ratio for the specified wave.</em></font><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a6" doxytag="FM::setGain"></a>
|
|
void </td><td valign=bottom><a class="el" href="classFM.html#a6">setGain</a> (int waveIndex, MY_FLOAT gain)</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Set the gain for the specified wave.</em></font><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a7" doxytag="FM::setModulationSpeed"></a>
|
|
void </td><td valign=bottom><a class="el" href="classFM.html#a7">setModulationSpeed</a> (MY_FLOAT mSpeed)</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Set the modulation speed in Hz.</em></font><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a8" doxytag="FM::setModulationDepth"></a>
|
|
void </td><td valign=bottom><a class="el" href="classFM.html#a8">setModulationDepth</a> (MY_FLOAT mDepth)</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Set the modulation depth.</em></font><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a9" doxytag="FM::setControl1"></a>
|
|
void </td><td valign=bottom><a class="el" href="classFM.html#a9">setControl1</a> (MY_FLOAT cVal)</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Set the value of control1.</em></font><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a10" doxytag="FM::setControl2"></a>
|
|
void </td><td valign=bottom><a class="el" href="classFM.html#a10">setControl2</a> (MY_FLOAT cVal)</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Set the value of control1.</em></font><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a11" doxytag="FM::keyOn"></a>
|
|
void </td><td valign=bottom><a class="el" href="classFM.html#a11">keyOn</a> ()</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Start envelopes toward "on" targets.</em></font><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a12" doxytag="FM::keyOff"></a>
|
|
void </td><td valign=bottom><a class="el" href="classFM.html#a12">keyOff</a> ()</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Start envelopes toward "off" targets.</em></font><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a13" doxytag="FM::noteOff"></a>
|
|
void </td><td valign=bottom><a class="el" href="classFM.html#a13">noteOff</a> (MY_FLOAT amplitude)</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Stop a note with the given amplitude (speed of decay).</em></font><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a14" doxytag="FM::tick"></a>
|
|
virtual MY_FLOAT </td><td valign=bottom><a class="el" href="classFM.html#a14">tick</a> ()=0</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Pure virtual function ... must be defined in subclasses.</em></font><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="a15" doxytag="FM::controlChange"></a>
|
|
virtual void </td><td valign=bottom><a class="el" href="classFM.html#a15">controlChange</a> (int number, MY_FLOAT value)</td></tr>
|
|
<tr><td> </td><td><font size=-1><em>Perform the control change specified by <em>number</em> and <em>value</em> (0.0 - 128.0).</em></font><br><br></td></tr>
|
|
</table>
|
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
STK abstract FM synthesis base class.
|
|
<p>
|
|
This class controls an arbitrary number of waves and envelopes, determined via a constructor argument.
|
|
<p>
|
|
Control Change Numbers: <ul>
|
|
<li>Control One = 2<li>Control Two = 4<li>LFO Speed = 11<li>LFO Depth = 1<li><a class="el" href="classADSR.html">ADSR</a> 2 & 4 Target = 128</ul>
|
|
The basic Chowning/Stanford FM patent expired in 1995, but there exist follow-on patents, mostly assigned to Yamaha. If you are of the type who should worry about this (making money) worry away.
|
|
<p>
|
|
by Perry R. Cook and Gary P. Scavone, 1995 - 2002.
|
|
<p>
|
|
<hr>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="FM_8h-source.html">FM.h</a></ul>
|
|
<HR>
|
|
|
|
<table>
|
|
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
|
<tr><td>©1995-2002 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|