SoundFontInfoLib
2.21.6
Library for parsing and rendering SF2 files
|
A specialization of a Zone for a Preset. More...
#include <PresetZone.hpp>
Inherits SF2::Render::Zone.
Public Member Functions | |
PresetZone (const IO::File &file, const Entity::Bag &bag, const Render::InstrumentCollection &instruments) | |
Construct new zone from entity in file. More... | |
void | refine (Voice::State &state) const |
Apply the zone generator values to the given voice state. More... | |
const Render::Instrument & | instrument () const |
![]() | |
const MIDIRange & | keyRange () const |
const MIDIRange & | velocityRange () const |
const GeneratorCollection & | generators () const |
const ModulatorCollection & | modulators () const |
bool | isGlobal () const |
bool | appliesTo (int key, int velocity) const |
Determines if this zone applies to a given MIDI key/velocity pair. More... | |
Additional Inherited Members | |
![]() | |
using | GeneratorCollection = IO::ChunkItems< Entity::Generator::Generator >::ItemRefCollection |
using | ModulatorCollection = IO::ChunkItems< Entity::Modulator::Modulator >::ItemRefCollection |
![]() | |
static MIDIRange const | all = MIDIRange(0, 255) |
A range that always returns true for any MIDI value. More... | |
![]() | |
Zone (GeneratorCollection &&gens, ModulatorCollection &&mods, Entity::Generator::Index terminal) | |
Constructor. More... | |
uint16_t | resourceLink () const |
Obtain the link to the resource used by this zone. More... | |
void | apply (Voice::State &state) const |
Apply the instrument zone to the given voice state. More... | |
void | refine (Voice::State &state) const |
Apply the zone to the given voice state by adjusting the value using the generator in the zone. More... | |
A specialization of a Zone for a Preset.
Non-global Preset zones refer to an Instrument.
|
inline |
Construct new zone from entity in file.
file | the file to work with |
instruments | to collection of instruments found in the file |
bag | the zone definition |
|
inline |
|
inline |
Apply the zone generator values to the given voice state.
Unlike instrument zones, those of a Preset only refine existing values.
state | the state to update |
References SF2::Render::Zone::refine().
Referenced by SF2::Render::Voice::Setup::apply().