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
Methods
AbsCentsToHz(int)
Converts absolute cents to frequency in Hz.
public static float AbsCentsToHz(int cents)
Parameters
centsintThe absolute cents value.
Returns
- float
The frequency in Hz.
CbAttenuationToGain(int)
Converts centibel attenuation to gain
public static float CbAttenuationToGain(int centibels)
Parameters
centibelsintThe centibel value.
Returns
- float
The gain value.
SecondsToTimecents(double)
Converts seconds to timecents.
public static short SecondsToTimecents(double seconds)
Parameters
secondsdoubleThe seconds value.
Returns
- short
The time in timecents.
TimecentsToSeconds(int)
Converts timecents to seconds.
public static float TimecentsToSeconds(int timecents)
Parameters
timecentsintThe timecents value.
Returns
- float
The time in seconds.