Isomet Modular Synthesiser (iMS) API  v1.4.2
iMS API
List of all members
iMS::ToneBuffer Class Reference

An array of 4-channel FAP Tones stored in memory on the Synthesiser. More...

#include <include/ToneBuffer.h>

Public Types

Tone Buffer Array

TBArray is the internal type definition used for storing a buffer of TBEntry 's in the Image

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.
 
ToneBufferoperator= (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 TBEntryoperator[] (std::size_t idx) const
 Random Access to a TBEntry in the TBArray. More...
 
TBEntryoperator[] (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 ()
 

Detailed Description

An array of 4-channel FAP Tones stored in memory on the Synthesiser.

Author
Dave Cowan
Date
2016-02-24
Since
1.1

Constructor & Destructor Documentation

iMS::ToneBuffer::ToneBuffer ( const std::string &  name = "")

Empty Constructor.

Parameters
[in]nameThe 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

Parameters
[in]tbeThe TBEntry that will fill each of the elements of the TBArray
[in]nameThe optional descriptive name to apply to the Tone Buffer
Since
1.1
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.

Parameters
[in]entrythe entry in the FileSystem Table from which to recall a ToneBuffer
[in]nameThe optional descriptive name to apply to the Tone Buffer
Since
1.1

Member Function Documentation

iterator iMS::ToneBuffer::begin ( )

Returns an iterator pointing to the first element in the TBArray container.

Returns
An iterator to the beginning of the TBArray container.
Since
1.1
const_iterator iMS::ToneBuffer::begin ( ) const

Returns a const_iterator pointing to the first element in the TBArray container.

Returns
A const_iterator to the beginning of the TBArray container.
Since
1.2.5
const_iterator iMS::ToneBuffer::cbegin ( ) const

Returns a const_iterator pointing to the first element in the TBArray container.

Returns
A const_iterator to the beginning of the TBArray container.
Since
1.1
const_iterator iMS::ToneBuffer::cend ( ) const

Returns a const_iterator referring to the past-the-end element in the TBArray container.

Returns
A const_iterator to the element past the end of the buffer.
Since
1.1
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.

Returns
An iterator to the element past the end of the TBArray.
Since
1.1
const_iterator iMS::ToneBuffer::end ( ) const

Returns a const_iterator referring to the past-the-end element in the TBArray container.

Returns
A const_iterator to the element past the end of the buffer.
Since
1.2.5
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.

Parameters
[in]rhsA ToneBuffer object to perform the comparison with
Returns
True if the supplied ToneBuffer is identical to this one.
Since
1.1
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.

Parameters
[in]idxInteger offset into the TBArray with respect to the first element in the array (ToneBuffer::cbegin())
Returns
A const reference to a TBEntry.
Since
1.1
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.

Parameters
[in]idxInteger offset into the TBArray with respect to the first element in the array (ToneBuffer::begin())
Returns
A reference to a TBEntry.
Since
1.1
const std::size_t iMS::ToneBuffer::Size ( ) const

Returns the number of elements in the ToneBuffer (non-modifiable)

Returns
The number of elements in the ToneBuffer
Since
1.1

The documentation for this class was generated from the following file: