Class UnitConverter

Namespace
SpessaSharp.Synthesizer.Engine.Voice
Assembly
SpessaSharp.dll

Converts soundfont units into more usable values with the use of lookup tables to improve performance

public static class UnitConverter
Inheritance
UnitConverter
Inherited Members

Fields

MIN_CENTIBELS

public const int MIN_CENTIBELS = -16600

Field Value

int

Methods

AbsCentsToHz(int)

Converts absolute cents to frequency in Hz.

public static float AbsCentsToHz(int cents)

Parameters

cents int

The absolute cents value.

Returns

float

The frequency in Hz.

CbAttenuationToGain(int)

Converts centibel attenuation to gain

public static float CbAttenuationToGain(int centibels)

Parameters

centibels int

The centibel value.

Returns

float

The gain value.

SecondsToTimecents(double)

Converts seconds to timecents.

public static short SecondsToTimecents(double seconds)

Parameters

seconds double

The seconds value.

Returns

short

The time in timecents.

TimecentsToSeconds(int)

Converts timecents to seconds.

public static float TimecentsToSeconds(int timecents)

Parameters

timecents int

The timecents value.

Returns

float

The time in seconds.