#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 |
Definition at line 511 of file SF.h.
| 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 884 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, RIFF::List::GetListType(), sf2::GetMandatoryChunk(), RIFF::Chunk::GetSize(), RIFF::List::GetSubChunk(), RIFF::List::GetSubList(), InstBags, InstGenLists, InstModLists, LIST_TYPE_PDTA, LIST_TYPE_SDTA, sf2::Version::Major, pInfo, PresetBags, PresetGenLists, PresetModLists, pRIFF, sf2::Info::pVer, RIFF::Chunk::ReadInt16(), and RIFF_TYPE_SF2.
| int sf2::File::GetPresetCount | ( | ) |
| Preset * sf2::File::GetPreset | ( | int | idx | ) |
Definition at line 1077 of file SF.cpp.
References GetPresetCount().
Referenced by DeleteInstrument().
| int sf2::File::GetInstrumentCount | ( | ) |
Definition at line 1085 of file SF.cpp.
Referenced by DeleteInstrument(), DeleteSample(), and GetInstrument().
| Instrument * sf2::File::GetInstrument | ( | int | idx | ) |
Definition at line 1089 of file SF.cpp.
References GetInstrumentCount().
Referenced by DeleteInstrument(), and DeleteSample().
| void sf2::File::DeleteInstrument | ( | Instrument * | pInstrument | ) |
Definition at line 1097 of file SF.cpp.
References GetInstrument(), GetInstrumentCount(), GetPreset(), GetPresetCount(), sf2::InstrumentBase::GetRegion(), and sf2::Region::pInstrument.
| int sf2::File::GetSampleCount | ( | ) |
Definition at line 1116 of file SF.cpp.
Referenced by DeleteSample(), GetSample(), and HasSamples().
| Sample * sf2::File::GetSample | ( | int | idx | ) |
| void sf2::File::DeleteSample | ( | Sample * | pSample | ) |
Definition at line 1128 of file SF.cpp.
References GetInstrument(), GetInstrumentCount(), GetSampleCount(), and sf2::Sample::Name.
| bool sf2::File::HasSamples | ( | ) |
friend class Instrument [friend] |
RIFF::File* sf2::File::pRIFF [protected] |
std::vector<PresetBag> sf2::File::PresetBags [protected] |
std::vector<ModList> sf2::File::PresetModLists [protected] |
std::vector<GenList> sf2::File::PresetGenLists [protected] |
std::vector<InstBag> sf2::File::InstBags [protected] |
std::vector<ModList> sf2::File::InstModLists [protected] |
std::vector<GenList> sf2::File::InstGenLists [protected] |
1.5.2