mirror of
https://github.com/thestk/stk
synced 2026-01-13 13:01:52 +00:00
194 lines
10 KiB
HTML
194 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="tutorial.html">Tutorial</a></CENTER>
|
|
<HR>
|
|
<!-- Generated by Doxygen 1.3.4 -->
|
|
<h1>StkFrames Class Reference</h1><code>#include <<a class="el" href="Stk_8h-source.html">Stk.h</a>></code>
|
|
<p>
|
|
<a href="classStkFrames-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
An STK class to handle vectorized audio data.
|
|
<p>
|
|
This class can hold single- or multi-channel audio data in either interleaved or non-interleaved formats. The data type is always StkFloat.<p>
|
|
Possible future improvements in this class could include static functions to inter- or de-interleave the data and to convert to and return other data types.<p>
|
|
by Perry R. Cook and Gary P. Scavone, 1995 - 2004.
|
|
<p>
|
|
|
|
<p>
|
|
Definition at line <a class="el" href="Stk_8h-source.html#l00177">177</a> of file <a class="el" href="Stk_8h-source.html">Stk.h</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><a class="anchor" name="a0" doxytag="StkFrames::StkFrames" ></a>
|
|
</td><td class="memItemRight" valign=bottom><a class="el" href="classStkFrames.html#a0">StkFrames</a> (unsigned int nFrames=0, unsigned int nChannels=1, bool interleaved=true)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">The default constructor initializes the frame data structure to size zero. <br><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a1" doxytag="StkFrames::StkFrames" ></a>
|
|
</td><td class="memItemRight" valign=bottom><a class="el" href="classStkFrames.html#a1">StkFrames</a> (const StkFloat &value, unsigned int nFrames, unsigned int nChannels, bool interleaved=true)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Overloaded constructor which initializes the frame data to the specified size with <code>value</code>. <br><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top>StkFloat & </td><td class="memItemRight" valign=bottom><a class="el" href="classStkFrames.html#a2">operator[]</a> (size_t n)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Subscript operator which returns a reference to element <code>n</code> of self. </em> <a href="#a2"></a><em><br><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top>StkFloat </td><td class="memItemRight" valign=bottom><a class="el" href="classStkFrames.html#a3">operator[]</a> (size_t n) const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Subscript operator which returns the value at element <code>n</code> of self. </em> <a href="#a3"></a><em><br><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a4" doxytag="StkFrames::size" ></a>
|
|
size_t </td><td class="memItemRight" valign=bottom><a class="el" href="classStkFrames.html#a4">size</a> () const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the total number of audio samples represented by the object. <br><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classStkFrames.html#a5">resize</a> (unsigned int nFrames, unsigned int nChannels=1, StkFloat value=0.0)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Resize self to represent the specified number of channels and frames. </em> <a href="#a5"></a><em><br><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a6" doxytag="StkFrames::channels" ></a>
|
|
unsigned int </td><td class="memItemRight" valign=bottom><a class="el" href="classStkFrames.html#a6">channels</a> (void) const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the number of channels represented by the data. <br><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a7" doxytag="StkFrames::frames" ></a>
|
|
unsigned int </td><td class="memItemRight" valign=bottom><a class="el" href="classStkFrames.html#a7">frames</a> (void) const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the number of sample frames represented by the data. <br><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a8" doxytag="StkFrames::interleaved" ></a>
|
|
bool </td><td class="memItemRight" valign=bottom><a class="el" href="classStkFrames.html#a8">interleaved</a> (void) const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns <code>true</code> if the data is in interleaved format, <code>false</code> if the data is non-interleaved. <br><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a9" doxytag="StkFrames::setInterleaved" ></a>
|
|
void </td><td class="memItemRight" valign=bottom><a class="el" href="classStkFrames.html#a9">setInterleaved</a> (bool isInterleaved)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the flag to indicate whether the internal data is in interleaved (<code>true</code>) or non-interleaved (<code>false</code>) format. <br><br></td></tr>
|
|
</table>
|
|
<hr><h2>Member Function Documentation</h2>
|
|
<a class="anchor" name="a2" doxytag="StkFrames::operator[]" ></a><p>
|
|
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top"> StkFloat& StkFrames::operator[] </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">size_t </td>
|
|
<td class="mdname1" valign="top" nowrap> <em>n</em> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap><code> [inline]</code></td>
|
|
</tr>
|
|
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing=5 cellpadding=0 border=0>
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Subscript operator which returns a reference to element <code>n</code> of self.
|
|
<p>
|
|
The result can be used as an lvalue . This reference is valid until the resize function is called or the array is destroyed. The index <code>n</code> must be between 0 and size less one. No range checking is performed.
|
|
<p>
|
|
Definition at line <a class="el" href="Stk_8h-source.html#l00194">194</a> of file <a class="el" href="Stk_8h-source.html">Stk.h</a>.
|
|
<p>
|
|
<div class="fragment"><pre>00194 { <span class="keywordflow">return</span> data_[n]; };
|
|
</pre></div> </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="a3" doxytag="StkFrames::operator[]" ></a><p>
|
|
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top"> StkFloat StkFrames::operator[] </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">size_t </td>
|
|
<td class="mdname1" valign="top" nowrap> <em>n</em> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap> const<code> [inline]</code></td>
|
|
</tr>
|
|
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing=5 cellpadding=0 border=0>
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Subscript operator which returns the value at element <code>n</code> of self.
|
|
<p>
|
|
The index <code>n</code> must be between 0 and size less one. No range checking is performed.
|
|
<p>
|
|
Definition at line <a class="el" href="Stk_8h-source.html#l00201">201</a> of file <a class="el" href="Stk_8h-source.html">Stk.h</a>.
|
|
<p>
|
|
<div class="fragment"><pre>00201 { <span class="keywordflow">return</span> data_[n]; };
|
|
</pre></div> </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="a5" doxytag="StkFrames::resize" ></a><p>
|
|
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top"> void StkFrames::resize </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">unsigned int </td>
|
|
<td class="mdname" nowrap> <em>nFrames</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td></td>
|
|
<td class="md" nowrap>unsigned int </td>
|
|
<td class="mdname" nowrap> <em>nChannels</em> = 1, </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td></td>
|
|
<td class="md" nowrap>StkFloat </td>
|
|
<td class="mdname" nowrap> <em>value</em> = 0.0</td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing=5 cellpadding=0 border=0>
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Resize self to represent the specified number of channels and frames.
|
|
<p>
|
|
Changes the size of self based on the number of frames and channels, and assigns <code>value</code> to every element. </td>
|
|
</tr>
|
|
</table>
|
|
<hr>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="Stk_8h-source.html">Stk.h</a></ul>
|
|
<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-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|