wavelength 1.0.0
Loading...
Searching...
No Matches
SampleDescription Class Reference

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ SampleDescription()

SampleDescription::SampleDescription ( )

Create a description and reset it.

Ghidra address:
0x1002aad5

Member Function Documentation

◆ Validate()

void SampleDescription::Validate ( )

Check the fields after a read.

The body is empty.

Ghidra address:
0x1002aad0

◆ Init()

void SampleDescription::Init ( )

Reset every field to its default.

Ghidra address:
0x1002aaef

◆ ToStream()

int SampleDescription::ToStream ( unsigned char * data) const

Write the description in its stream form, as version 3.

Parameters
dataReceives StreamSize() bytes.
Returns
The number of bytes written.
Ghidra address:
0x1002ab84

◆ StreamSize()

int SampleDescription::StreamSize ( )
static

Report the size of the stream form.

Returns
The size in bytes.
Ghidra address:
0x1002ae5e

◆ FromStream()

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.

Parameters
dataThe stream form.
Returns
The number of bytes read.
Ghidra address:
0x1002ae68

◆ Dump()

void SampleDescription::Dump ( ) const

Print the fields to standard output.

Ghidra address:
0x1002b606

Member Data Documentation

◆ mLowKeymap

unsigned char SampleDescription::mLowKeymap

Lowest note the description plays.

◆ mHighKeymap

unsigned char SampleDescription::mHighKeymap

Highest note the description plays.

◆ mBaseKey

unsigned char SampleDescription::mBaseKey

Note at which the sample plays at its sample rate.

◆ mTranspose

signed char SampleDescription::mTranspose

Transposition in semitones.

◆ mFineTranspose

signed char SampleDescription::mFineTranspose

Transposition in cents.

◆ mAttackRate

unsigned char SampleDescription::mAttackRate

ADSR attack rate.

◆ mAttackMode

unsigned short SampleDescription::mAttackMode

Nonzero for an exponential attack.

◆ mDecayRate

unsigned char SampleDescription::mDecayRate

ADSR decay rate.

◆ mSusLevel

unsigned char SampleDescription::mSusLevel

ADSR sustain level.

◆ mSusRate

unsigned char SampleDescription::mSusRate

ADSR sustain rate.

◆ mSusMode

unsigned short SampleDescription::mSusMode

ADSR sustain mode.

◆ mReleaseRate

unsigned char SampleDescription::mReleaseRate

ADSR release rate.

◆ mReleaseMode

unsigned short SampleDescription::mReleaseMode

Nonzero for an exponential release.

◆ mVolume

unsigned char SampleDescription::mVolume

Volume, an index into the volume curve.

◆ mPan

unsigned char SampleDescription::mPan

Pan offset, where 64 is the centre.

◆ mSampleIndex

unsigned short SampleDescription::mSampleIndex

Index of the sample in its bank.

◆ mBus

unsigned short SampleDescription::mBus

Core the voice prefers.

◆ mBusMode

unsigned short SampleDescription::mBusMode

Dry and reverb mix.

◆ mSurround

signed char SampleDescription::mSurround

Nonzero to invert one side for the surround decoder.


The documentation for this class was generated from the following file: