SoundFontInfoLib
2.21.6
Library for parsing and rendering SF2 files
|
Memory layout of a 'ibag/pbag' entry in a sound font resource. More...
#include <Bag.hpp>
Inherits SF2::Entity::Entity.
Public Member Functions | |
Bag (IO::Pos &pos) | |
Constructor that reads from file. More... | |
uint16_t | firstGeneratorIndex () const |
uint16_t | generatorCount () const |
uint16_t | firstModulatorIndex () const |
uint16_t | modulatorCount () const |
void | dump (const std::string &indent, int index) const |
Utility for displaying bag contents on output stream. More... | |
Static Public Attributes | |
constexpr static size_t | size = 4 |
Memory layout of a 'ibag/pbag' entry in a sound font resource.
Used to access packed values from a resource. Per spec, the size of this must be 4. The wGenNdx and wModNdx properties contain the first index of the generator/modulator that belongs to the instrument/preset zone. The number of generator or modulator settings is found by subtracting index value of this instance from the index value of the subsequent instance. This is guaranteed to be safe in a well-formed SF2 file, as all collections that operate in this way have a terminating instance whose index value is the total number of generators or modulators in the preset or instrument zones.
|
inlineexplicit |
Constructor that reads from file.
pos | location to read from |
References SF2::IO::Pos::readInto().
void Bag::dump | ( | const std::string & | indent, |
int | index | ||
) | const |
Utility for displaying bag contents on output stream.
indent | the prefix to write out before each line |
index | a prefix index value to write out before each lines |
References firstGeneratorIndex(), firstModulatorIndex(), generatorCount(), and modulatorCount().
|
inline |
Referenced by dump(), and generatorCount().
|
inline |
Referenced by dump(), and modulatorCount().
|
inline |
References SF2::Entity::Entity::calculateSize(), firstGeneratorIndex(), and SF2::Entity::Entity::next().
Referenced by SF2::Render::ZoneCollection< Kind >::add(), and dump().
|
inline |
References SF2::Entity::Entity::calculateSize(), firstModulatorIndex(), and SF2::Entity::Entity::next().
Referenced by SF2::Render::ZoneCollection< Kind >::add(), and dump().
|
staticconstexpr |