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

gig::Instrument Class Reference

Provides all neccessary information for the synthesis of an Instrument. More...

#include <gig.h>

Inheritance diagram for gig::Instrument:

DLS::Instrument DLS::Resource DLS::Articulator List of all members.

Public Member Functions

RegionGetFirstRegion ()
 Returns the first Region of the instrument.
RegionGetNextRegion ()
 Returns the next Region of the instrument.
RegionGetRegion (unsigned int Key)
 Returns the appropriate Region for a triggered note.

Public Attributes

int32_t Attenuation
 in dB
uint16_t EffectSend
int16_t FineTune
 in cents
uint16_t PitchbendRange
 Number of semitones pitchbend controller can pitch (default is 2).
bool PianoReleaseMode
range_t DimensionKeyRange
 0-127 (where 0 means C1 and 127 means G9)

Protected Types

typedef std::list< Region * > RegionList
typedef std::list< Articulation * > ArticulationList

Protected Member Functions

 Instrument (File *pFile, RIFF::List *insList, progress_t *pProgress=NULL)
 ~Instrument ()
void LoadRegions ()
Resource * GetParent ()
Articulation * GetFirstArticulation ()
Articulation * GetNextArticulation ()
void LoadArticulations ()

Protected Attributes

Region ** pRegions
 Pointer array to the regions.
RegionRegionKeyTable [128]
 fast lookup for the corresponding Region of a MIDI key
int RegionIndex
bool IsDrum
 Indicates if the Instrument is a drum type, as they differ in the synthesis model of DLS from melodic instruments.
uint16_t MIDIBank
 Reflects combination of MIDIBankCoarse and MIDIBankFine (bank 1 - bank 16384).
uint8_t MIDIBankCoarse
 Reflects the MIDI Bank number for MIDI Control Change 0 (bank 1 - 128).
uint8_t MIDIBankFine
 Reflects the MIDI Bank number for MIDI Control Change 32 (bank 1 - 128).
uint32_t MIDIProgram
 Specifies the MIDI Program Change Number this Instrument should be assigned to.
uint32_t Regions
 Reflects the number of Region defintions this Instrument has.
RIFF::ListpCkInstrument
RegionList::iterator RegionsIterator
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.
Resource * pParent
RIFF::ListpParentList
ArticulationListpArticulations
ArticulationList::iterator ArticulationsIterator

Friends

class File

Detailed Description

Provides all neccessary information for the synthesis of an Instrument.

Definition at line 652 of file gig.h.


Member Typedef Documentation

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

Definition at line 303 of file DLS.h.

typedef std::list<Region*> DLS::Instrument::RegionList [protected, inherited]
 

Definition at line 437 of file DLS.h.


Constructor & Destructor Documentation

gig::Instrument::Instrument File pFile,
RIFF::List insList,
progress_t pProgress = NULL
[protected]
 

Definition at line 1605 of file gig.cpp.

References gig::__notify_progress(), Attenuation, CHUNK_ID_3EWG, DimensionKeyRange, EffectSend, FineTune, RIFF::List::GetFirstSubList(), RIFF::List::GetListType(), RIFF::List::GetNextSubList(), RIFF::List::GetSubList(), gig::range_t::high, LIST_TYPE_LART, LIST_TYPE_LRGN, LIST_TYPE_RGN, gig::range_t::low, PianoReleaseMode, PitchbendRange, pRegions, RegionIndex, RegionKeyTable, and DLS::Instrument::Regions.

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

Reimplemented from DLS::Instrument.

Definition at line 1653 of file gig.cpp.

References pRegions, and DLS::Instrument::Regions.


Member Function Documentation

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

Definition at line 85 of file DLS.cpp.

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

Region * gig::Instrument::GetFirstRegion  ) 
 

Returns the first Region of the instrument.

You have to call this method once before you use GetNextRegion().

Returns:
pointer address to first region or NULL if there is none
See also:
GetNextRegion()

Reimplemented from DLS::Instrument.

Definition at line 1686 of file gig.cpp.

References pRegions, RegionIndex, and DLS::Instrument::Regions.

Referenced by PrintRegions().

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

Definition at line 92 of file DLS.cpp.

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

Region * gig::Instrument::GetNextRegion  ) 
 

Returns the next Region of the instrument.

You have to call GetFirstRegion() once before you can use this method. By calling this method multiple times it iterates through the available Regions.

Returns:
pointer address to the next region or NULL if end reached
See also:
GetFirstRegion()

Reimplemented from DLS::Instrument.

Definition at line 1700 of file gig.cpp.

References pRegions, RegionIndex, and DLS::Instrument::Regions.

Referenced by PrintRegions().

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

Definition at line 350 of file DLS.h.

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

Region * gig::Instrument::GetRegion unsigned int  Key  ) 
 

Returns the appropriate Region for a triggered note.

Parameters:
Key MIDI Key number of triggered note / key (0 - 127)
Returns:
pointer adress to the appropriate Region or NULL if there there is no Region defined for the given Key

Definition at line 1669 of file gig.cpp.

References pRegions, and RegionKeyTable.

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 DLS::Instrument::LoadRegions  )  [protected, inherited]
 

Definition at line 365 of file DLS.cpp.

References RIFF::List::GetFirstSubList(), RIFF::List::GetNextSubList(), RIFF::List::GetSubList(), LIST_TYPE_LRGN, LIST_TYPE_RGN, LIST_TYPE_RGN2, DLS::Instrument::pCkInstrument, and DLS::Instrument::pRegions.

Referenced by DLS::Instrument::GetFirstRegion().


Friends And Related Function Documentation

friend class File [friend]
 

Reimplemented from DLS::Instrument.

Definition at line 687 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().

int32_t gig::Instrument::Attenuation
 

in dB

Definition at line 665 of file gig.h.

Referenced by Instrument().

range_t gig::Instrument::DimensionKeyRange
 

0-127 (where 0 means C1 and 127 means G9)

Definition at line 670 of file gig.h.

Referenced by Instrument().

uint16_t gig::Instrument::EffectSend
 

Definition at line 666 of file gig.h.

Referenced by Instrument().

int16_t gig::Instrument::FineTune
 

in cents

Definition at line 667 of file gig.h.

Referenced by Instrument().

bool DLS::Instrument::IsDrum [inherited]
 

Indicates if the Instrument is a drum type, as they differ in the synthesis model of DLS from melodic instruments.

Definition at line 427 of file DLS.h.

Referenced by DLS::Instrument::Instrument().

uint16_t DLS::Instrument::MIDIBank [inherited]
 

Reflects combination of MIDIBankCoarse and MIDIBankFine (bank 1 - bank 16384).

Definition at line 428 of file DLS.h.

Referenced by DLS::Instrument::Instrument(), and PrintInstruments().

uint8_t DLS::Instrument::MIDIBankCoarse [inherited]
 

Reflects the MIDI Bank number for MIDI Control Change 0 (bank 1 - 128).

Definition at line 429 of file DLS.h.

Referenced by DLS::Instrument::Instrument().

uint8_t DLS::Instrument::MIDIBankFine [inherited]
 

Reflects the MIDI Bank number for MIDI Control Change 32 (bank 1 - 128).

Definition at line 430 of file DLS.h.

Referenced by DLS::Instrument::Instrument().

uint32_t DLS::Instrument::MIDIProgram [inherited]
 

Specifies the MIDI Program Change Number this Instrument should be assigned to.

Definition at line 431 of file DLS.h.

Referenced by DLS::Instrument::Instrument(), and PrintInstruments().

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::Instrument::pCkInstrument [protected, inherited]
 

Definition at line 443 of file DLS.h.

Referenced by DLS::Instrument::Instrument(), and DLS::Instrument::LoadRegions().

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().

bool gig::Instrument::PianoReleaseMode
 

Definition at line 669 of file gig.h.

Referenced by Instrument().

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().

uint16_t gig::Instrument::PitchbendRange
 

Number of semitones pitchbend controller can pitch (default is 2).

Definition at line 668 of file gig.h.

Referenced by Instrument().

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().

Region** gig::Instrument::pRegions [protected]
 

Pointer array to the regions.

Reimplemented from DLS::Instrument.

Definition at line 681 of file gig.h.

Referenced by GetFirstRegion(), GetNextRegion(), GetRegion(), Instrument(), and ~Instrument().

int gig::Instrument::RegionIndex [protected]
 

Definition at line 683 of file gig.h.

Referenced by GetFirstRegion(), GetNextRegion(), and Instrument().

Region* gig::Instrument::RegionKeyTable[128] [protected]
 

fast lookup for the corresponding Region of a MIDI key

Definition at line 682 of file gig.h.

Referenced by GetRegion(), and Instrument().

uint32_t DLS::Instrument::Regions [inherited]
 

Reflects the number of Region defintions this Instrument has.

Definition at line 432 of file DLS.h.

Referenced by GetFirstRegion(), GetNextRegion(), Instrument(), DLS::Instrument::Instrument(), and ~Instrument().

RegionList::iterator DLS::Instrument::RegionsIterator [protected, inherited]
 

Definition at line 445 of file DLS.h.

Referenced by DLS::Instrument::GetFirstRegion(), and DLS::Instrument::GetNextRegion().


The documentation for this class was generated from the following files:
Generated on Thu May 26 00:49:28 2005 for libgig by  doxygen 1.4.2