|
wavelength 1.0.0
|
How one sample plays across a key range of an instrument, shared with the synthesiser on the IOP. More...
#include <SampleDescription.h>
Public Member Functions | |
| SampleDescription () | |
| Create a description and reset it. | |
| void | Validate () |
| Check the fields after a read. | |
| void | Init () |
| Reset every field to its default. | |
| int | ToStream (unsigned char *data) const |
| Write the description in its stream form, as version 3. | |
| int | FromStream (const unsigned char *data) |
| Read the description from its stream form. | |
| void | Dump () const |
| Print the fields to standard output. | |
Static Public Member Functions | |
| static int | StreamSize () |
| Report the size of the stream form. | |
Public Attributes | |
| unsigned char | mLowKeymap |
| unsigned char | mHighKeymap |
| unsigned char | mBaseKey |
| signed char | mTranspose |
| signed char | mFineTranspose |
| unsigned char | mAttackRate |
| unsigned short | mAttackMode |
| unsigned char | mDecayRate |
| unsigned char | mSusLevel |
| unsigned char | mSusRate |
| unsigned short | mSusMode |
| unsigned char | mReleaseRate |
| unsigned short | mReleaseMode |
| unsigned char | mVolume |
| unsigned char | mPan |
| unsigned short | mSampleIndex |
| unsigned short | mBus |
| unsigned short | mBusMode |
| signed char | mSurround |
How one sample plays across a key range of an instrument, shared with the synthesiser on the IOP.
The class has no RTTI, and its name is inferred from its source file and its assert text. The record is 0x1c bytes, laid out as the descriptor of the IOP synthesiser. Its stream form is a version word followed by the fields, 0x1d bytes in all.
| SampleDescription::SampleDescription | ( | ) |
Create a description and reset it.
| void SampleDescription::Validate | ( | ) |
Check the fields after a read.
The body is empty.
| void SampleDescription::Init | ( | ) |
Reset every field to its default.
| int SampleDescription::ToStream | ( | unsigned char * | data | ) | const |
Write the description in its stream form, as version 3.
| data | Receives StreamSize() bytes. |
|
static |
Report the size of the stream form.
| int SampleDescription::FromStream | ( | const unsigned char * | data | ) |
Read the description from its stream form.
Versions 1 to 3 are accepted. Version 1 has no bus, bus mode, or surround, and version 2 has no surround.
| data | The stream form. |
| void SampleDescription::Dump | ( | ) | const |
Print the fields to standard output.
| unsigned char SampleDescription::mLowKeymap |
Lowest note the description plays.
| unsigned char SampleDescription::mHighKeymap |
Highest note the description plays.
| unsigned char SampleDescription::mBaseKey |
Note at which the sample plays at its sample rate.
| signed char SampleDescription::mTranspose |
Transposition in semitones.
| signed char SampleDescription::mFineTranspose |
Transposition in cents.
| unsigned char SampleDescription::mAttackRate |
ADSR attack rate.
| unsigned short SampleDescription::mAttackMode |
Nonzero for an exponential attack.
| unsigned char SampleDescription::mDecayRate |
ADSR decay rate.
| unsigned char SampleDescription::mSusLevel |
ADSR sustain level.
| unsigned char SampleDescription::mSusRate |
ADSR sustain rate.
| unsigned short SampleDescription::mSusMode |
ADSR sustain mode.
| unsigned char SampleDescription::mReleaseRate |
ADSR release rate.
| unsigned short SampleDescription::mReleaseMode |
Nonzero for an exponential release.
| unsigned char SampleDescription::mVolume |
Volume, an index into the volume curve.
| unsigned char SampleDescription::mPan |
Pan offset, where 64 is the centre.
| unsigned short SampleDescription::mSampleIndex |
Index of the sample in its bank.
| unsigned short SampleDescription::mBus |
Core the voice prefers.
| unsigned short SampleDescription::mBusMode |
Dry and reverb mix.
| signed char SampleDescription::mSurround |
Nonzero to invert one side for the surround decoder.