BASS.NET API for the Un4seen BASS Audio Library

UtilsSemitone2Samplerate Method

BASS.NET API for the Un4seen BASS Audio Library
Calculates a new samplerate according to a shift of an original samplerate by a number of semitones.

Namespace:  Un4seen.Bass
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

public static float Semitone2Samplerate(
	float origfreq,
	int semitones
)

Parameters

origfreq
Type: SystemSingle
The original samplerate which should be changed.
semitones
Type: SystemInt32
The number of semitones for which the original samplerate should be changed (negative values will slow down, positve numbers will fasten).

Return Value

Type: Single
The resulting samplerate which was changed by the number of given semitones.
Remarks

A semitone, or half-step is a musical interval. An octave is 12 semitones wide. Changing a samplerate in semitones will result in faster resp. slower playback - speed.
See Also

Reference