Isomet Modular Synthesiser (iMS) API
v1.4.2
iMS API
|
Provides a mechanism for downloading ToneBuffer's to a Synthesiser's LTB memory. More...
#include <include\ToneBuffer.h>
Public Member Functions | |
Constructor & Destructor | |
ToneBufferDownload (IMSSystem &ims, const ToneBuffer &tb) | |
Constructor for ToneBufferDownload Object. More... | |
~ToneBufferDownload () | |
Destructor for ToneBufferDownload Object. | |
Bulk Transfer Initiation | |
bool | StartDownload () |
Begins download of entire ToneBuffer to LTB memory on Synthesiser. More... | |
bool | StartDownload (ToneBuffer::const_iterator first, ToneBuffer::const_iterator last) |
Begins download of partial ToneBuffer to LTB memory on Synthesiser beginning at first TBEntry and continuing until last TBEntry (including first but not including last) More... | |
bool | StartDownload (ToneBuffer::const_iterator single) |
Downloads a single TBEntry to LTB memory on Synthesiser. More... | |
bool | StartVerify () |
No Verify is possible. Always returns false. More... | |
int | GetVerifyError () |
No Verify is possible. Always return -1. More... | |
Event Notifications | |
void | ToneBufferDownloadEventSubscribe (const int message, IEventHandler *handler) |
Subscribe a callback function handler to a given ToneBufferEvents entry. More... | |
void | ToneBufferDownloadEventUnsubscribe (const int message, const IEventHandler *handler) |
Unsubscribe a callback function handler from a given ToneBufferEvents entry. More... | |
Store in Synthesiser Non-Volatile Memory | |
const FileSystemIndex | Store (const std::string &FileName, FileDefault def=FileDefault::NON_DEFAULT) const |
Store ToneBuffer contents to non-volatile memory on the synthesiser. More... | |
Provides a mechanism for downloading ToneBuffer's to a Synthesiser's LTB memory.
iMS::ToneBufferDownload::ToneBufferDownload | ( | IMSSystem & | ims, |
const ToneBuffer & | tb | ||
) |
Constructor for ToneBufferDownload Object.
The pre-requisites for an ToneBufferDownload object to be created are: (1) - an IMSSystem object, representing the configuration of an iMS target to which the ToneBuffer is to be downloaded. (2) - a complete ToneBuffer object to download to the iMS target.
ToneBufferDownload stores const references to both. This means that both must exist before the ToneBufferDownload object, and both must remain valid (not destroyed) until the ToneBufferDownload object itself is destroyed. Because they are stored as references, the IMSSystem and ToneBuffer objects themselves may be modified after the construction of the ToneBufferDownload object.
Once constructed, the object can neither be copied or assigned to another instance.
[in] | ims | A const reference to the iMS System which is the target for downloading the Image |
[in] | tb | A const reference to the ToneBuffer which shall be downloaded to the target |
|
inlinevirtual |
|
virtual |
Begins download of entire ToneBuffer to LTB memory on Synthesiser.
Implements iMS::IBulkTransfer.
bool iMS::ToneBufferDownload::StartDownload | ( | ToneBuffer::const_iterator | first, |
ToneBuffer::const_iterator | last | ||
) |
Begins download of partial ToneBuffer to LTB memory on Synthesiser beginning at first
TBEntry and continuing until last
TBEntry (including first but not including last)
bool iMS::ToneBufferDownload::StartDownload | ( | ToneBuffer::const_iterator | single | ) |
Downloads a single TBEntry to LTB memory on Synthesiser.
|
inlinevirtual |
const FileSystemIndex iMS::ToneBufferDownload::Store | ( | const std::string & | FileName, |
FileDefault | def = FileDefault::NON_DEFAULT |
||
) | const |
Store ToneBuffer contents to non-volatile memory on the synthesiser.
The contents of this ToneBuffer can be stored to an area of non-volatile memory on the Synthesiser for retrieval at a future time, including after subsequent power cycles. The data stored can be used to select between alternative ToneBuffers without needing to recalculate or download from Software.
The table can be flagged to be used as a default at startup in which case the Synthesiser will use the contents as a default ToneBuffer program allowing the Synthesiser to be used with no connection to a host system.
[in] | def | mark the entry as a default and the Synthesiser will attempt to program the data to the Local Tone Buffer on power up. |
[in] | FileName | a string to tag the download with in the File System Table (limited to 8 chars) |
void iMS::ToneBufferDownload::ToneBufferDownloadEventSubscribe | ( | const int | message, |
IEventHandler * | handler | ||
) |
Subscribe a callback function handler to a given ToneBufferEvents entry.
ToneBufferDownload can callback user application code when an event occurs in the download process. Supported events are listed under ToneBufferEvents. The callback function must inherit from the IEventHandler interface and override its EventAction() method.
Use this member function call to subscribe a callback function to an ToneBufferEvents entry. For the period that a callback is subscribed, each time an event in ToneBufferDownload occurs that would trigger the subscribed ToneBufferEvents entry, the user function callback will be executed.
[in] | message | Use the ToneBufferEvents::Event enum to specify an event to subscribe to |
[in] | handler | A function pointer to the user callback function to execute on the event trigger. |
void iMS::ToneBufferDownload::ToneBufferDownloadEventUnsubscribe | ( | const int | message, |
const IEventHandler * | handler | ||
) |
Unsubscribe a callback function handler from a given ToneBufferEvents entry.
Removes all links to a user callback function from the Event Trigger map so that any events that occur in the ToneBufferDownload object following the Unsubscribe request will no longer execute that function
[in] | message | Use the ToneBufferEvents::Event enum to specify an event to unsubscribe from |
[in] | handler | A function pointer to the user callback function that will no longer execute on an event |