libgig
4.4.1
|
Defines Region information of an Instrument. More...
#include <DLS.h>
Public Member Functions | |
Sample * | GetSample () |
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 | DeleteChunks () |
Remove all RIFF chunks associated with this Region object. 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... | |
Resource * | GetParent () |
const Resource * | GetParent () const |
void | GenerateDLSID () |
Generates a new DLSID for the resource. | |
virtual void | CopyAssign (const Resource *orig) |
Make a deep copy of the Resource object given by orig and assign it to this object. More... | |
Articulation * | GetArticulation (size_t pos) |
Returns Articulation at supplied pos position within the articulation list. More... | |
Articulation * | GetFirstArticulation () |
Returns the first Articulation in the list of articulations. More... | |
Articulation * | GetNextArticulation () |
Returns the next Articulation from the list of articulations. More... | |
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. | |
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... | |
Static Public Member Functions | |
static void | GenerateDLSID (dlsid_t *pDLSID) |
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 |
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::vector< Articulation * > | ArticulationList |
Protected Member Functions | |
Region (Instrument *pInstrument, RIFF::List *rgnList) | |
virtual | ~Region () |
Destructor. More... | |
void | LoadArticulations () |
Protected Attributes | |
RIFF::List * | pCkRegion |
uint32_t | WavePoolTableIndex |
Sample * | pSample |
uint16_t | FormatOptionFlags |
uint16_t | WaveLinkOptionFlags |
Resource * | pParent |
RIFF::List * | pResourceList |
RIFF::List * | pParentList |
ArticulationList * | pArticulations |
ArticulationList::iterator | ArticulationsIterator |
RIFF::List * | pParentList |
uint32_t | uiHeaderSize |
uint32_t | SamplerOptions |
Defines Region information of an Instrument.
|
protectedvirtual |
Destructor.
Intended to free up all memory occupied by this Region object. ATM this destructor implementation does nothing though.
Reimplemented in gig::Region.
|
inherited |
Adds a new sample loop with the provided loop definition.
pLoopDef | - points to a loop definition that is to be copied |
Definition at line 742 of file DLS.cpp.
References DLS::sample_loop_t::Size.
|
virtualinherited |
Make a deep copy of the Resource object given by orig and assign it to this object.
orig | - original Resource object to be copied from |
Definition at line 637 of file DLS.cpp.
References RIFF::List::GetSubChunk(), DLS::Resource::pInfo, RIFF::Chunk::Read(), RIFF::Chunk::ReadInt16(), RIFF::Chunk::ReadInt32(), RIFF::Chunk::ReadUint16(), RIFF::Chunk::ReadUint32(), and RIFF::Chunk::SetPos().
Referenced by CopyAssign(), DLS::Sample::CopyAssignCore(), and DLS::Instrument::DeleteChunks().
|
virtualinherited |
Make a deep copy of the Sampler object given by orig and assign it to this object.
orig | - original Sampler object to be copied from |
Definition at line 788 of file DLS.cpp.
References DLS::Sampler::Gain, DLS::Sampler::pSampleLoops, and DLS::Sampler::SampleLoops.
Referenced by CopyAssign().
|
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!
orig | - original Region object to be copied from |
Definition at line 1325 of file DLS.cpp.
References DLS::Articulator::CopyAssign(), DLS::Resource::CopyAssign(), DLS::Sampler::CopyAssign(), DLS::range_t::high, KeyRange, and DLS::range_t::low.
Referenced by DLS::Instrument::CopyAssign(), and gig::Region::CopyAssign().
|
virtual |
Remove all RIFF chunks associated with this Region object.
See Storage::DeleteChunks() for details.
Reimplemented from DLS::Articulator.
Definition at line 1184 of file DLS.cpp.
References DLS::Articulator::DeleteChunks(), DLS::Resource::DeleteChunks(), DLS::Sampler::DeleteChunks(), RIFF::List::DeleteSubChunk(), and DLS::File::GetSample().
Referenced by gig::Region::DeleteDimensionZone(), DLS::Instrument::GetNextRegion(), and gig::Region::SplitDimensionZone().
|
inherited |
|
inherited |
Returns Articulation at supplied pos position within the articulation list.
If supplied pos is out of bounds then NULL
is returned.
pos | - position of sought Articulation in articulation list |
NULL
if pos is out of bounds
|
inherited |
Returns the first Articulation in the list of articulations.
You have to call this method once before you can use GetNextArticulation().
|
inherited |
Returns the next Articulation from the list of articulations.
You have to call GetFirstArticulation() once before you can use this method. By calling this method multiple times it iterates through the available articulations.
Definition at line 234 of file DLS.cpp.
References RIFF::List::GetListType(), RIFF::List::GetSubChunkAt(), and RIFF::List::GetSubList().
|
virtual |
Modifies the key range of this Region and makes sure the respective chunks are in correct order.
Low | - lower end of key range |
High | - upper end of key range |
Reimplemented in gig::Region.
Definition at line 1228 of file DLS.cpp.
Referenced by gig::Region::SetKeyRange().
void DLS::Region::SetSample | ( | Sample * | pSample | ) |
|
virtual |
Apply Region settings to the respective RIFF chunks.
You have to call File::Save() to make changes persistent.
pProgress | - callback function for progress notification |
Reimplemented from DLS::Articulator.
Reimplemented in gig::Region.
Definition at line 1263 of file DLS.cpp.
References RIFF::Chunk::GetSize(), RIFF::Chunk::LoadChunkData(), DLS::Articulator::UpdateChunks(), and DLS::Sampler::UpdateChunks().
Referenced by gig::Region::UpdateChunks().
|
inherited |
Definition at line 429 of file DLS.h.
Referenced by DLS::Sampler::CopyAssign().
range_t DLS::Region::KeyRange |
Definition at line 495 of file DLS.h.
Referenced by CopyAssign(), and gig::ScriptGroup::DeleteScript().