MuseScore  3.4
Music composition and notation
Public Member Functions | Public Attributes | Private Attributes | List of all members
FluidS::Sample Class Reference

#include <sfont.h>

Collaboration diagram for FluidS::Sample:
Collaboration graph
[legend]

Public Member Functions

 Sample (SFont *)
 
 ~Sample ()
 
bool inRom () const
 
void optimize ()
 If the peak volume during the loop is known, then the voice can be released earlier during the release phase. More...
 
void load ()
 
bool valid () const
 
void setValid (bool v)
 

Public Attributes

SFontsf
 
unsigned int start
 
unsigned int end
 
unsigned int loopstart
 
unsigned int loopend
 
unsigned int samplerate
 
int origpitch
 
int pitchadj
 
int sampletype
 
short * data
 
bool amplitude_that_reaches_noise_floor_is_valid
 The amplitude, that will lower the level of the sample's loop to the noise floor. More...
 
double amplitude_that_reaches_noise_floor
 

Private Attributes

bool _valid
 

Constructor & Destructor Documentation

◆ Sample()

Sample::Sample ( SFont s)

◆ ~Sample()

Sample::~Sample ( )

Member Function Documentation

◆ inRom()

bool Sample::inRom ( ) const

◆ load()

void Sample::load ( )

◆ optimize()

void Sample::optimize ( )

If the peak volume during the loop is known, then the voice can be released earlier during the release phase.

Otherwise, the voice will operate (inaudibly), until the envelope is at the nominal turnoff point. In many cases the loop volume is many dB below the maximum volume. For example, the loop volume for a typical acoustic piano is 20 dB below max. Taking that into account in the turn-off algorithm we can save 20 dB / 100 dB => 1/5 of the total release time. So it's a good idea to call fluid_voice_optimize_sample on each sample once.

◆ setValid()

void FluidS::Sample::setValid ( bool  v)
inline

◆ valid()

bool FluidS::Sample::valid ( ) const
inline

Member Data Documentation

◆ _valid

bool FluidS::Sample::_valid
private

◆ amplitude_that_reaches_noise_floor

double FluidS::Sample::amplitude_that_reaches_noise_floor

◆ amplitude_that_reaches_noise_floor_is_valid

bool FluidS::Sample::amplitude_that_reaches_noise_floor_is_valid

The amplitude, that will lower the level of the sample's loop to the noise floor.

Needed for note turnoff optimization, will be filled out automatically

◆ data

short* FluidS::Sample::data

◆ end

unsigned int FluidS::Sample::end

◆ loopend

unsigned int FluidS::Sample::loopend

◆ loopstart

unsigned int FluidS::Sample::loopstart

◆ origpitch

int FluidS::Sample::origpitch

◆ pitchadj

int FluidS::Sample::pitchadj

◆ samplerate

unsigned int FluidS::Sample::samplerate

◆ sampletype

int FluidS::Sample::sampletype

◆ sf

SFont* FluidS::Sample::sf

◆ start

unsigned int FluidS::Sample::start

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