|
wavelength 1.0.0
|
How a program plays one sample over a key range, as the bank file records it. More...
#include <sampledesc.h>

Public Member Functions | |
| SampleDesc () | |
| Construct a descriptor with the defaults Init() sets. | |
| void | Init () |
| Reset every field to its default. | |
| int | Pack (unsigned char *data) const |
| Write the descriptor as a serialised record of version 3. | |
| int | PackedSize () const |
| Report the size of a serialised record of version 3. | |
| int | Unpack (const unsigned char *data) |
| Read the descriptor from a serialised record of version 1, 2, or 3. | |
| void | Validate () |
| Check the descriptor after Unpack(). | |
| void | Dump () const |
| Print every field to the console. | |
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 a program plays one sample over a key range, as the bank file records it.
The class has no RTTI. Its name is inferred from the iSd the dump prints, and the member names are the ones the dump prints. The envelope fields store the SPU2 ADSR rates and modes. The serialised record is a version word followed by the fields in a fixed order with no padding. Version 1 stops after mSampleIndex, version 2 adds mBus and mBusMode, and version 3 adds mSurround.
| SampleDesc::SampleDesc | ( | ) |
Construct a descriptor with the defaults Init() sets.
| void SampleDesc::Init | ( | ) |
Reset every field to its default.
| int SampleDesc::Pack | ( | unsigned char * | data | ) | const |
Write the descriptor as a serialised record of version 3.
| data | Receives the record, at any alignment. |
| int SampleDesc::PackedSize | ( | ) | const |
Report the size of a serialised record of version 3.
| int SampleDesc::Unpack | ( | const unsigned char * | data | ) |
Read the descriptor from a serialised record of version 1, 2, or 3.
Fields a version does not record retain their defaults. A record of an unknown version does not change the descriptor.
| data | The record, at any alignment. |
| void SampleDesc::Validate | ( | ) |
Check the descriptor after Unpack().
The body is empty.
| void SampleDesc::Dump | ( | ) | const |
Print every field to the console.
| unsigned char SampleDesc::mLowKeymap |
Lowest note the descriptor plays.
| unsigned char SampleDesc::mHighKeymap |
Highest note the descriptor plays.
| unsigned char SampleDesc::mBaseKey |
Note at which the sample plays at its sample rate.
| signed char SampleDesc::mTranspose |
Transposition in semitones.
| signed char SampleDesc::mFineTranspose |
Transposition in cents.
| unsigned char SampleDesc::mAttackRate |
ADSR attack rate.
| unsigned short SampleDesc::mAttackMode |
Nonzero for an exponential attack.
| unsigned char SampleDesc::mDecayRate |
ADSR decay rate.
| unsigned char SampleDesc::mSusLevel |
ADSR sustain level.
| unsigned char SampleDesc::mSusRate |
ADSR sustain rate.
| unsigned short SampleDesc::mSusMode |
ADSR sustain mode, zero to three.
| unsigned char SampleDesc::mReleaseRate |
ADSR release rate.
| unsigned short SampleDesc::mReleaseMode |
Nonzero for an exponential release.
| unsigned char SampleDesc::mVolume |
Volume, an index into the volume curve.
| unsigned char SampleDesc::mPan |
Pan offset, where 64 is the centre.
| unsigned short SampleDesc::mSampleIndex |
Index of the sample in its bank.
| unsigned short SampleDesc::mBus |
Core the voice prefers when the channel defers to it.
| unsigned short SampleDesc::mBusMode |
Dry and reverb mix when the channel defers to it.
| signed char SampleDesc::mSurround |
Nonzero to invert one side for the surround decoder.