Isomet Modular Synthesiser (iMS) API
v1.4.2
iMS API
|
An array of 4-channel FAP Tones stored in memory on the Synthesiser. More...
#include <include/ToneBuffer.h>
Public Types | |
Tone Buffer Array | |
| |
using | TBArray = std::array< TBEntry, 256 > |
Iterator Specification | |
Use these iterators when you want to work with ranges of Tone Buffer entries stored within a tone buffer. Iterators can be used to access elements at an arbitrary offset position relative to the element they point to Two types of iterators are supported; both are random access iterators. Dereferencing const_iterator yields a reference to a constant element in the ToneBuffer (const TBEntry&). | |
typedef TBArray::iterator | iterator |
Iterator defined for user manipulation of internal TBArray. | |
typedef TBArray::const_iterator | const_iterator |
Const Iterator defined for user readback of internal TBArray. | |
Public Member Functions | |
Constructors & Destructors | |
ToneBuffer (const std::string &name="") | |
Empty Constructor. More... | |
ToneBuffer (const TBEntry &tbe, const std::string &name="") | |
Fill Constructor. More... | |
ToneBuffer (const int entry, const std::string &name="") | |
Non-volatile Memory Constructor. More... | |
ToneBuffer (const ToneBuffer &) | |
Copy Constructor. | |
ToneBuffer & | operator= (const ToneBuffer &) |
Assignment Constructor. | |
~ToneBuffer () | |
Destructor. | |
ToneBuffer Boundary Iterators | |
iterator | begin () |
Returns an iterator pointing to the first element in the TBArray container. More... | |
iterator | end () |
Returns an iterator referring to the past-the-end element in the TBArray container. More... | |
const_iterator | begin () const |
Returns a const_iterator pointing to the first element in the TBArray container. More... | |
const_iterator | end () const |
Returns a const_iterator referring to the past-the-end element in the TBArray container. More... | |
const_iterator | cbegin () const |
Returns a const_iterator pointing to the first element in the TBArray container. More... | |
const_iterator | cend () const |
Returns a const_iterator referring to the past-the-end element in the TBArray container. More... | |
TBArray Operators | |
const TBEntry & | operator[] (std::size_t idx) const |
Random Access to a TBEntry in the TBArray. More... | |
TBEntry & | operator[] (std::size_t idx) |
Random Write Access to a TBEntry in the TBArray. More... | |
bool | operator== (ToneBuffer const &rhs) const |
Equality Operator checks ToneBuffer contents for equivalence. More... | |
ToneBuffer Size | |
const std::size_t | Size () const |
Returns the number of elements in the ToneBuffer (non-modifiable) More... | |
Tone Buffer Description | |
const std::string & | Name () const |
A string stored with the Tone Buffer to aid human users in identifying the purpose of the buffer. More... | |
std::string & | Name () |
iMS::ToneBuffer::ToneBuffer | ( | const std::string & | name = "" | ) |
Empty Constructor.
[in] | name | The optional descriptive name to apply to the Tone Buffer |
iMS::ToneBuffer::ToneBuffer | ( | const TBEntry & | tbe, |
const std::string & | name = "" |
||
) |
Fill Constructor.
Use this constructor to generate a Tone Buffer with each entry initialised to the value of tbe
[in] | tbe | The TBEntry that will fill each of the elements of the TBArray |
[in] | name | The optional descriptive name to apply to the Tone Buffer |
iMS::ToneBuffer::ToneBuffer | ( | const int | entry, |
const std::string & | name = "" |
||
) |
Non-volatile Memory Constructor.
Use this constructor to preload the ToneBuffer with data recalled from an entry in the Synthesiser FileSystem.
[in] | entry | the entry in the FileSystem Table from which to recall a ToneBuffer |
[in] | name | The optional descriptive name to apply to the Tone Buffer |
iterator iMS::ToneBuffer::begin | ( | ) |
Returns an iterator pointing to the first element in the TBArray container.
const_iterator iMS::ToneBuffer::begin | ( | ) | const |
Returns a const_iterator pointing to the first element in the TBArray container.
const_iterator iMS::ToneBuffer::cbegin | ( | ) | const |
Returns a const_iterator pointing to the first element in the TBArray container.
const_iterator iMS::ToneBuffer::cend | ( | ) | const |
Returns a const_iterator referring to the past-the-end element in the TBArray container.
iterator iMS::ToneBuffer::end | ( | ) |
Returns an iterator referring to the past-the-end element in the TBArray container.
The past-the-end element is the theoretical element that would follow the last element in the TBArray container. It does not point to any element, and thus shall not be dereferenced.
Because the ranges used by functions of the standard library do not include the element pointed by their closing iterator, this function can be used in combination with TBArray::begin to specify a range including all the elements in the container.
const_iterator iMS::ToneBuffer::end | ( | ) | const |
Returns a const_iterator referring to the past-the-end element in the TBArray container.
const std::string& iMS::ToneBuffer::Name | ( | ) | const |
A string stored with the Tone Buffer to aid human users in identifying the purpose of the buffer.
A descriptive string can be set alongside the Tone Buffer to allow users to identify and differentiate between Tone Buffers without having to browse through the data. The description is optional, and if, not used, the description will simply default to null.
bool iMS::ToneBuffer::operator== | ( | ToneBuffer const & | rhs | ) | const |
Equality Operator checks ToneBuffer contents for equivalence.
[in] | rhs | A ToneBuffer object to perform the comparison with |
const TBEntry& iMS::ToneBuffer::operator[] | ( | std::size_t | idx | ) | const |
Random Access to a TBEntry in the TBArray.
The array subscript operator is defined to permit applications to access a TBEntry at any arbitrary position for readback.
[in] | idx | Integer offset into the TBArray with respect to the first element in the array (ToneBuffer::cbegin()) |
TBEntry& iMS::ToneBuffer::operator[] | ( | std::size_t | idx | ) |
Random Write Access to a TBEntry in the TBArray.
The array subscript operator is defined to permit applications to access a CompensationPoint at any arbitrary position for modification.
[in] | idx | Integer offset into the TBArray with respect to the first element in the array (ToneBuffer::begin()) |
const std::size_t iMS::ToneBuffer::Size | ( | ) | const |
Returns the number of elements in the ToneBuffer (non-modifiable)