libgig  4.0.0.6svn2980
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

Public Member Functions

SampleGetSample ()
 
void SetSample (Sample *pSample)
 Assign another sample to this Region. More...
 
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. More...
 
virtual void UpdateChunks (progress_t *pProgress)
 Apply Region settings to the respective RIFF chunks. More...
 
virtual void CopyAssign (const Region *orig)
 Make a (semi) deep copy of the Region object given by orig and assign it to this object. More...
 
ResourceGetParent ()
 
const ResourceGetParent () const
 
void GenerateDLSID ()
 Generates a new DLSID for the resource. More...
 
virtual void CopyAssign (const Resource *orig)
 Make a deep copy of the Resource object given by orig and assign it to this object. More...
 
ArticulationGetFirstArticulation ()
 
ArticulationGetNextArticulation ()
 
virtual void CopyAssign (const Articulator *orig)
 Not yet implemented in this version, since the .gig format does not need to copy DLS articulators and so far nobody used pure DLS instrument AFAIK. More...
 
void AddSampleLoop (sample_loop_t *pLoopDef)
 Adds a new sample loop with the provided loop definition. More...
 
void DeleteSampleLoop (sample_loop_t *pLoopDef)
 Deletes an existing sample loop. More...
 
virtual void SetGain (int32_t gain)
 
virtual void CopyAssign (const Sampler *orig)
 Make a deep copy of the Sampler object given by orig and assign it to this object. More...
 

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. More...
 
dlsid_tpDLSID
 Points to a dlsid_t structure if the file provided a DLS ID else is NULL. More...
 
uint8_t UnityNote
 
int16_t FineTune
 
int32_t Gain
 
bool NoSampleDepthTruncation
 
bool NoSampleCompression
 
uint32_t SampleLoops
 Reflects the number of sample loops. More...
 
sample_loop_tpSampleLoops
 Points to the beginning of a sample loop array, or is NULL if there are no loops defined. More...
 

Protected Types

typedef std::list< Articulation * > ArticulationList
 

Protected Member Functions

 Region (Instrument *pInstrument, RIFF::List *rgnList)
 
virtual ~Region ()
 Destructor. More...
 
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 431 of file DLS.h.

Member Typedef Documentation

typedef std::list<Articulation*> DLS::Articulator::ArticulationList
protectedinherited

Definition at line 296 of file DLS.h.

Constructor & Destructor Documentation

DLS::Region::~Region ( )
protectedvirtual

Destructor.

Removes RIFF chunks associated with this Region.

Reimplemented in gig::Region.

Definition at line 1044 of file DLS.cpp.

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

Member Function Documentation

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 633 of file DLS.cpp.

References DLS::sample_loop_t::Size.

void DLS::Articulator::CopyAssign ( const Articulator orig)
virtualinherited

Not yet implemented in this version, since the .gig format does not need to copy DLS articulators and so far nobody used pure DLS instrument AFAIK.

Definition at line 240 of file DLS.cpp.

Referenced by CopyAssign(), and DLS::Instrument::CopyAssignCore().

void Resource::CopyAssign ( const Resource orig)
virtualinherited

Make a deep copy of the Resource object given by orig and assign it to this object.

Parameters
orig- original Resource object to be copied from

Definition at line 542 of file DLS.cpp.

References DLS::Resource::pInfo.

Referenced by CopyAssign(), DLS::Sample::CopyAssignCore(), and DLS::Instrument::CopyAssignCore().

void DLS::Sampler::CopyAssign ( const Sampler orig)
virtualinherited

Make a deep copy of the Sampler object given by orig and assign it to this object.

Parameters
orig- original Sampler object to be copied from

Definition at line 679 of file DLS.cpp.

References DLS::Sampler::FineTune, DLS::Sampler::Gain, DLS::Sampler::NoSampleCompression, DLS::Sampler::NoSampleDepthTruncation, DLS::Sampler::pSampleLoops, DLS::Sampler::SampleLoops, DLS::Sampler::SamplerOptions, and DLS::Sampler::UnityNote.

Referenced by CopyAssign().

void DLS::Region::CopyAssign ( const Region orig)
virtual

Make a (semi) deep copy of the Region object given by orig and assign it to this object.

Note that the sample pointer referenced by orig is simply copied as memory address. Thus the respective sample is shared, not duplicated!

Parameters
orig- original Region object to be copied from

Definition at line 1175 of file DLS.cpp.

References Channel, DLS::Articulator::CopyAssign(), DLS::Resource::CopyAssign(), DLS::Sampler::CopyAssign(), FormatOptionFlags, DLS::Resource::GetParent(), DLS::range_t::high, KeyGroup, KeyRange, Layer, DLS::range_t::low, MultiChannel, PhaseGroup, PhaseMaster, pSample, SelfNonExclusive, SetKeyRange(), VelocityRange, WaveLinkOptionFlags, and WavePoolTableIndex.

Referenced by DLS::Instrument::CopyAssign(), and gig::Region::CopyAssign().

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 655 of file DLS.cpp.

void Resource::GenerateDLSID ( )
inherited

Generates a new DLSID for the resource.

Definition at line 495 of file DLS.cpp.

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

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

Definition at line 176 of file DLS.cpp.

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

Definition at line 183 of file DLS.cpp.

const Resource* DLS::Resource::GetParent ( ) const
inlineinherited

Definition at line 352 of file DLS.h.

void DLS::Sampler::SetGain ( int32_t  gain)
virtualinherited

Reimplemented in gig::DimensionRegion.

Definition at line 586 of file DLS.cpp.

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

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 1078 of file DLS.cpp.

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

Referenced by CopyAssign(), and gig::Region::SetKeyRange().

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

Assign another sample to this Region.

Parameters
pSample- sample to be assigned

Definition at line 1066 of file DLS.cpp.

References pSample, and WavePoolTableIndex.

void DLS::Region::UpdateChunks ( progress_t pProgress)
virtual

Friends And Related Function Documentation

friend class Instrument
friend

Definition at line 457 of file DLS.h.

Member Data Documentation

ArticulationList::iterator DLS::Articulator::ArticulationsIterator
protectedinherited

Definition at line 299 of file DLS.h.

uint32_t DLS::Region::Channel

Definition at line 441 of file DLS.h.

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

int16_t DLS::Sampler::FineTune
inherited

Definition at line 368 of file DLS.h.

Referenced by DLS::Sampler::CopyAssign().

uint16_t DLS::Region::FormatOptionFlags
protected

Definition at line 452 of file DLS.h.

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

int32_t DLS::Sampler::Gain
inherited
Deprecated:
Don't alter directly, use SetGain() instead!

Definition at line 369 of file DLS.h.

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

uint16_t DLS::Region::KeyGroup

Definition at line 435 of file DLS.h.

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

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

Definition at line 433 of file DLS.h.

Referenced by CopyAssign(), Region(), SetKeyRange(), UpdateChunks(), and gig::Instrument::UpdateRegionKeyTable().

uint16_t DLS::Region::Layer

Definition at line 436 of file DLS.h.

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

bool DLS::Region::MultiChannel

Definition at line 440 of file DLS.h.

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

bool DLS::Sampler::NoSampleCompression
inherited

Definition at line 371 of file DLS.h.

Referenced by DLS::Sampler::CopyAssign().

bool DLS::Sampler::NoSampleDepthTruncation
inherited

Definition at line 370 of file DLS.h.

Referenced by DLS::Sampler::CopyAssign().

ArticulationList* DLS::Articulator::pArticulations
protectedinherited

Definition at line 298 of file DLS.h.

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 349 of file DLS.h.

uint16_t DLS::Region::PhaseGroup

Definition at line 439 of file DLS.h.

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

bool DLS::Region::PhaseMaster

Definition at line 438 of file DLS.h.

Referenced by CopyAssign(), 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 348 of file DLS.h.

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

Resource* DLS::Resource::pParent
protectedinherited
RIFF::List* DLS::Articulator::pParentList
protectedinherited

Definition at line 297 of file DLS.h.

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

RIFF::List* DLS::Sampler::pParentList
protectedinherited
RIFF::List* DLS::Resource::pResourceList
protectedinherited

Definition at line 358 of file DLS.h.

Sample* DLS::Region::pSample
protected
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 373 of file DLS.h.

Referenced by DLS::Sampler::CopyAssign(), gig::DimensionRegion::CopyAssign(), gig::DimensionRegion::DimensionRegion(), and gig::Sample::ReadAndLoop().

uint32_t DLS::Sampler::SampleLoops
inherited
uint32_t DLS::Sampler::SamplerOptions
protectedinherited

Definition at line 383 of file DLS.h.

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

bool DLS::Region::SelfNonExclusive

Definition at line 437 of file DLS.h.

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

uint32_t DLS::Sampler::uiHeaderSize
protectedinherited

Definition at line 382 of file DLS.h.

uint8_t DLS::Sampler::UnityNote
inherited

Definition at line 367 of file DLS.h.

Referenced by DLS::Sampler::CopyAssign().

range_t DLS::Region::VelocityRange

Definition at line 434 of file DLS.h.

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

uint16_t DLS::Region::WaveLinkOptionFlags
protected

Definition at line 453 of file DLS.h.

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

uint32_t DLS::Region::WavePoolTableIndex
protected

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