libgig
3.3.0.svn3
|
#include <SF.h>
Public Member Functions | |
File (RIFF::File *pRIFF) | |
Constructor. | |
~File () | |
int | GetPresetCount () |
Preset * | GetPreset (int idx) |
int | GetInstrumentCount () |
Instrument * | GetInstrument (int idx) |
void | DeleteInstrument (Instrument *pInstrument) |
int | GetSampleCount () |
Sample * | GetSample (int idx) |
void | DeleteSample (Sample *pSample) |
bool | HasSamples () |
Public Attributes | |
Info * | pInfo |
Protected Attributes | |
RIFF::File * | pRIFF |
std::vector< PresetBag > | PresetBags |
std::vector< ModList > | PresetModLists |
std::vector< GenList > | PresetGenLists |
std::vector< InstBag > | InstBags |
std::vector< ModList > | InstModLists |
std::vector< GenList > | InstGenLists |
Friends | |
class | Region |
class | Instrument |
class | Preset |
sf2::File::File | ( | RIFF::File * | pRIFF | ) |
Constructor.
Load an existing SF2 file.
pRIFF | - pointer to a RIFF file which is actually the SF2 file to load |
Exception | if given file is not a SF2 file, expected chunks are missing |
Definition at line 978 of file SF.cpp.
References CHUNK_ID_IBAG, CHUNK_ID_IGEN, CHUNK_ID_IMOD, CHUNK_ID_INST, CHUNK_ID_PBAG, CHUNK_ID_PGEN, CHUNK_ID_PHDR, CHUNK_ID_PMOD, CHUNK_ID_SHDR, CHUNK_ID_SM24, CHUNK_ID_SMPL, sf2::_GenList::GenAmount, sf2::_PresetBag::GenNdx, sf2::_GenList::GenOper, RIFF::List::GetListType(), sf2::GetMandatoryChunk(), RIFF::Chunk::GetSize(), RIFF::List::GetSubChunk(), RIFF::List::GetSubList(), sf2::Instrument::InstBagNdx, InstBags, InstGenLists, sf2::_InstBag::InstGenNdx, InstModLists, sf2::_InstBag::InstModNdx, Instrument, LIST_TYPE_PDTA, LIST_TYPE_SDTA, sf2::Instrument::LoadRegions(), sf2::Preset::LoadRegions(), sf2::Version::Major, sf2::_ModList::ModAmount, sf2::_ModList::ModAmtSrcOper, sf2::_ModList::ModDestOper, sf2::_PresetBag::ModNdx, sf2::_ModList::ModSrcOper, sf2::_ModList::ModTransOper, pInfo, Preset, sf2::Preset::PresetBagNdx, PresetBags, PresetGenLists, PresetModLists, pRIFF, sf2::Info::pVer, RIFF::Chunk::ReadInt16(), RIFF_TYPE_SF2, and sf2::_GenAmountType::wAmount.
void sf2::File::DeleteInstrument | ( | Instrument * | pInstrument | ) |
Definition at line 1191 of file SF.cpp.
References GetInstrument(), GetInstrumentCount(), GetPreset(), GetPresetCount(), sf2::InstrumentBase::GetRegion(), sf2::InstrumentBase::GetRegionCount(), and sf2::Region::pInstrument.
void sf2::File::DeleteSample | ( | Sample * | pSample | ) |
Definition at line 1222 of file SF.cpp.
References GetInstrument(), GetInstrumentCount(), sf2::InstrumentBase::GetRegion(), sf2::InstrumentBase::GetRegionCount(), sf2::Region::GetSample(), GetSampleCount(), and sf2::Sample::Name.
Instrument * sf2::File::GetInstrument | ( | int | idx | ) |
Definition at line 1183 of file SF.cpp.
References GetInstrumentCount().
Referenced by DeleteInstrument(), and DeleteSample().
int sf2::File::GetInstrumentCount | ( | ) |
Definition at line 1179 of file SF.cpp.
Referenced by DeleteInstrument(), DeleteSample(), and GetInstrument().
Preset * sf2::File::GetPreset | ( | int | idx | ) |
Definition at line 1171 of file SF.cpp.
References GetPresetCount().
Referenced by DeleteInstrument().
int sf2::File::GetPresetCount | ( | ) |
Definition at line 1167 of file SF.cpp.
Referenced by DeleteInstrument(), and GetPreset().
Sample * sf2::File::GetSample | ( | int | idx | ) |
Definition at line 1214 of file SF.cpp.
References GetSampleCount().
int sf2::File::GetSampleCount | ( | ) |
Definition at line 1210 of file SF.cpp.
Referenced by DeleteSample(), GetSample(), and HasSamples().
bool sf2::File::HasSamples | ( | ) |
Definition at line 1247 of file SF.cpp.
References GetSampleCount().
|
friend |
|
protected |
Definition at line 545 of file SF.h.
Referenced by File(), and sf2::Instrument::LoadRegions().
|
protected |
Definition at line 547 of file SF.h.
Referenced by File(), and sf2::Instrument::LoadRegions().
|
protected |
Definition at line 546 of file SF.h.
Referenced by File(), and sf2::Instrument::LoadRegions().
|
protected |
Definition at line 542 of file SF.h.
Referenced by File(), and sf2::Preset::LoadRegions().
|
protected |
Definition at line 544 of file SF.h.
Referenced by File(), and sf2::Preset::LoadRegions().
|
protected |
|
protected |