|
wavelength 1.0.0
|
Program settings of one instrument of a bank, shared with the synthesiser on the IOP. More...
#include <Instrument.h>
Public Member Functions | |
| Instrument () | |
| Create an instrument and reset it. | |
| void | Init () |
| Reset every field to its default. | |
| int | FromStream (const unsigned char *data) |
| Read the instrument from its stream form. | |
| int | ToStream (unsigned char *data) const |
| Write the instrument in its stream form, as version 1. | |
Static Public Member Functions | |
| static int | StreamSize () |
| Report the size of the stream form. | |
Public Attributes | |
| unsigned short | mProgram |
| unsigned char | mPan |
| unsigned char | mVolume |
| signed char | mTranspose |
| signed char | mFineTranspose |
| unsigned short | mNumSampleDescs |
Program settings of one instrument of a bank, shared with the synthesiser on the IOP.
The class has no RTTI, and its name is inferred from its source file. The record is 8 bytes, laid out as the program of the IOP synthesiser. Its stream form is a version word followed by the fields, 0xc bytes in all.
| Instrument::Instrument | ( | ) |
Create an instrument and reset it.
| void Instrument::Init | ( | ) |
Reset every field to its default.
| int Instrument::FromStream | ( | const unsigned char * | data | ) |
Read the instrument from its stream form.
Only version 1 is accepted.
| data | The stream form. |
| int Instrument::ToStream | ( | unsigned char * | data | ) | const |
Write the instrument in its stream form, as version 1.
| data | Receives StreamSize() bytes. |
|
static |
Report the size of the stream form.
| unsigned short Instrument::mProgram |
Program number a program change requests.
| unsigned char Instrument::mPan |
Pan offset, where 64 is the centre.
| unsigned char Instrument::mVolume |
Volume, an index into the volume curve.
| signed char Instrument::mTranspose |
Transposition in semitones.
| signed char Instrument::mFineTranspose |
Transposition in cents.
| unsigned short Instrument::mNumSampleDescs |
Sample descriptions of the instrument.