Click or drag to resize

DampingNatural Method

Produces a natural damping curve very similar to that of a string based instrument - strong at first and damping quickly over time from 1 to 0 over the samplePeriod.

Namespace: GSF.Media.Music
Assembly: GSF.Media (in GSF.Media.dll) Version: 2.4.181-beta
Syntax
public static double Natural(
	long sampleIndex,
	long samplePeriod,
	int sampleRate
)
View Source

Parameters

sampleIndex  Int64
Sample index (0 to samplePeriod - 1).
samplePeriod  Int64
Total period, in whole samples per second (i.e., seconds of time * sampleRate), over which to perform damping.
sampleRate  Int32
Number of samples per second, if useful for calculation.

Return Value

Double
Scaling factor used to damp an amplitude at the given time.
Remarks
This damping algorithm combines both the logarithmic and linear damping algoriths to produce a very natural damping curve.
See Also