C# Class GAudio.GATMaths

Static class which provides a few audio related methods and constants. Methods that handle the actual sample processing will be found in the GATData class or in AGATFilter derived classes.
Afficher le fichier Open project: gregzo/G-Audio Class Usage Examples

Méthodes publiques

Méthode Description
ClampData ( float data, float minValue, float maxValue, int &nbOfClippedFloats ) : void
ClampedResampledLength ( int sourceLength, int targetLength, double resamplingFactor ) : int
GetAbsMaxValue ( float data, int fromIndex, int length ) : float

Gets the absolute max value in the array

GetAbsMaxValueFromInterleaved ( float data, int fromIndex, int length, int channelNb, int nbOfChannels ) : float

Gets the absolute max value of the specified channel in an interleaved array.

GetIndexOfMaxValue ( float data ) : int
GetIndexOfMaxValue ( float data, int first, int toIndex ) : int
GetMaxAndMin ( float data, int fromIndex, int length, float &min, float &max ) : void

Gets the max and min value in the array.

GetMaxAndMin ( float data, int fromIndex, int length, float &min, float &max, int stride ) : void

Gets the max and min values in the interleaved array.

GetRatioForInterval ( float semiTones ) : float
GetSemiTonesForRatio ( float ratio ) : float
IsPrime ( int number ) : bool
MakeHammingWindow ( float data ) : void

Fills the provided array with normalized Hamming Window data

MakeHanningWindow ( float data ) : void

Fills the provided array with normalized Hanning Window data

ResampledLength ( int sourceLength, double resamplingFactor ) : int

Method Details

ClampData() public static méthode

public static ClampData ( float data, float minValue, float maxValue, int &nbOfClippedFloats ) : void
data float
minValue float
maxValue float
nbOfClippedFloats int
Résultat void

ClampedResampledLength() public static méthode

public static ClampedResampledLength ( int sourceLength, int targetLength, double resamplingFactor ) : int
sourceLength int
targetLength int
resamplingFactor double
Résultat int

GetAbsMaxValue() public static méthode

Gets the absolute max value in the array
public static GetAbsMaxValue ( float data, int fromIndex, int length ) : float
data float
fromIndex int
length int
Résultat float

GetAbsMaxValueFromInterleaved() public static méthode

Gets the absolute max value of the specified channel in an interleaved array.
public static GetAbsMaxValueFromInterleaved ( float data, int fromIndex, int length, int channelNb, int nbOfChannels ) : float
data float
fromIndex int
length int
channelNb int
nbOfChannels int
Résultat float

GetIndexOfMaxValue() public static méthode

public static GetIndexOfMaxValue ( float data ) : int
data float
Résultat int

GetIndexOfMaxValue() public static méthode

public static GetIndexOfMaxValue ( float data, int first, int toIndex ) : int
data float
first int
toIndex int
Résultat int

GetMaxAndMin() public static méthode

Gets the max and min value in the array.
public static GetMaxAndMin ( float data, int fromIndex, int length, float &min, float &max ) : void
data float
fromIndex int
length int
min float
max float
Résultat void

GetMaxAndMin() public static méthode

Gets the max and min values in the interleaved array.
public static GetMaxAndMin ( float data, int fromIndex, int length, float &min, float &max, int stride ) : void
data float
fromIndex int
length int
min float
max float
stride int
Résultat void

GetRatioForInterval() public static méthode

public static GetRatioForInterval ( float semiTones ) : float
semiTones float
Résultat float

GetSemiTonesForRatio() public static méthode

public static GetSemiTonesForRatio ( float ratio ) : float
ratio float
Résultat float

IsPrime() public static méthode

public static IsPrime ( int number ) : bool
number int
Résultat bool

MakeHammingWindow() public static méthode

Fills the provided array with normalized Hamming Window data
public static MakeHammingWindow ( float data ) : void
data float
Résultat void

MakeHanningWindow() public static méthode

Fills the provided array with normalized Hanning Window data
public static MakeHanningWindow ( float data ) : void
data float
Résultat void

ResampledLength() public static méthode

public static ResampledLength ( int sourceLength, double resamplingFactor ) : int
sourceLength int
resamplingFactor double
Résultat int