libgig
4.0.0
|
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 | 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. 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... | |
Articulation * | GetFirstArticulation () |
Articulation * | GetNextArticulation () |
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 |
Info * | pInfo |
Points (in any case) to an Info object, providing additional, optional infos and comments. More... | |
dlsid_t * | pDLSID |
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_t * | pSampleLoops |
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::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 |
Friends | |
class | Instrument |
Defines Region information of an Instrument.
|
protectedinherited |
|
protected |
Definition at line 994 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.
|
protectedvirtual |
Destructor.
Removes RIFF chunks associated with this Region.
Reimplemented in gig::Region.
Definition at line 1042 of file DLS.cpp.
References RIFF::List::DeleteSubChunk(), RIFF::Chunk::GetParent(), pCkRegion, and DLS::Resource::pParent.
|
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 633 of file DLS.cpp.
References DLS::sample_loop_t::Size.
|
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().
|
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 542 of file DLS.cpp.
References DLS::Resource::pInfo.
Referenced by CopyAssign(), DLS::Sample::CopyAssignCore(), and DLS::Instrument::CopyAssignCore().
|
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 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().
|
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 1173 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().
|
inherited |
|
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().
|
inherited |
|
inherited |
|
inlineinherited |
Definition at line 350 of file DLS.h.
Referenced by gig::Region::AddDimension(), CopyAssign(), gig::DimensionRegion::CopyAssign(), gig::Region::DeleteDimensionZone(), GetSample(), gig::Region::GetSampleFromWavePool(), gig::Instrument::LoadScripts(), gig::Instrument::MoveTo(), gig::Region::Region(), SetKeyRange(), gig::Region::SetKeyRange(), gig::Region::SplitDimensionZone(), UpdateChunks(), gig::DimensionRegion::UpdateChunks(), gig::Region::UpdateChunks(), gig::Instrument::UpdateChunks(), and gig::Sample::Write().
|
inlineinherited |
Sample * DLS::Region::GetSample | ( | ) |
Definition at line 1047 of file DLS.cpp.
References DLS::File::GetFirstSample(), DLS::File::GetNextSample(), DLS::Resource::GetParent(), pSample, DLS::File::pWavePoolTable, DLS::Sample::ulWavePoolOffset, and WavePoolTableIndex.
|
protectedinherited |
Definition at line 189 of file DLS.cpp.
References DLS::Connection::Articulation, CHUNK_ID_ART2, CHUNK_ID_ARTL, RIFF::Chunk::GetChunkID(), RIFF::List::GetFirstSubChunk(), RIFF::List::GetListType(), RIFF::List::GetNextSubChunk(), RIFF::List::GetSubList(), LIST_TYPE_LAR2, and LIST_TYPE_LART.
|
virtualinherited |
Reimplemented in gig::DimensionRegion.
Definition at line 586 of file DLS.cpp.
Referenced by gig::DimensionRegion::SetGain().
|
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 1076 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.
pSample | - sample to be assigned |
Definition at line 1064 of file DLS.cpp.
References pSample, and WavePoolTableIndex.
|
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 1111 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::Articulator::UpdateChunks(), DLS::Sampler::UpdateChunks(), VelocityRange, WaveLinkOptionFlags, and WavePoolTableIndex.
Referenced by gig::Region::UpdateChunks().
|
friend |
|
protectedinherited |
uint32_t DLS::Region::Channel |
Definition at line 439 of file DLS.h.
Referenced by CopyAssign(), Region(), and UpdateChunks().
|
inherited |
Definition at line 367 of file DLS.h.
Referenced by DLS::Sampler::CopyAssign().
|
protected |
Definition at line 450 of file DLS.h.
Referenced by CopyAssign(), Region(), and UpdateChunks().
|
inherited |
Definition at line 368 of file DLS.h.
Referenced by DLS::Sampler::CopyAssign(), gig::DimensionRegion::DimensionRegion(), and gig::DimensionRegion::SetGain().
uint16_t DLS::Region::KeyGroup |
Definition at line 433 of file DLS.h.
Referenced by CopyAssign(), Region(), and UpdateChunks().
range_t DLS::Region::KeyRange |
Definition at line 431 of file DLS.h.
Referenced by CopyAssign(), Region(), SetKeyRange(), UpdateChunks(), and gig::Instrument::UpdateRegionKeyTable().
uint16_t DLS::Region::Layer |
Definition at line 434 of file DLS.h.
Referenced by CopyAssign(), Region(), and UpdateChunks().
bool DLS::Region::MultiChannel |
Definition at line 438 of file DLS.h.
Referenced by CopyAssign(), Region(), and UpdateChunks().
|
inherited |
Definition at line 370 of file DLS.h.
Referenced by DLS::Sampler::CopyAssign().
|
inherited |
Definition at line 369 of file DLS.h.
Referenced by DLS::Sampler::CopyAssign().
|
protectedinherited |
|
protected |
Definition at line 447 of file DLS.h.
Referenced by gig::Region::AddDimension(), DLS::Instrument::AddRegion(), gig::Region::DeleteDimension(), Region(), UpdateChunks(), gig::Region::UpdateChunks(), and ~Region().
|
inherited |
uint16_t DLS::Region::PhaseGroup |
Definition at line 437 of file DLS.h.
Referenced by CopyAssign(), Region(), and UpdateChunks().
bool DLS::Region::PhaseMaster |
Definition at line 436 of file DLS.h.
Referenced by CopyAssign(), Region(), and UpdateChunks().
|
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 gig::File::AddInstrument(), DLS::Resource::CopyAssign(), gig::File::File(), gig::Instrument::Instrument(), and gig::Sample::Sample().
|
protectedinherited |
Definition at line 356 of file DLS.h.
Referenced by gig::Sample::UpdateChunks(), DLS::Instrument::~Instrument(), ~Region(), and DLS::Sample::~Sample().
|
protectedinherited |
Definition at line 296 of file DLS.h.
Referenced by gig::Region::DeleteDimension().
|
protectedinherited |
Definition at line 380 of file DLS.h.
Referenced by gig::Region::AddDimension(), gig::DimensionRegion::CopyAssign(), gig::DimensionRegion::DimensionRegion(), and gig::DimensionRegion::UpdateChunks().
|
protectedinherited |
|
protected |
Definition at line 449 of file DLS.h.
Referenced by CopyAssign(), gig::Region::CopyAssign(), GetSample(), gig::Region::GetSample(), Region(), SetSample(), UpdateChunks(), and gig::Region::UpdateChunks().
|
inherited |
Points to the beginning of a sample loop array, or is NULL if there are no loops defined.
Definition at line 372 of file DLS.h.
Referenced by DLS::Sampler::CopyAssign(), gig::DimensionRegion::CopyAssign(), gig::DimensionRegion::DimensionRegion(), and gig::Sample::ReadAndLoop().
|
inherited |
Reflects the number of sample loops.
Definition at line 371 of file DLS.h.
Referenced by DLS::Sampler::CopyAssign(), gig::DimensionRegion::CopyAssign(), gig::DimensionRegion::DimensionRegion(), gig::Sample::ReadAndLoop(), and gig::File::UpdateChunks().
|
protectedinherited |
Definition at line 382 of file DLS.h.
Referenced by DLS::Sampler::CopyAssign(), and gig::DimensionRegion::DimensionRegion().
bool DLS::Region::SelfNonExclusive |
Definition at line 435 of file DLS.h.
Referenced by CopyAssign(), Region(), and UpdateChunks().
|
inherited |
Definition at line 366 of file DLS.h.
Referenced by DLS::Sampler::CopyAssign().
range_t DLS::Region::VelocityRange |
Definition at line 432 of file DLS.h.
Referenced by CopyAssign(), Region(), and UpdateChunks().
|
protected |
Definition at line 451 of file DLS.h.
Referenced by CopyAssign(), Region(), and UpdateChunks().
|
protected |
Definition at line 448 of file DLS.h.
Referenced by CopyAssign(), GetSample(), gig::Region::GetSample(), gig::Region::GetSampleFromWavePool(), Region(), SetSample(), and UpdateChunks().