sf2 Namespace Reference

SoundFont specific classes and definitions. More...

## Classes

class | Region
| Instrument zone. More...

## Typedefs

typedef struct sf2::_PresetBag | PresetBag
typedef uint16_t | SFModulator
typedef uint16_t | SFGenerator
typedef uint16_t | SFTransform
typedef struct sf2::_ModList | ModList
typedef struct sf2::_RangesType | RangesType
typedef union sf2::_GenAmountType | GenAmountType
typedef struct sf2::_GenList | GenList
typedef struct sf2::_InstBag | InstBag
typedef std::string | String

## Enumerations

enum

SFGeneratorType {
START_ADDRS_OFFSET = 0 , END_ADDRS_OFFSET , STARTLOOP_ADDRS_OFFSET , ENDLOOP_ADDRS_OFFSET ,
START_ADDRS_COARSE_OFFSET , MOD_LFO_TO_PITCH , VIB_LFO_TO_PITCH , MOD_ENV_TO_PITCH ,
INITIAL_FILTER_FC , INITIAL_FILTER_Q , MOD_LFO_TO_FILTER_FC , MOD_ENV_TO_FILTER_FC ,
END_ADDRS_COARSE_OFFSET , MOD_LFO_TO_VOLUME , UNUSED1 , CHORUS_EFFECTS_SEND ,
REVERB_EFFECTS_SEND , PAN , UNUSED2 , UNUSED3 ,
UNUSED4 , DELAY_MOD_LFO , FREQ_MOD_LFO , DELAY_VIB_LFO ,
FREQ_VIB_LFO , DELAY_MOD_ENV , ATTACK_MOD_ENV , HOLD_MOD_ENV ,
DECAY_MOD_ENV , SUSTAIN_MOD_ENV , RELEASE_MOD_ENV , KEYNUM_TO_MOD_ENV_HOLD ,
KEYNUM_TO_MOD_ENV_DECAY , DELAY_VOL_ENV , ATTACK_VOL_ENV , HOLD_VOL_ENV ,
DECAY_VOL_ENV , SUSTAIN_VOL_ENV , RELEASE_VOL_ENV , KEYNUM_TO_VOL_ENV_HOLD ,
KEYNUM_TO_VOL_ENV_DECAY , INSTRUMENT , RESERVED1 , KEY_RANGE ,
VEL_RANGE , STARTLOOP_ADDRS_COARSE_OFFSET , KEYNUM , VELOCITY ,
INITIAL_ATTENUATION , RESERVED2 , ENDLOOP_ADDRS_COARSE_OFFSET , COARSE_TUNE ,
FINE_TUNE , SAMPLE_ID , SAMPLE_MODES , RESERVED3 ,
SCALE_TUNING , EXCLUSIVE_CLASS , OVERRIDING_ROOT_KEY , UNUSED5 ,
END_OPER
}

## Functions

double | ToSeconds (int Timecents)
double | ToRatio (int Centibels)
double | ToHz (int cents)
String | libraryName ()
| Returns the name of this C++ library.
String | libraryVersion ()
| Returns version of this C++ library.
RIFF::Chunk * | GetMandatoryChunk (RIFF::List *list, uint32_t chunkId)
void | LoadString (RIFF::Chunk *ck, std::string &s, int strLength)
void | VerifySize (RIFF::Chunk *ck, int size)
| Throws an error if the chunk is NULL or the chunk data size is less than size (in bytes).
int | CheckRange (std::string genName, int min, int max, int &gen)
template<bool CLEAR>
unsigned long | ReadSample (Sample *pSample, void *pBuffer, unsigned long SampleCount, Sample::buffer_t *tempBuffer=NULL)

## Detailed Description

SoundFont specific classes and definitions.

## Typedef Documentation

## SFGenerator

typedef uint16_t sf2::SFGenerator

Definition at line 76 of file SF.h.

## SFModulator

typedef uint16_t sf2::SFModulator

Definition at line 75 of file SF.h.

## SFTransform

typedef uint16_t sf2::SFTransform

Definition at line 77 of file SF.h.

## String

typedef std::string sf2::String

Definition at line 229 of file SF.h.

## Enumeration Type Documentation

## SFGeneratorType

enum sf2::SFGeneratorType

Definition at line 113 of file SF.h.

## Function Documentation

## CheckRange()

int sf2::CheckRange | ( | std::string | genName,
|  | int | min,
|  | int | max,
|  | int & | gen )

Definition at line 299 of file SF.cpp.

## GetMandatoryChunk()

RIFF::Chunk * sf2::GetMandatoryChunk | ( | RIFF::List * | list,
|  | uint32_t | chunkId )

Definition at line 54 of file SF.cpp.

## libraryName()

String sf2::libraryName | ( |  | ) |

Returns the name of this C++ library.

Definition at line 1565 of file SF.cpp.

References libraryName().

Referenced by libraryName().

## libraryVersion()

String sf2::libraryVersion | ( |  | ) |

Returns version of this C++ library.

Definition at line 1572 of file SF.cpp.

References libraryVersion().

Referenced by libraryVersion().

## LoadString()

void sf2::LoadString | ( | RIFF::Chunk * | ck,
|  | std::string & | s,
|  | int | strLength )

Definition at line 60 of file SF.cpp.

## ReadSample()

template<bool CLEAR>

unsigned long sf2::ReadSample | ( | Sample * | pSample,
|  | void * | pBuffer,
|  | unsigned long | SampleCount,
|  | Sample::buffer_t * | tempBuffer = NULL )

inline

Definition at line 1420 of file SF.cpp.

## ToHz()

double sf2::ToHz | ( | int | cents | ) |

Definition at line 48 of file SF.cpp.

## ToRatio()

double sf2::ToRatio | ( | int | Centibels | ) |

Definition at line 42 of file SF.cpp.

## ToSeconds()

double sf2::ToSeconds | ( | int | Timecents | ) |

Definition at line 35 of file SF.cpp.

## VerifySize()

void sf2::VerifySize | ( | RIFF::Chunk * | ck,
|  | int | size )

Throws an error if the chunk is NULL or the chunk data size is less than size (in bytes).

Definition at line 77 of file SF.cpp.

References RIFF::Chunk::GetChunkID(), and RIFF::Chunk::GetSize().