Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

gig::Region Class Reference

Defines Region information of an Instrument. More...

#include <gig.h>

Inheritance diagram for gig::Region:

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

Public Member Functions

DimensionRegionGetDimensionRegionByValue (const uint DimValues[8])
 Use this method in your audio engine to get the appropriate dimension region with it's articulation data for the current situation.
DimensionRegionGetDimensionRegionByBit (const uint8_t DimBits[8])
 Returns the appropriate DimensionRegion for the given dimension bit numbers (zone index).
SampleGetSample ()
 Returns pointer address to the Sample referenced with this region.
Resource * GetParent ()
Articulation * GetFirstArticulation ()
Articulation * GetNextArticulation ()

Public Attributes

unsigned int Dimensions
 Number of defined dimensions.
dimension_def_t pDimensionDefinitions [8]
 Defines the five (gig2) or eight (gig3) possible dimensions (the dimension's controller and number of bits/splits).
uint32_t DimensionRegions
 Total number of DimensionRegions this Region contains.
DimensionRegionpDimensionRegions [256]
 Pointer array to the 32 (gig2) or 256 (gig3) possible dimension regions (reflects NULL for dimension regions not in use). Avoid to access the array directly and better use GetDimensionRegionByValue() instead, but of course in some cases it makes sense to use the array (e.g. iterating through all DimensionRegions).
unsigned int Layers
 Amount of defined layers (1 - 32). A value of 1 actually means no layering, a value > 1 means there is Layer dimension. The same information can of course also be obtained by accessing pDimensionDefinitions.
range_t KeyRange
range_t VelocityRange
uint16_t KeyGroup
uint16_t Layer
bool SelfNonExclusive
bool PhaseMaster
uint16_t PhaseGroup
bool MultiChannel
uint32_t Channel
Info * pInfo
 Points (in any case) to an Info object, providing additional, optional infos and comments.
dlsid_t * pDLSID
 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_t * pSampleLoops
 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)
void LoadDimensionRegions (RIFF::List *rgn)
SampleGetSampleFromWavePool (unsigned int WavePoolTableIndex, progress_t *pProgress=NULL)
 ~Region ()
void LoadArticulations ()

Protected Attributes

uint8_t VelocityTable [128]
 For velocity dimensions with custom defined zone ranges only: used for fast converting from velocity MIDI value to dimension bit number.
RIFF::ListpCkRegion
uint32_t WavePoolTableIndex
SamplepSample
Resource * pParent
RIFF::ListpParentList
ArticulationListpArticulations
ArticulationList::iterator ArticulationsIterator
uint32_t SamplerOptions

Friends

class Instrument

Detailed Description

Defines Region information of an Instrument.

Definition at line 630 of file gig.h.


Member Typedef Documentation

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

Definition at line 303 of file DLS.h.


Constructor & Destructor Documentation

gig::Region::Region Instrument pInstrument,
RIFF::List rgnList
[protected]
 

Reimplemented from DLS::Region.

Definition at line 1395 of file gig.cpp.

References gig::dimension_def_t::bits, CHUNK_ID_3LNK, gig::dimension_def_t::dimension, gig::dimension_layer, gig::dimension_none, gig::dimension_random, gig::dimension_releasetrigger, gig::dimension_roundrobin, gig::dimension_samplechannel, gig::dimension_velocity, DimensionRegions, Dimensions, GetDimensionRegionByBit(), DLS::Resource::GetParent(), GetSampleFromWavePool(), RIFF::List::GetSubChunk(), gig::range_t::high, Layers, LoadDimensionRegions(), gig::range_t::low, pDimensionDefinitions, pDimensionRegions, gig::DimensionRegion::pSample, DLS::File::pVersion, gig::dimension_def_t::ranges, gig::dimension_def_t::split_type, gig::split_type_bit, gig::split_type_customvelocity, gig::split_type_normal, RIFF::stream_curpos, VelocityTable, gig::DimensionRegion::VelocityUpperLimit, gig::dimension_def_t::zone_size, and gig::dimension_def_t::zones.

gig::Region::~Region  )  [protected, virtual]
 

Reimplemented from DLS::Region.

Definition at line 1507 of file gig.cpp.

References Dimensions, pDimensionDefinitions, pDimensionRegions, and gig::dimension_def_t::ranges.


Member Function Documentation

DimensionRegion * gig::Region::GetDimensionRegionByBit const uint8_t  DimBits[8]  ) 
 

Returns the appropriate DimensionRegion for the given dimension bit numbers (zone index).

You usually use GetDimensionRegionByValue instead of calling this method directly!

Parameters:
DimBits Bit numbers for dimension 0 to 7
Returns:
adress to the DimensionRegion for the given dimension bit numbers
See also:
GetDimensionRegionByValue()

Definition at line 1564 of file gig.cpp.

References gig::dimension_def_t::bits, pDimensionDefinitions, and pDimensionRegions.

Referenced by GetDimensionRegionByValue(), and Region().

DimensionRegion * gig::Region::GetDimensionRegionByValue const uint  DimValues[8]  ) 
 

Use this method in your audio engine to get the appropriate dimension region with it's articulation data for the current situation.

Just call the method with the current MIDI controller values and you'll get the DimensionRegion with the appropriate articulation data for the current situation (for this Region of course only). To do that you'll first have to look which dimensions with which controllers and in which order are defined for this Region when you load the .gig file. Special cases are e.g. layer or channel dimensions where you just put in the index numbers instead of a MIDI controller value (means 0 for left channel, 1 for right channel or 0 for layer 0, 1 for layer 1, etc.).

Parameters:
DimValues MIDI controller values (0-127) for dimension 0 to 7
Returns:
adress to the DimensionRegion for the given situation
See also:
pDimensionDefinitions

Dimensions

Definition at line 1534 of file gig.cpp.

References gig::dimension_def_t::bits, Dimensions, GetDimensionRegionByBit(), pDimensionDefinitions, gig::split_type_bit, gig::split_type_customvelocity, gig::split_type_normal, VelocityTable, and gig::dimension_def_t::zone_size.

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

Definition at line 85 of file DLS.cpp.

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

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

Definition at line 92 of file DLS.cpp.

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

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

Definition at line 350 of file DLS.h.

Referenced by DLS::Region::GetSample(), GetSampleFromWavePool(), and Region().

Sample * gig::Region::GetSample  ) 
 

Returns pointer address to the Sample referenced with this region.

This is the global Sample for the entire Region (not sure if this is actually used by the Gigasampler engine - I would only use the Sample referenced by the appropriate DimensionRegion instead of this sample).

Returns:
address to Sample or NULL if there is no reference to a sample saved in the .gig file

Reimplemented from DLS::Region.

Definition at line 1583 of file gig.cpp.

References GetSampleFromWavePool(), DLS::Region::pSample, and DLS::Region::WavePoolTableIndex.

Referenced by PrintRegions().

Sample * gig::Region::GetSampleFromWavePool unsigned int  WavePoolTableIndex,
progress_t pProgress = NULL
[protected]
 

Definition at line 1588 of file gig.cpp.

References gig::File::GetFirstSample(), gig::File::GetNextSample(), DLS::Resource::GetParent(), DLS::Region::pSample, and DLS::File::pWavePoolTable.

Referenced by GetSample(), and Region().

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

Definition at line 98 of file DLS.cpp.

References RIFF::List::GetSubList(), LIST_TYPE_ART1, LIST_TYPE_ART2, LIST_TYPE_LAR2, LIST_TYPE_LART, DLS::Articulator::pArticulations, and DLS::Articulator::pParentList.

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

void gig::Region::LoadDimensionRegions RIFF::List rgn  )  [protected]
 

Definition at line 1491 of file gig.cpp.

References RIFF::List::GetSubList(), LIST_TYPE_3EWL, LIST_TYPE_3PRG, and pDimensionRegions.

Referenced by Region().


Friends And Related Function Documentation

friend class Instrument [friend]
 

Reimplemented from DLS::Region.

Definition at line 648 of file gig.h.


Member Data Documentation

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

Definition at line 306 of file DLS.h.

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

uint32_t DLS::Region::Channel [inherited]
 

Definition at line 411 of file DLS.h.

Referenced by DLS::Region::Region().

uint32_t gig::Region::DimensionRegions
 

Total number of DimensionRegions this Region contains.

Definition at line 634 of file gig.h.

Referenced by Region().

unsigned int gig::Region::Dimensions
 

Number of defined dimensions.

Definition at line 632 of file gig.h.

Referenced by GetDimensionRegionByValue(), PrintRegions(), Region(), and ~Region().

int16_t DLS::Sampler::FineTune [inherited]
 

Definition at line 362 of file DLS.h.

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

int32_t DLS::Sampler::Gain [inherited]
 

Definition at line 363 of file DLS.h.

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

uint16_t DLS::Region::KeyGroup [inherited]
 

Definition at line 405 of file DLS.h.

Referenced by DLS::Region::Region().

range_t DLS::Region::KeyRange [inherited]
 

Definition at line 403 of file DLS.h.

Referenced by PrintRegions(), and DLS::Region::Region().

uint16_t DLS::Region::Layer [inherited]
 

Definition at line 406 of file DLS.h.

Referenced by PrintRegions(), and DLS::Region::Region().

unsigned int gig::Region::Layers
 

Amount of defined layers (1 - 32). A value of 1 actually means no layering, a value > 1 means there is Layer dimension. The same information can of course also be obtained by accessing pDimensionDefinitions.

Definition at line 636 of file gig.h.

Referenced by PrintRegions(), and Region().

bool DLS::Region::MultiChannel [inherited]
 

Definition at line 410 of file DLS.h.

Referenced by DLS::Region::Region().

bool DLS::Sampler::NoSampleCompression [inherited]
 

Definition at line 365 of file DLS.h.

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

bool DLS::Sampler::NoSampleDepthTruncation [inherited]
 

Definition at line 364 of file DLS.h.

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

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

Definition at line 305 of file DLS.h.

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

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

Definition at line 415 of file DLS.h.

Referenced by DLS::Region::Region().

dimension_def_t gig::Region::pDimensionDefinitions[8]
 

Defines the five (gig2) or eight (gig3) possible dimensions (the dimension's controller and number of bits/splits).

Definition at line 633 of file gig.h.

Referenced by GetDimensionRegionByBit(), GetDimensionRegionByValue(), PrintRegions(), Region(), and ~Region().

DimensionRegion* gig::Region::pDimensionRegions[256]
 

Pointer array to the 32 (gig2) or 256 (gig3) possible dimension regions (reflects NULL for dimension regions not in use). Avoid to access the array directly and better use GetDimensionRegionByValue() instead, but of course in some cases it makes sense to use the array (e.g. iterating through all DimensionRegions).

Definition at line 635 of file gig.h.

Referenced by GetDimensionRegionByBit(), LoadDimensionRegions(), PrintDimensionRegions(), PrintRegions(), Region(), and ~Region().

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

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

uint16_t DLS::Region::PhaseGroup [inherited]
 

Definition at line 409 of file DLS.h.

Referenced by DLS::Region::Region().

bool DLS::Region::PhaseMaster [inherited]
 

Definition at line 408 of file DLS.h.

Referenced by DLS::Region::Region().

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

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

Definition at line 347 of file DLS.h.

Referenced by ExtractSamples(), main(), PrintInstruments(), PrintSamples(), DLS::Resource::Resource(), and DLS::Resource::~Resource().

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

Definition at line 350 of file DLS.h.

Referenced by DLS::Resource::Resource().

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

Definition at line 304 of file DLS.h.

Referenced by DLS::Articulator::Articulator(), and DLS::Articulator::LoadArticulations().

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

Definition at line 417 of file DLS.h.

Referenced by GetSample(), DLS::Region::GetSample(), GetSampleFromWavePool(), and DLS::Region::Region().

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

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

uint32_t DLS::Sampler::SampleLoops [inherited]
 

Reflects the number of sample loops.

Definition at line 366 of file DLS.h.

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

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

Definition at line 369 of file DLS.h.

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

bool DLS::Region::SelfNonExclusive [inherited]
 

Definition at line 407 of file DLS.h.

Referenced by DLS::Region::Region().

uint8_t DLS::Sampler::UnityNote [inherited]
 

Definition at line 361 of file DLS.h.

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

range_t DLS::Region::VelocityRange [inherited]
 

Definition at line 404 of file DLS.h.

Referenced by PrintRegions(), and DLS::Region::Region().

uint8_t gig::Region::VelocityTable[128] [protected]
 

For velocity dimensions with custom defined zone ranges only: used for fast converting from velocity MIDI value to dimension bit number.

Definition at line 642 of file gig.h.

Referenced by GetDimensionRegionByValue(), and Region().

uint32_t DLS::Region::WavePoolTableIndex [protected, inherited]
 

Definition at line 416 of file DLS.h.

Referenced by GetSample(), DLS::Region::GetSample(), and DLS::Region::Region().


The documentation for this class was generated from the following files:
Generated on Wed May 25 23:48:22 2005 for libgig by  doxygen 1.4.2