|
TimbreEvenHarmonicSeries Method
|
Generates an even harmonic series for the given frequency and time.
Namespace: GSF.Media.MusicAssembly: GSF.Media (in GSF.Media.dll) Version: 2.4.207-beta
Syntax Public Shared Function EvenHarmonicSeries (
frequency As Double,
sampleIndex As Long,
samplePeriod As Long,
sampleRate As Integer
) As Double
static member EvenHarmonicSeries :
frequency : float *
sampleIndex : int64 *
samplePeriod : int64 *
sampleRate : int -> float
GSF.Media.Music.Timbre.EvenHarmonicSeries = function(frequency, sampleIndex, samplePeriod, sampleRate);
View SourceParameters
- frequency Double
- Fundamental frequency of the desired note in Hz.
- sampleIndex Int64
- Sample index (represents time anywhere from zero to full length of song).
- samplePeriod Int64
- If useful, total period for note in whole samples per second (i.e., seconds of time * sampleRate) over which to compute timbre.
- sampleRate Int32
- Number of samples per second.
Return Value
DoubleThe amplitude for a simulated clarinet note at the given time.
Remarks
This method computes an amplitude representing the acoustic pressure of an
even harmonic series of the given frequency for the given time.
Algorithm: Sin(2f) + Sin(4f)/3 + Sin(6f)/5, etc.
See Also