#include <DLS.h>
Inheritance diagram for DLS::Instrument:
Public Member Functions | |
Region * | GetFirstRegion () |
Region * | GetNextRegion () |
Region * | AddRegion () |
void | DeleteRegion (Region *pRegion) |
virtual void | UpdateChunks () |
Apply Instrument with all its Regions to the respective RIFF chunks. | |
Resource * | GetParent () |
void | GenerateDLSID () |
Generates a new DLSID for the resource. | |
Articulation * | GetFirstArticulation () |
Articulation * | GetNextArticulation () |
Public Attributes | |
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). Do not change this value, it will not be saved! Change MIDIBankCoarse and MIDIBankFine instead (we might change that in future). | |
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. | |
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. | |
Protected Types | |
typedef std::list< Region * > | RegionList |
typedef std::list< Articulation * > | ArticulationList |
Protected Member Functions | |
Instrument (File *pFile, RIFF::List *insList) | |
Constructor. | |
virtual void | LoadRegions () |
virtual | ~Instrument () |
Destructor. | |
void | LoadArticulations () |
Protected Attributes | |
RIFF::List * | pCkInstrument |
RegionList * | pRegions |
RegionList::iterator | RegionsIterator |
Resource * | pParent |
RIFF::List * | pResourceList |
RIFF::List * | pParentList |
ArticulationList * | pArticulations |
ArticulationList::iterator | ArticulationsIterator |
Friends | |
class | File |
class | Region |
Classes | |
struct | midi_locale_t |
Definition at line 447 of file DLS.h.
|
|
|
|
|
Constructor. Load an existing instrument definition or create a new one. An 'ins' list chunk must be given to this constructor. In case this 'ins' list chunk contains a 'insh' chunk, the instrument data fields will be loaded from there, otherwise default values will be used and the 'insh' chunk will be created once File::Save() was called.
Definition at line 1048 of file DLS.cpp. References DLS::Instrument::midi_locale_t::bank, CHUNK_ID_INSH, DRUM_TYPE_MASK, RIFF::List::GetSubChunk(), DLS::Instrument::midi_locale_t::instrument, IsDrum, MIDI_BANK_COARSE, MIDI_BANK_FINE, MIDI_BANK_MERGE, MIDIBank, MIDIBankCoarse, MIDIBankFine, MIDIProgram, pCkInstrument, pRegions, RIFF::Chunk::Read(), RIFF::Chunk::ReadUint32(), and Regions. |
|
Destructor. Removes RIFF chunks associated with this Instrument and frees all memory occupied by this instrument. Reimplemented in gig::Instrument. Definition at line 1166 of file DLS.cpp. References RIFF::Chunk::GetParent(), pCkInstrument, DLS::Resource::pParent, and pRegions. |
|
Reimplemented in gig::Instrument. Definition at line 1099 of file DLS.cpp. References RIFF::List::AddSubList(), RIFF::List::GetSubList(), LIST_TYPE_LRGN, LIST_TYPE_RGN, LoadRegions(), pCkInstrument, pRegions, Region, and Regions. |
|
Definition at line 1119 of file DLS.cpp. References pRegions, and Regions. Referenced by gig::Instrument::DeleteRegion(). |
|
Generates a new DLSID for the resource.
Definition at line 449 of file DLS.cpp. References DLS::dlsid_t::abData, DLS::Resource::pDLSID, DLS::dlsid_t::ulData1, DLS::dlsid_t::usData2, and DLS::dlsid_t::usData3. Referenced by gig::File::AddInstrument(), and gig::File::File(). |
|
Definition at line 173 of file DLS.cpp. References DLS::Articulator::ArticulationsIterator, DLS::Articulator::LoadArticulations(), and DLS::Articulator::pArticulations. |
|
Reimplemented in gig::Instrument. Definition at line 1071 of file DLS.cpp. References LoadRegions(), pRegions, and RegionsIterator. |
|
Definition at line 180 of file DLS.cpp. References DLS::Articulator::ArticulationsIterator, and DLS::Articulator::pArticulations. |
|
Reimplemented in gig::Instrument. Definition at line 1078 of file DLS.cpp. References pRegions, and RegionsIterator. |
|
Definition at line 344 of file DLS.h. References DLS::Resource::pParent. Referenced by gig::Region::AddDimension(), DLS::Region::GetSample(), gig::Region::GetSampleFromWavePool(), gig::Region::SetKeyRange(), DLS::Region::SetKeyRange(), gig::Instrument::UpdateChunks(), gig::DimensionRegion::UpdateChunks(), and DLS::Region::UpdateChunks(). |
|
Definition at line 186 of file DLS.cpp. References CHUNK_ID_ART2, CHUNK_ID_ARTL, RIFF::Chunk::GetChunkID(), RIFF::List::GetFirstSubChunk(), RIFF::List::GetListType(), RIFF::List::GetNextSubChunk(), RIFF::List::GetSubList(), LIST_TYPE_LAR2, LIST_TYPE_LART, DLS::Articulator::pArticulations, and DLS::Articulator::pParentList. Referenced by DLS::Articulator::GetFirstArticulation(). |
|
Definition at line 1084 of file DLS.cpp. References RIFF::List::GetFirstSubList(), RIFF::List::GetListType(), RIFF::List::GetNextSubList(), RIFF::List::GetSubList(), LIST_TYPE_LRGN, LIST_TYPE_RGN, LIST_TYPE_RGN2, pCkInstrument, and pRegions. Referenced by AddRegion(), GetFirstRegion(), and DLS::Region::SetKeyRange(). |
|
Apply Instrument with all its Regions to the respective RIFF chunks. You have to call File::Save() to make changes persistent.
Reimplemented from DLS::Articulator. Reimplemented in gig::Instrument. Definition at line 1134 of file DLS.cpp. References RIFF::List::AddSubChunk(), DLS::Instrument::midi_locale_t::bank, CHUNK_ID_INSH, DRUM_TYPE_MASK, RIFF::List::GetSubChunk(), DLS::Instrument::midi_locale_t::instrument, IsDrum, RIFF::Chunk::LoadChunkData(), MIDI_BANK_ENCODE, MIDI_BANK_MERGE, MIDIBank, MIDIBankCoarse, MIDIBankFine, MIDIProgram, pCkInstrument, pRegions, Regions, DLS::Articulator::UpdateChunks(), and DLS::Resource::UpdateChunks(). Referenced by gig::Instrument::UpdateChunks(). |
|
Reimplemented in gig::Instrument. |
|
Reimplemented in gig::Instrument. Definition at line 476 of file DLS.h. Referenced by AddRegion(). |
|
Definition at line 293 of file DLS.h. Referenced by DLS::Articulator::GetFirstArticulation(), and DLS::Articulator::GetNextArticulation(). |
|
Indicates if the Instrument is a drum type, as they differ in the synthesis model of DLS from melodic instruments.
Definition at line 449 of file DLS.h. Referenced by Instrument(), and UpdateChunks(). |
|
Reflects combination of MIDIBankCoarse and MIDIBankFine (bank 1 - bank 16384). Do not change this value, it will not be saved! Change MIDIBankCoarse and MIDIBankFine instead (we might change that in future).
Definition at line 450 of file DLS.h. Referenced by Instrument(), and UpdateChunks(). |
|
Reflects the MIDI Bank number for MIDI Control Change 0 (bank 1 - 128).
Definition at line 451 of file DLS.h. Referenced by Instrument(), and UpdateChunks(). |
|
Reflects the MIDI Bank number for MIDI Control Change 32 (bank 1 - 128).
Definition at line 452 of file DLS.h. Referenced by Instrument(), and UpdateChunks(). |
|
Specifies the MIDI Program Change Number this Instrument should be assigned to.
Definition at line 453 of file DLS.h. Referenced by Instrument(), and UpdateChunks(). |
|
Definition at line 292 of file DLS.h. Referenced by DLS::Articulator::Articulator(), DLS::Articulator::GetFirstArticulation(), DLS::Articulator::GetNextArticulation(), DLS::Articulator::LoadArticulations(), DLS::Articulator::UpdateChunks(), and DLS::Articulator::~Articulator(). |
|
Definition at line 468 of file DLS.h. Referenced by gig::Instrument::AddRegion(), AddRegion(), Instrument(), LoadRegions(), gig::Instrument::UpdateChunks(), UpdateChunks(), and ~Instrument(). |
|
Points to a dlsid_t structure if the file provided a DLS ID else is NULL.
Definition at line 342 of file DLS.h. Referenced by DLS::Resource::GenerateDLSID(), DLS::Resource::Resource(), DLS::Resource::UpdateChunks(), and DLS::Resource::~Resource(). |
|
Points (in any case) to an Info object, providing additional, optional infos and comments.
Definition at line 341 of file DLS.h. Referenced by gig::File::AddInstrument(), gig::File::File(), gig::Instrument::Instrument(), DLS::Resource::Resource(), gig::Sample::Sample(), DLS::Resource::UpdateChunks(), and DLS::Resource::~Resource(). |
|
Definition at line 348 of file DLS.h. Referenced by DLS::Resource::GetParent(), DLS::Resource::Resource(), gig::Sample::UpdateChunks(), ~Instrument(), DLS::Region::~Region(), and DLS::Sample::~Sample(). |
|
Definition at line 291 of file DLS.h. Referenced by DLS::Articulator::Articulator(), and DLS::Articulator::LoadArticulations(). |
|
|
Definition at line 349 of file DLS.h. Referenced by DLS::Resource::Resource(), and DLS::Resource::UpdateChunks(). |
|
Reflects the number of Region defintions this Instrument has.
Definition at line 454 of file DLS.h. Referenced by gig::Instrument::AddRegion(), AddRegion(), DeleteRegion(), gig::Instrument::Instrument(), Instrument(), and UpdateChunks(). |
|
Definition at line 470 of file DLS.h. Referenced by gig::Instrument::GetFirstRegion(), GetFirstRegion(), gig::Instrument::GetNextRegion(), and GetNextRegion(). |