mirror of
https://github.com/thestk/stk
synced 2026-01-20 07:51:53 +00:00
Release 4.2.1 tarball
This commit is contained in:
committed by
Stephen Sinclair
parent
11cf5faa0a
commit
21b93795e7
@@ -8,8 +8,8 @@
|
||||
<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.4 -->
|
||||
<h1>Messager Class Reference</h1><code>#include <<a class="el" href="Messager_8h-source.html">Messager.h</a>></code>
|
||||
<!-- Generated by Doxygen 1.4.4 -->
|
||||
<h1>Messager Class Reference</h1><!-- doxytag: class="Messager" --><!-- doxytag: inherits="Stk" --><code>#include <<a class="el" href="Messager_8h-source.html">Messager.h</a>></code>
|
||||
<p>
|
||||
<p>Inheritance diagram for Messager:
|
||||
<p><center><img src="classMessager.png" usemap="#Messager_map" border="0" alt=""></center>
|
||||
@@ -23,52 +23,58 @@ This class reads and parses control messages from a variety of sources, such as
|
||||
The various <em>realtime</em> message acquisition mechanisms (from MIDI, socket, or stdin) take place asynchronously, filling the message queue. A call to <a class="el" href="classMessager.html#a2">popMessage()</a> will pop the next available control message from the queue and return it via the referenced Message structure. When a <em>non-realtime</em> scorefile is set, it is not possible to start reading realtime input messages (from MIDI, socket, or stdin). Likewise, it is not possible to read from a scorefile when a realtime input mechanism is running.<p>
|
||||
When MIDI input is started, input is also automatically read from stdin. This allows for program termination via the terminal window. An __SK_Exit_ message is pushed onto the stack whenever an "exit" or "Exit" message is received from stdin or when all socket connections close and no stdin thread is running.<p>
|
||||
This class is primarily for use in STK example programs but it is generic enough to work in many other contexts.<p>
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2004.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2005.
|
||||
<p>
|
||||
|
||||
<p>
|
||||
Definition at line <a class="el" href="Messager_8h-source.html#l00057">57</a> of file <a class="el" href="Messager_8h-source.html">Messager.h</a>.<table border=0 cellpadding=0 cellspacing=0>
|
||||
<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><a class="anchor" name="a0" doxytag="Messager::Messager" ></a>
|
||||
</td><td class="memItemRight" valign=bottom><a class="el" href="classMessager.html#a0">Messager</a> ()</td></tr>
|
||||
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0"></a><!-- doxytag: member="Messager::Messager" ref="a0" args="()" -->
|
||||
</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessager.html#a0">Messager</a> ()</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a1" doxytag="Messager::~Messager" ></a>
|
||||
</td><td class="memItemRight" valign=bottom><a class="el" href="classMessager.html#a1">~Messager</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1"></a><!-- doxytag: member="Messager::~Messager" ref="a1" args="()" -->
|
||||
</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessager.html#a1">~Messager</a> ()</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Class destructor. <br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classMessager.html#a2">popMessage</a> (<a class="el" href="structSkini_1_1Message.html">Skini::Message</a> &message)</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="classMessager.html#a2">popMessage</a> (<a class="el" href="structSkini_1_1Message.html">Skini::Message</a> &message)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Pop the next message from the queue and write it to the referenced message structure. </em> <a href="#a2"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a3" doxytag="Messager::pushMessage" ></a>
|
||||
void </td><td class="memItemRight" valign=bottom><a class="el" href="classMessager.html#a3">pushMessage</a> (<a class="el" href="structSkini_1_1Message.html">Skini::Message</a> &message)</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Pop the next message from the queue and write it to the referenced message structure. <a href="#a2"></a><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3"></a><!-- doxytag: member="Messager::pushMessage" ref="a3" args="(Skini::Message &message)" -->
|
||||
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessager.html#a3">pushMessage</a> (<a class="el" href="structSkini_1_1Message.html">Skini::Message</a> &message)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Push the referenced message onto the message stack. <br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="classMessager.html#a4">setScoreFile</a> (const char *filename)</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Push the referenced message onto the message stack. <br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessager.html#a4">setScoreFile</a> (const char *filename)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Specify a SKINI formatted scorefile from which messages should be read. </em> <a href="#a4"></a><em><br><br></td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Specify a SKINI formatted scorefile from which messages should be read. <a href="#a4"></a><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessager.html#a5">startStdInput</a> ()</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initiate the "realtime" retreival from stdin of control messages into the queue. <a href="#a5"></a><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessager.html#a6">startSocketInput</a> (int port=2001)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Start a socket server, accept connections, and read "realtime" control messages into the message queue. <a href="#a6"></a><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessager.html#a7">startMidiInput</a> (int port=0)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Start MIDI input, with optional device and port identifiers. <a href="#a7"></a><br></td></tr>
|
||||
</table>
|
||||
<hr><h2>Member Function Documentation</h2>
|
||||
<a class="anchor" name="a2" doxytag="Messager::popMessage" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<a class="anchor" name="a2"></a><!-- doxytag: member="Messager::popMessage" ref="a2" args="(Skini::Message &message)" --><p>
|
||||
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> void Messager::popMessage </td>
|
||||
<td class="md" nowrap valign="top">void Messager::popMessage </td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top"><a class="el" href="structSkini_1_1Message.html">Skini::Message</a> & </td>
|
||||
<td class="mdname1" valign="top" nowrap> <em>message</em> </td>
|
||||
<td class="md" valign="top"> ) </td>
|
||||
<td class="md" nowrap></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<table cellspacing="5" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
@@ -78,28 +84,27 @@ void </td><td class="memItemRight" valign=bottom><a class="el" href="classM
|
||||
<p>
|
||||
Pop the next message from the queue and write it to the referenced message structure.
|
||||
<p>
|
||||
Invalid messages (or an empty queue) are indicated by type values of zero, in which case all other message structure values are undefined. The user MUST verify the returned message type is valid before reading other message values. </td>
|
||||
Invalid messages (or an empty queue) are indicated by type values of zero, in which case all other message structure values are undefined. The user MUST verify the returned message type is valid before reading other message values. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a4" doxytag="Messager::setScoreFile" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<a class="anchor" name="a4"></a><!-- doxytag: member="Messager::setScoreFile" ref="a4" args="(const char *filename)" --><p>
|
||||
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> bool Messager::setScoreFile </td>
|
||||
<td class="md" nowrap valign="top">bool Messager::setScoreFile </td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">const char * </td>
|
||||
<td class="mdname1" valign="top" nowrap> <em>filename</em> </td>
|
||||
<td class="md" valign="top"> ) </td>
|
||||
<td class="md" nowrap></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<table cellspacing="5" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
@@ -109,7 +114,96 @@ Invalid messages (or an empty queue) are indicated by type values of zero, in wh
|
||||
<p>
|
||||
Specify a SKINI formatted scorefile from which messages should be read.
|
||||
<p>
|
||||
A return value of <code>true</code> indicates the call was successful. A return value of <code>false</code> can occur if the file is not found, cannot be opened, another file is currently still open, or if a realtime input mechanism is running. Scorefile input is considered to be a non-realtime control mechanism that cannot run concurrently with realtime input. </td>
|
||||
A return value of <code>true</code> indicates the call was successful. A return value of <code>false</code> can occur if the file is not found, cannot be opened, another file is currently still open, or if a realtime input mechanism is running. Scorefile input is considered to be a non-realtime control mechanism that cannot run concurrently with realtime input. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a5"></a><!-- doxytag: member="Messager::startStdInput" ref="a5" args="()" --><p>
|
||||
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top">bool Messager::startStdInput </td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top"> ) </td>
|
||||
<td class="md" nowrap></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="5" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Initiate the "realtime" retreival from stdin of control messages into the queue.
|
||||
<p>
|
||||
This function initiates a thread for asynchronous retrieval of SKINI formatted messages from stdin. A return value of <code>true</code> indicates the call was successful. A return value of <code>false</code> can occur if a scorefile is being read, a stdin thread is already running, or a thread error occurs during startup. Stdin input is considered to be a realtime control mechanism that cannot run concurrently with non-realtime scorefile input. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a6"></a><!-- doxytag: member="Messager::startSocketInput" ref="a6" args="(int port=2001)" --><p>
|
||||
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top">bool Messager::startSocketInput </td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">int </td>
|
||||
<td class="mdname1" valign="top" nowrap> <em>port</em> = <code>2001</code> </td>
|
||||
<td class="md" valign="top"> ) </td>
|
||||
<td class="md" nowrap></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="5" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Start a socket server, accept connections, and read "realtime" control messages into the message queue.
|
||||
<p>
|
||||
This function creates a socket server on the optional port (default = 2001) and starts a thread for asynchronous retrieval of SKINI formatted messages from socket connections. A return value of <code>true</code> indicates the call was successful. A return value of <code>false</code> can occur if a scorefile is being read, a socket thread is already running, or an error occurs during the socket server or thread initialization stages. <a class="el" href="classSocket.html">Socket</a> input is considered to be a realtime control mechanism that cannot run concurrently with non-realtime scorefile input. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a7"></a><!-- doxytag: member="Messager::startMidiInput" ref="a7" args="(int port=0)" --><p>
|
||||
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top">bool Messager::startMidiInput </td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">int </td>
|
||||
<td class="mdname1" valign="top" nowrap> <em>port</em> = <code>0</code> </td>
|
||||
<td class="md" valign="top"> ) </td>
|
||||
<td class="md" nowrap></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="5" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Start MIDI input, with optional device and port identifiers.
|
||||
<p>
|
||||
This function creates an <a class="el" href="classRtMidiIn.html">RtMidiIn</a> instance for MIDI input. The <a class="el" href="classRtMidiIn.html">RtMidiIn</a> class invokes a local callback function to read incoming messages into the queue. If <code>port</code> = -1, <a class="el" href="classRtMidiIn.html">RtMidiIn</a> will open a virtual port to which other software applications can connect (OS X and Linux only). A return value of <code>true</code> indicates the call was successful. A return value of <code>false</code> can occur if a scorefile is being read, MIDI input is already running, or an error occurs during <a class="el" href="classRtMidiIn.html">RtMidiIn</a> construction. Midi input is considered to be a realtime control mechanism that cannot run concurrently with non-realtime scorefile input. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>The documentation for this class was generated from the following file:<ul>
|
||||
@@ -118,7 +212,7 @@ A return value of <code>true</code> indicates the call was successful. A return
|
||||
|
||||
<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-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
<tr><td>©1995-2005 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
|
||||
Reference in New Issue
Block a user