DLS::Region Class Reference

Defines Region information of an Instrument. More...

#include <DLS.h>

Inheritance diagram for DLS::Region:

DLS::Resource DLS::Articulator DLS::Sampler gig::Region List of all members.

Public Member Functions

SampleGetSample ()
void SetSample (Sample *pSample)
 Assign another sample to this Region.
virtual void SetKeyRange (uint16_t Low, uint16_t High)
 Modifies the key range of this Region and makes sure the respective chunks are in correct order.
virtual void UpdateChunks ()
 Apply Region settings to the respective RIFF chunks.
ResourceGetParent ()
void GenerateDLSID ()
 Generates a new DLSID for the resource.
ArticulationGetFirstArticulation ()
ArticulationGetNextArticulation ()
void AddSampleLoop (sample_loop_t *pLoopDef)
 Adds a new sample loop with the provided loop definition.
void DeleteSampleLoop (sample_loop_t *pLoopDef)
 Deletes an existing sample loop.
virtual void SetGain (int32_t gain)

Public Attributes

range_t KeyRange
range_t VelocityRange
uint16_t KeyGroup
uint16_t Layer
bool SelfNonExclusive
bool PhaseMaster
uint16_t PhaseGroup
bool MultiChannel
uint32_t Channel
InfopInfo
 Points (in any case) to an Info object, providing additional, optional infos and comments.
dlsid_tpDLSID
 Points to a dlsid_t structure if the file provided a DLS ID else is NULL.
uint8_t UnityNote
int16_t FineTune
int32_t Gain
bool NoSampleDepthTruncation
bool NoSampleCompression
uint32_t SampleLoops
 Reflects the number of sample loops.
sample_loop_tpSampleLoops
 Points to the beginning of a sample loop array, or is NULL if there are no loops defined.

Protected Types

typedef std::list< Articulation * > ArticulationList

Protected Member Functions

 Region (Instrument *pInstrument, RIFF::List *rgnList)
virtual ~Region ()
 Destructor.
void LoadArticulations ()

Protected Attributes

RIFF::ListpCkRegion
uint32_t WavePoolTableIndex
SamplepSample
uint16_t FormatOptionFlags
uint16_t WaveLinkOptionFlags
ResourcepParent
RIFF::ListpResourceList
RIFF::ListpParentList
ArticulationListpArticulations
ArticulationList::iterator ArticulationsIterator
RIFF::ListpParentList
uint32_t uiHeaderSize
uint32_t SamplerOptions

Friends

class Instrument

Detailed Description

Defines Region information of an Instrument.

Definition at line 402 of file DLS.h.


Member Typedef Documentation

typedef std::list<Articulation*> DLS::Articulator::ArticulationList [protected, inherited]

Definition at line 274 of file DLS.h.


Constructor & Destructor Documentation

DLS::Region::Region ( Instrument pInstrument,
RIFF::List rgnList 
) [protected]

Definition at line 862 of file DLS.cpp.

References Channel, CHUNK_ID_RGNH, CHUNK_ID_WLNK, F_RGN_OPTION_SELFNONEXCLUSIVE, F_WAVELINK_MULTICHANNEL, F_WAVELINK_PHASE_MASTER, FormatOptionFlags, RIFF::List::GetSubChunk(), DLS::range_t::high, KeyGroup, KeyRange, Layer, DLS::range_t::low, MultiChannel, pCkRegion, PhaseGroup, PhaseMaster, pSample, RIFF::Chunk::Read(), RIFF::Chunk::ReadUint16(), RIFF::Chunk::ReadUint32(), RIFF::Chunk::RemainingBytes(), SelfNonExclusive, VelocityRange, WaveLinkOptionFlags, and WavePoolTableIndex.

DLS::Region::~Region (  )  [protected, virtual]

Destructor.

Removes RIFF chunks associated with this Region.

Reimplemented in gig::Region.

Definition at line 910 of file DLS.cpp.

References RIFF::Chunk::GetParent(), pCkRegion, and DLS::Resource::pParent.


Member Function Documentation

Sample * DLS::Region::GetSample (  ) 

Reimplemented in gig::Region.

Definition at line 915 of file DLS.cpp.

References DLS::File::GetFirstSample(), DLS::File::GetNextSample(), DLS::Resource::GetParent(), pSample, DLS::File::pWavePoolTable, DLS::Sample::ulWavePoolOffset, and WavePoolTableIndex.

void DLS::Region::SetSample ( Sample pSample  ) 

Assign another sample to this Region.

Parameters:
pSample - sample to be assigned

Definition at line 932 of file DLS.cpp.

References pSample, and WavePoolTableIndex.

void DLS::Region::SetKeyRange ( uint16_t  Low,
uint16_t  High 
) [virtual]

Modifies the key range of this Region and makes sure the respective chunks are in correct order.

Parameters:
Low - lower end of key range
High - upper end of key range

Reimplemented in gig::Region.

Definition at line 944 of file DLS.cpp.

References DLS::Resource::GetParent(), DLS::range_t::high, KeyRange, DLS::Instrument::LoadRegions(), DLS::range_t::low, DLS::Instrument::MoveRegion(), and DLS::Instrument::pRegions.

Referenced by gig::Region::SetKeyRange().

void DLS::Region::UpdateChunks (  )  [virtual]

Apply Region settings to the respective RIFF chunks.

You have to call File::Save() to make changes persistent.

Exceptions:
Exception - if the Region's sample could not be found

Reimplemented from DLS::Articulator.

Reimplemented in gig::Region.

Definition at line 978 of file DLS.cpp.

References RIFF::List::AddSubChunk(), Channel, CHUNK_ID_RGNH, CHUNK_ID_WLNK, F_RGN_OPTION_SELFNONEXCLUSIVE, F_WAVELINK_MULTICHANNEL, F_WAVELINK_PHASE_MASTER, FormatOptionFlags, DLS::Resource::GetParent(), RIFF::Chunk::GetSize(), RIFF::List::GetSubChunk(), DLS::range_t::high, KeyGroup, KeyRange, Layer, RIFF::Chunk::LoadChunkData(), DLS::range_t::low, MultiChannel, pCkRegion, PhaseGroup, PhaseMaster, pSample, DLS::File::pSamples, SelfNonExclusive, DLS::Sampler::UpdateChunks(), DLS::Articulator::UpdateChunks(), VelocityRange, WaveLinkOptionFlags, and WavePoolTableIndex.

Referenced by gig::Region::UpdateChunks().

Resource* DLS::Resource::GetParent (  )  [inline, inherited]

Definition at line 328 of file DLS.h.

References DLS::Resource::pParent.

Referenced by gig::Region::AddDimension(), GetSample(), gig::Region::GetSampleFromWavePool(), gig::Region::Region(), gig::Region::SetKeyRange(), SetKeyRange(), gig::Instrument::UpdateChunks(), gig::Region::UpdateChunks(), gig::DimensionRegion::UpdateChunks(), UpdateChunks(), and gig::Sample::Write().

void DLS::Resource::GenerateDLSID (  )  [inherited]

Generates a new DLSID for the resource.

Definition at line 450 of file DLS.cpp.

References DLS::dlsid_t::abData, DLS::Resource::pDLSID, DLS::dlsid_t::ulData1, DLS::dlsid_t::usData2, and DLS::dlsid_t::usData3.

Referenced by gig::File::AddInstrument(), and gig::File::File().

Articulation * DLS::Articulator::GetFirstArticulation (  )  [inherited]

Definition at line 174 of file DLS.cpp.

References DLS::Articulator::ArticulationsIterator, DLS::Articulator::LoadArticulations(), and DLS::Articulator::pArticulations.

Articulation * DLS::Articulator::GetNextArticulation (  )  [inherited]

Definition at line 181 of file DLS.cpp.

References DLS::Articulator::ArticulationsIterator, and DLS::Articulator::pArticulations.

void DLS::Articulator::LoadArticulations (  )  [protected, inherited]

Definition at line 187 of file DLS.cpp.

References CHUNK_ID_ART2, CHUNK_ID_ARTL, RIFF::Chunk::GetChunkID(), RIFF::List::GetFirstSubChunk(), RIFF::List::GetListType(), RIFF::List::GetNextSubChunk(), RIFF::List::GetSubList(), LIST_TYPE_LAR2, LIST_TYPE_LART, DLS::Articulator::pArticulations, and DLS::Articulator::pParentList.

Referenced by DLS::Articulator::GetFirstArticulation().

void DLS::Sampler::AddSampleLoop ( sample_loop_t pLoopDef  )  [inherited]

Adds a new sample loop with the provided loop definition.

Parameters:
pLoopDef - points to a loop definition that is to be copied

Definition at line 576 of file DLS.cpp.

References DLS::Sampler::pSampleLoops, DLS::Sampler::SampleLoops, and DLS::sample_loop_t::Size.

void DLS::Sampler::DeleteSampleLoop ( sample_loop_t pLoopDef  )  [inherited]

Deletes an existing sample loop.

Parameters:
pLoopDef - pointer to existing loop definition
Exceptions:
Exception - if given loop definition does not exist

Definition at line 598 of file DLS.cpp.

References DLS::Sampler::pSampleLoops, and DLS::Sampler::SampleLoops.

void DLS::Sampler::SetGain ( int32_t  gain  )  [virtual, inherited]

Reimplemented in gig::DimensionRegion.

Definition at line 531 of file DLS.cpp.

References DLS::Sampler::Gain.

Referenced by gig::DimensionRegion::SetGain().


Friends And Related Function Documentation

friend class Instrument [friend]

Reimplemented in gig::Region.

Definition at line 427 of file DLS.h.


Member Data Documentation

range_t DLS::Region::KeyRange

Deprecated:
Only read, don't write! Use SetKeyRange() instead.

Definition at line 404 of file DLS.h.

Referenced by Region(), SetKeyRange(), and UpdateChunks().

range_t DLS::Region::VelocityRange

Definition at line 405 of file DLS.h.

Referenced by Region(), and UpdateChunks().

uint16_t DLS::Region::KeyGroup

Definition at line 406 of file DLS.h.

Referenced by Region(), and UpdateChunks().

uint16_t DLS::Region::Layer

Definition at line 407 of file DLS.h.

Referenced by Region(), and UpdateChunks().

bool DLS::Region::SelfNonExclusive

Definition at line 408 of file DLS.h.

Referenced by Region(), and UpdateChunks().

bool DLS::Region::PhaseMaster

Definition at line 409 of file DLS.h.

Referenced by Region(), and UpdateChunks().

uint16_t DLS::Region::PhaseGroup

Definition at line 410 of file DLS.h.

Referenced by Region(), and UpdateChunks().

bool DLS::Region::MultiChannel

Definition at line 411 of file DLS.h.

Referenced by Region(), and UpdateChunks().

uint32_t DLS::Region::Channel

Definition at line 412 of file DLS.h.

Referenced by Region(), and UpdateChunks().

RIFF::List* DLS::Region::pCkRegion [protected]

Definition at line 419 of file DLS.h.

Referenced by gig::Region::AddDimension(), gig::Region::DeleteDimension(), Region(), gig::Region::UpdateChunks(), UpdateChunks(), and ~Region().

uint32_t DLS::Region::WavePoolTableIndex [protected]

Definition at line 420 of file DLS.h.

Referenced by gig::Region::GetSample(), GetSample(), Region(), SetSample(), and UpdateChunks().

Sample* DLS::Region::pSample [protected]

Definition at line 421 of file DLS.h.

Referenced by gig::Region::GetSample(), GetSample(), Region(), SetSample(), gig::Region::UpdateChunks(), and UpdateChunks().

uint16_t DLS::Region::FormatOptionFlags [protected]

Definition at line 422 of file DLS.h.

Referenced by Region(), and UpdateChunks().

uint16_t DLS::Region::WaveLinkOptionFlags [protected]

Definition at line 423 of file DLS.h.

Referenced by Region(), and UpdateChunks().

Info* DLS::Resource::pInfo [inherited]

Points (in any case) to an Info object, providing additional, optional infos and comments.

Definition at line 325 of file DLS.h.

Referenced by gig::File::AddInstrument(), gig::File::File(), gig::Instrument::Instrument(), DLS::Resource::Resource(), gig::Sample::Sample(), DLS::Resource::UpdateChunks(), and DLS::Resource::~Resource().

dlsid_t* DLS::Resource::pDLSID [inherited]

Points to a dlsid_t structure if the file provided a DLS ID else is NULL.

Definition at line 326 of file DLS.h.

Referenced by DLS::Resource::GenerateDLSID(), DLS::Resource::Resource(), DLS::Resource::UpdateChunks(), and DLS::Resource::~Resource().

Resource* DLS::Resource::pParent [protected, inherited]

Definition at line 332 of file DLS.h.

Referenced by DLS::Resource::GetParent(), DLS::Resource::Resource(), gig::Sample::UpdateChunks(), DLS::Instrument::~Instrument(), ~Region(), and DLS::Sample::~Sample().

RIFF::List* DLS::Resource::pResourceList [protected, inherited]

Definition at line 333 of file DLS.h.

Referenced by DLS::Resource::Resource(), and DLS::Resource::UpdateChunks().

RIFF::List* DLS::Articulator::pParentList [protected, inherited]

Definition at line 275 of file DLS.h.

Referenced by DLS::Articulator::Articulator(), gig::Region::DeleteDimension(), and DLS::Articulator::LoadArticulations().

ArticulationList* DLS::Articulator::pArticulations [protected, inherited]

Definition at line 276 of file DLS.h.

Referenced by DLS::Articulator::Articulator(), DLS::Articulator::GetFirstArticulation(), DLS::Articulator::GetNextArticulation(), DLS::Articulator::LoadArticulations(), DLS::Articulator::UpdateChunks(), and DLS::Articulator::~Articulator().

ArticulationList::iterator DLS::Articulator::ArticulationsIterator [protected, inherited]

Definition at line 277 of file DLS.h.

Referenced by DLS::Articulator::GetFirstArticulation(), and DLS::Articulator::GetNextArticulation().

uint8_t DLS::Sampler::UnityNote [inherited]

Definition at line 342 of file DLS.h.

Referenced by DLS::Sampler::Sampler(), and DLS::Sampler::UpdateChunks().

int16_t DLS::Sampler::FineTune [inherited]

Definition at line 343 of file DLS.h.

Referenced by DLS::Sampler::Sampler(), and DLS::Sampler::UpdateChunks().

int32_t DLS::Sampler::Gain [inherited]

Deprecated:
Don't alter directly, use SetGain() instead!

Definition at line 344 of file DLS.h.

Referenced by gig::DimensionRegion::DimensionRegion(), DLS::Sampler::Sampler(), gig::DimensionRegion::SetGain(), DLS::Sampler::SetGain(), and DLS::Sampler::UpdateChunks().

bool DLS::Sampler::NoSampleDepthTruncation [inherited]

Definition at line 345 of file DLS.h.

Referenced by DLS::Sampler::Sampler(), and DLS::Sampler::UpdateChunks().

bool DLS::Sampler::NoSampleCompression [inherited]

Definition at line 346 of file DLS.h.

Referenced by DLS::Sampler::Sampler(), and DLS::Sampler::UpdateChunks().

uint32_t DLS::Sampler::SampleLoops [inherited]

Reflects the number of sample loops.

Definition at line 347 of file DLS.h.

Referenced by DLS::Sampler::AddSampleLoop(), DLS::Sampler::DeleteSampleLoop(), gig::DimensionRegion::DimensionRegion(), gig::Sample::ReadAndLoop(), DLS::Sampler::Sampler(), and DLS::Sampler::UpdateChunks().

sample_loop_t* DLS::Sampler::pSampleLoops [inherited]

Points to the beginning of a sample loop array, or is NULL if there are no loops defined.

Definition at line 348 of file DLS.h.

Referenced by DLS::Sampler::AddSampleLoop(), DLS::Sampler::DeleteSampleLoop(), gig::DimensionRegion::DimensionRegion(), gig::Sample::ReadAndLoop(), DLS::Sampler::Sampler(), DLS::Sampler::UpdateChunks(), and DLS::Sampler::~Sampler().

RIFF::List* DLS::Sampler::pParentList [protected, inherited]

Definition at line 355 of file DLS.h.

Referenced by gig::Region::AddDimension(), gig::DimensionRegion::DimensionRegion(), DLS::Sampler::Sampler(), gig::DimensionRegion::UpdateChunks(), and DLS::Sampler::UpdateChunks().

uint32_t DLS::Sampler::uiHeaderSize [protected, inherited]

Definition at line 356 of file DLS.h.

Referenced by DLS::Sampler::Sampler(), and DLS::Sampler::UpdateChunks().

uint32_t DLS::Sampler::SamplerOptions [protected, inherited]

Definition at line 357 of file DLS.h.

Referenced by gig::DimensionRegion::DimensionRegion(), DLS::Sampler::Sampler(), and DLS::Sampler::UpdateChunks().


The documentation for this class was generated from the following files:
Generated on Sun May 1 03:22:46 2011 for libgig by  doxygen 1.5.2