mirror of
https://github.com/thestk/stk
synced 2026-01-13 21:11:53 +00:00
102 lines
10 KiB
HTML
102 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"> <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.6.2 -->
|
|
<div class="navpath"><a class="el" href="dir_f14fd23bc74c76f288031ad23b3f3505.html">include</a>
|
|
</div>
|
|
<div class="contents">
|
|
<h1>Skini.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef STK_SKINI_H</span>
|
|
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define STK_SKINI_H</span>
|
|
<a name="l00003"></a>00003 <span class="preprocessor"></span>
|
|
<a name="l00004"></a>00004 <span class="preprocessor">#include "Stk.h"</span>
|
|
<a name="l00005"></a>00005 <span class="preprocessor">#include <vector></span>
|
|
<a name="l00006"></a>00006 <span class="preprocessor">#include <string></span>
|
|
<a name="l00007"></a>00007 <span class="preprocessor">#include <fstream></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="l00036"></a>00036 <span class="comment">/***************************************************/</span>
|
|
<a name="l00037"></a>00037
|
|
<a name="l00038"></a><a class="code" href="classstk_1_1Skini.html">00038</a> <span class="keyword">class </span><a class="code" href="classstk_1_1Skini.html" title="STK SKINI parsing class.">Skini</a> : <span class="keyword">public</span> <a class="code" href="classstk_1_1Stk.html" title="STK base class.">Stk</a>
|
|
<a name="l00039"></a>00039 {
|
|
<a name="l00040"></a>00040 <span class="keyword">public</span>:
|
|
<a name="l00041"></a>00041
|
|
<a name="l00043"></a><a class="code" href="structstk_1_1Skini_1_1Message.html">00043</a> <span class="keyword">struct </span><a class="code" href="structstk_1_1Skini_1_1Message.html" title="A message structure to store and pass parsed SKINI messages.">Message</a> {
|
|
<a name="l00044"></a><a class="code" href="structstk_1_1Skini_1_1Message.html#a6f55441cfdbc674c992fd98f95d458ca">00044</a> <span class="keywordtype">long</span> <a class="code" href="structstk_1_1Skini_1_1Message.html#a6f55441cfdbc674c992fd98f95d458ca">type</a>;
|
|
<a name="l00045"></a><a class="code" href="structstk_1_1Skini_1_1Message.html#ac5d1504e617c2227055799300fc1936e">00045</a> <span class="keywordtype">long</span> <a class="code" href="structstk_1_1Skini_1_1Message.html#ac5d1504e617c2227055799300fc1936e">channel</a>;
|
|
<a name="l00046"></a><a class="code" href="structstk_1_1Skini_1_1Message.html#a6d07933c0cf4c92e76677236c2341e2f">00046</a> StkFloat <a class="code" href="structstk_1_1Skini_1_1Message.html#a6d07933c0cf4c92e76677236c2341e2f">time</a>;
|
|
<a name="l00047"></a><a class="code" href="structstk_1_1Skini_1_1Message.html#acb4bb30558903d1b02092207d4f2dda8">00047</a> std::vector<StkFloat> <a class="code" href="structstk_1_1Skini_1_1Message.html#acb4bb30558903d1b02092207d4f2dda8">floatValues</a>;
|
|
<a name="l00048"></a><a class="code" href="structstk_1_1Skini_1_1Message.html#a0d5d310534fa8a7edc43ca259e73ffc7">00048</a> std::vector<long> <a class="code" href="structstk_1_1Skini_1_1Message.html#a0d5d310534fa8a7edc43ca259e73ffc7">intValues</a>;
|
|
<a name="l00049"></a><a class="code" href="structstk_1_1Skini_1_1Message.html#a8c61b471a341e0168eb475b458404247">00049</a> std::string <a class="code" href="structstk_1_1Skini_1_1Message.html#a8c61b471a341e0168eb475b458404247">remainder</a>;
|
|
<a name="l00051"></a>00051 <span class="comment">// Default constructor.</span>
|
|
<a name="l00052"></a>00052 <a class="code" href="structstk_1_1Skini_1_1Message.html" title="A message structure to store and pass parsed SKINI messages.">Message</a>()
|
|
<a name="l00053"></a>00053 :<a class="code" href="structstk_1_1Skini_1_1Message.html#a6f55441cfdbc674c992fd98f95d458ca">type</a>(0), <a class="code" href="structstk_1_1Skini_1_1Message.html#ac5d1504e617c2227055799300fc1936e">channel</a>(0), <a class="code" href="structstk_1_1Skini_1_1Message.html#a6d07933c0cf4c92e76677236c2341e2f">time</a>(0.0), <a class="code" href="structstk_1_1Skini_1_1Message.html#acb4bb30558903d1b02092207d4f2dda8">floatValues</a>(2), <a class="code" href="structstk_1_1Skini_1_1Message.html#a0d5d310534fa8a7edc43ca259e73ffc7">intValues</a>(2) {}
|
|
<a name="l00054"></a>00054 };
|
|
<a name="l00055"></a>00055
|
|
<a name="l00057"></a>00057 <a class="code" href="classstk_1_1Skini.html#aed904de40a0fa1d22dbb08bc4517f4c8" title="Default constructor.">Skini</a>();
|
|
<a name="l00058"></a>00058
|
|
<a name="l00060"></a>00060 <a class="code" href="classstk_1_1Skini.html#a7c960798afad4b53065ebb26ff00495a" title="Class destructor.">~Skini</a>();
|
|
<a name="l00061"></a>00061
|
|
<a name="l00063"></a>00063
|
|
<a name="l00067"></a>00067 <span class="keywordtype">bool</span> <a class="code" href="classstk_1_1Skini.html#a30eb5f5238c552d042b8eb510aa8d241" title="Set a SKINI formatted file for reading.">setFile</a>( std::string fileName );
|
|
<a name="l00068"></a>00068
|
|
<a name="l00070"></a>00070
|
|
<a name="l00076"></a>00076 <span class="keywordtype">long</span> <a class="code" href="classstk_1_1Skini.html#a675f2a9841c4b84e161de651eed4412d" title="Parse the next file message (if a file is loaded) and return the message type.">nextMessage</a>( <a class="code" href="structstk_1_1Skini_1_1Message.html" title="A message structure to store and pass parsed SKINI messages.">Skini::Message</a>& message );
|
|
<a name="l00077"></a>00077
|
|
<a name="l00079"></a>00079
|
|
<a name="l00083"></a>00083 <span class="keywordtype">long</span> <a class="code" href="classstk_1_1Skini.html#ad3e29f6ca88052e95698137ec2e545ad" title="Attempt to parse the given string and returning the message type.">parseString</a>( std::string& line, <a class="code" href="structstk_1_1Skini_1_1Message.html" title="A message structure to store and pass parsed SKINI messages.">Skini::Message</a>& message );
|
|
<a name="l00084"></a>00084
|
|
<a name="l00086"></a>00086 <span class="keyword">static</span> std::string <a class="code" href="classstk_1_1Skini.html#afae7977e19f7b7f647ee2c6ade62a199" title="Return the SKINI type string for the given type value.">whatsThisType</a>(<span class="keywordtype">long</span> type);
|
|
<a name="l00087"></a>00087
|
|
<a name="l00089"></a>00089 <span class="keyword">static</span> std::string <a class="code" href="classstk_1_1Skini.html#a30c34ff9ffd7646165155fa4d62dee6c" title="Return the SKINI controller string for the given controller number.">whatsThisController</a>(<span class="keywordtype">long</span> number);
|
|
<a name="l00090"></a>00090
|
|
<a name="l00091"></a>00091 <span class="keyword">protected</span>:
|
|
<a name="l00092"></a>00092
|
|
<a name="l00093"></a>00093 <span class="keywordtype">void</span> tokenize( <span class="keyword">const</span> std::string& str, std::vector<std::string>& tokens, <span class="keyword">const</span> std::string& delimiters );
|
|
<a name="l00094"></a>00094
|
|
<a name="l00095"></a>00095 std::ifstream file_;
|
|
<a name="l00096"></a>00096 };
|
|
<a name="l00097"></a>00097
|
|
<a name="l00099"></a>00099 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">double</span> Midi2Pitch[129] = {
|
|
<a name="l00100"></a>00100 8.176, 8.662, 9.177, 9.723, 10.301, 10.913, 11.562, 12.25,
|
|
<a name="l00101"></a>00101 12.978, 13.75, 14.568, 15.434, 16.352, 17.324, 18.354, 19.445,
|
|
<a name="l00102"></a>00102 20.602, 21.827, 23.125, 24.50, 25.957, 27.50, 29.135, 30.868,
|
|
<a name="l00103"></a>00103 32.703, 34.648, 36.708, 38.891, 41.203, 43.654, 46.249, 49.0,
|
|
<a name="l00104"></a>00104 51.913, 55.0, 58.271, 61.735, 65.406, 69.296, 73.416, 77.782,
|
|
<a name="l00105"></a>00105 82.407, 87.307, 92.499, 97.999, 103.826, 110.0, 116.541, 123.471,
|
|
<a name="l00106"></a>00106 130.813, 138.591, 146.832, 155.563, 164.814, 174.614, 184.997, 195.998,
|
|
<a name="l00107"></a>00107 207.652, 220.0, 233.082, 246.942, 261.626, 277.183, 293.665, 311.127,
|
|
<a name="l00108"></a>00108 329.628, 349.228, 369.994, 391.995, 415.305, 440.0, 466.164, 493.883,
|
|
<a name="l00109"></a>00109 523.251, 554.365, 587.33, 622.254, 659.255, 698.456, 739.989, 783.991,
|
|
<a name="l00110"></a>00110 830.609, 880.0, 932.328, 987.767, 1046.502, 1108.731, 1174.659, 1244.508,
|
|
<a name="l00111"></a>00111 1318.51, 1396.913, 1479.978, 1567.982, 1661.219, 1760.0, 1864.655, 1975.533,
|
|
<a name="l00112"></a>00112 2093.005, 2217.461, 2349.318, 2489.016, 2637.02, 2793.826, 2959.955, 3135.963,
|
|
<a name="l00113"></a>00113 3322.438, 3520.0, 3729.31, 3951.066, 4186.009, 4434.922, 4698.636, 4978.032,
|
|
<a name="l00114"></a>00114 5274.041, 5587.652, 5919.911, 6271.927, 6644.875, 7040.0, 7458.62, 7902.133,
|
|
<a name="l00115"></a>00115 8372.018, 8869.844, 9397.273, 9956.063, 10548.082, 11175.303, 11839.822, 12543.854,
|
|
<a name="l00116"></a>00116 13289.75};
|
|
<a name="l00117"></a>00117
|
|
<a name="l00118"></a>00118 } <span class="comment">// stk namespace</span>
|
|
<a name="l00119"></a>00119
|
|
<a name="l00120"></a>00120 <span class="preprocessor">#endif</span>
|
|
<a name="l00121"></a>00121 <span class="preprocessor"></span>
|
|
<a name="l00122"></a>00122
|
|
</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-2011 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|