|
wavelength 1.0.0
|
One program (instrument) of a bank, as the bank file records it. More...
#include <program.h>

Public Member Functions | |
| Program () | |
| Construct a program with the defaults Init() sets. | |
| void | Init () |
| Reset every field to its default. | |
| int | Unpack (const unsigned char *data) |
| Read the program from a serialised record. | |
| int | Pack (unsigned char *data) const |
| Write the program as a serialised record of the current version. | |
| int | PackedSize () const |
| Report the size of a serialised record of the current version. | |
Public Attributes | |
| unsigned short | mProgram |
| unsigned char | mPan |
| unsigned char | mVolume |
| signed char | mTranspose |
| signed char | mFineTranspose |
| unsigned short | mNumSampleDescs |
One program (instrument) of a bank, as the bank file records it.
The class has no RTTI, and its name is inferred from its role. A program has a run of sample descriptors, one per key range. The serialised record is a version word followed by the fields in member order, with no padding.
| Program::Program | ( | ) |
Construct a program with the defaults Init() sets.
| void Program::Init | ( | ) |
Reset every field to its default.
| int Program::Unpack | ( | const unsigned char * | data | ) |
Read the program from a serialised record.
A record of an unknown version does not change the program.
| data | The record, at any alignment. |
| int Program::Pack | ( | unsigned char * | data | ) | const |
Write the program as a serialised record of the current version.
| data | Receives the record, at any alignment. |
| int Program::PackedSize | ( | ) | const |
Report the size of a serialised record of the current version.
| unsigned short Program::mProgram |
Program number a program change requests.
| unsigned char Program::mPan |
Pan offset, where 64 is the centre.
| unsigned char Program::mVolume |
Volume, an index into the volume curve.
| signed char Program::mTranspose |
Transposition in semitones.
| signed char Program::mFineTranspose |
Transposition in cents.
| unsigned short Program::mNumSampleDescs |
Sample descriptors in the program's run.