SoundFontInfoLib  2.21.6
Library for parsing and rendering SF2 files
SF2::Entity::Instrument Class Reference

Memory layout of a 'inst' entry. More...

#include <Instrument.hpp>

Inherits SF2::Entity::Entity.

Public Member Functions

 Instrument (IO::Pos &pos)
 
std::string name () const
 
uint16_t firstZoneIndex () const
 
uint16_t zoneCount () const
 
void dump (const std::string &indent, int index) const
 

Static Public Attributes

constexpr static size_t size = 22
 

Detailed Description

Memory layout of a 'inst' entry.

The size of this is defined to be 22 bytes.

An instrument is ultimately defined by its samples, but there can be multiple instruments defined that use the same sample source with different gen/mod settings (the sample source is indeed itself a generator setting).

Constructor & Destructor Documentation

◆ Instrument()

SF2::Entity::Instrument::Instrument ( IO::Pos pos)
inlineexplicit

Member Function Documentation

◆ dump()

void Instrument::dump ( const std::string &  indent,
int  index 
) const

References firstZoneIndex(), name(), and zoneCount().

◆ firstZoneIndex()

uint16_t SF2::Entity::Instrument::firstZoneIndex ( ) const
inline
Returns
the index of the first Zone of the instrument

Referenced by dump(), SF2::Render::Instrument::Instrument(), and zoneCount().

◆ name()

std::string SF2::Entity::Instrument::name ( ) const
inline
Returns
the name of the instrument

Referenced by dump().

◆ zoneCount()

uint16_t SF2::Entity::Instrument::zoneCount ( ) const
inline
Returns
the number of instrument zones

References SF2::Entity::Entity::calculateSize(), firstZoneIndex(), and SF2::Entity::Entity::next().

Referenced by dump(), and SF2::Render::Instrument::Instrument().

Member Data Documentation

◆ size

constexpr static size_t SF2::Entity::Instrument::size = 22
staticconstexpr

Referenced by Instrument().


The documentation for this class was generated from the following files: