mirror of
https://github.com/thestk/stk
synced 2026-01-19 15:41:52 +00:00
Release 4.1.3 tarball
This commit is contained in:
committed by
Stephen Sinclair
parent
503ed3cc9f
commit
e11bff2fe8
@@ -8,10 +8,10 @@
|
||||
<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="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1><a class="anchor" name="controlin">Control Input</a></h1>Each Synthesis ToolKit instrument exposes its relevant control parameters via public functions such as setFrequency() and controlChange(). Programmers are free to implement the control scheme of their choice in exposing those parameters to the user.<p>
|
||||
A text-based control protocol called <a href="skini.html">SKINI</a> is provided with the Synthesis ToolKit. <a class="el" href="classSKINI.html">SKINI</a> extends the MIDI protocol in incremental ways, providing a text-based messaging scheme in human-readable format and making use of floating-point numbers wherever possible. Each <a class="el" href="classSKINI.html">SKINI</a> message consists of a message type (e.g., NoteOn, PitchBend), a time specification (absolute or delta), a channel number (scanned as a long integer), and a maximum of two subsequent message-specific field values. Knowing this, it should be relatively clear what the following <a class="el" href="classSKINI.html">SKINI</a> "scorefile" specifies:<p>
|
||||
<pre class="fragment"><div>NoteOn 0.000082 2 55.0 82.3
|
||||
A text-based control protocol called <a href="skini.html"><a class="el" href="classSKINI.html">SKINI</a></a> is provided with the Synthesis ToolKit. <a class="el" href="classSKINI.html">SKINI</a> extends the MIDI protocol in incremental ways, providing a text-based messaging scheme in human-readable format and making use of floating-point numbers wherever possible. Each <a class="el" href="classSKINI.html">SKINI</a> message consists of a message type (e.g., NoteOn, PitchBend), a time specification (absolute or delta), a channel number (scanned as a long integer), and a maximum of two subsequent message-specific field values. Knowing this, it should be relatively clear what the following <a class="el" href="classSKINI.html">SKINI</a> "scorefile" specifies:<p>
|
||||
<div class="fragment"><pre>NoteOn 0.000082 2 55.0 82.3
|
||||
NoteOff 1.000000 2 55.0 64.0
|
||||
NoteOn 0.000082 2 69.0 82.8
|
||||
StringDetune 0.100000 2 10.0
|
||||
@@ -21,11 +21,11 @@ StringDetune 0.100000 2 40.0
|
||||
StringDetune 0.100000 2 22.0
|
||||
StringDetune 0.100000 2 12.0
|
||||
NoteOff 1.000000 2 69.0 64.0
|
||||
</div></pre><p>
|
||||
</pre></div><p>
|
||||
MIDI messages (with the exception of Sysex) are easily represented within the <a class="el" href="classSKINI.html">SKINI</a> protocol.<p>
|
||||
The class <a class="el" href="classMessager.html">Messager</a> can be used to acquire and parse MIDI messages from a MIDI device and <a class="el" href="classSKINI.html">SKINI</a> messages from STDIN and socket connections. Many of the example programs included with the ToolKit distribution use a <a class="el" href="classMessager.html">Messager</a> instance to accept control input from the accompanying tcl/tk graphical user interfaces, from external MIDI devices, or from <a class="el" href="classSKINI.html">SKINI</a> scorefiles.<p>
|
||||
In the following example, we'll modify the <code>bethree.cpp</code> program from the previous tutorial chapter and incorporate a <a class="el" href="classMessager.html">Messager</a> class to allow control via a <a class="el" href="classSKINI.html">SKINI</a> scorefile.<p>
|
||||
<pre class="fragment"><div><span class="comment">// controlbee.cpp</span>
|
||||
<div class="fragment"><pre><span class="comment">// controlbee.cpp</span>
|
||||
|
||||
<span class="preprocessor">#include "BeeThree.h"</span>
|
||||
<span class="preprocessor">#include "RtWvOut.h"</span>
|
||||
@@ -115,10 +115,10 @@ In the following example, we'll modify the <code>bethree.cpp</code> program from
|
||||
|
||||
<span class="keywordflow">return</span> 0;
|
||||
}
|
||||
</div></pre><p>
|
||||
</pre></div><p>
|
||||
Assuming the program is compiled as <code>controlbee</code> and the <a class="el" href="classSKINI.html">SKINI</a> scorefile <a href="tutorial/bookert.ski"><code>bookert.ski</code></a> is in the <code>scores</code> directory, the scorefile could be redirected to the program as:<p>
|
||||
<pre class="fragment"><div>controlbee < scores/bookert.ski
|
||||
</div></pre><p>
|
||||
<div class="fragment"><pre>controlbee < scores/bookert.ski
|
||||
</pre></div><p>
|
||||
Only a few basic <a class="el" href="classSKINI.html">SKINI</a> message type case statements are included in this example. It is easy to extend the program to support a much more elaborate set of instrument control parameters.<p>
|
||||
This example could also be easily extended to accept "realtime" control input messages via STDIN, socket, or MIDI connections. The <a class="el" href="classMessager.html">Messager</a> class constructor takes an optional argument consisting of a bitmask of the following options: <code>STK_PIPE</code>, <code>STK_SOCKET</code>, and/or <code>STK_MIDI</code>.<p>
|
||||
[<a href="multichannel.html">Next tutorial</a>] [<a href="tutorial.html">Main tutorial page</a>] <HR>
|
||||
|
||||
Reference in New Issue
Block a user