BASS.NET API for the Un4seen BASS Audio LibraryBassFxBASS_FX_BPM_BeatGetParameters Method (Int32, Object, Object, Object)BASS.NET API for the Un4seen BASS Audio Library
Gets the current beat parameter values.

Namespace: Un4seen.Bass.AddOn.Fx
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

[DllImportAttribute("bass_fx.dll", CharSet = CharSet.Unicode)]
public static bool BASS_FX_BPM_BeatGetParameters(
	int handle,
	Object bandwidth,
	Object centerfreq,
	Object beat_rtime
)

Parameters

handle
Type: SystemInt32
Stream/music/wma/cd/any other supported add-on format.
bandwidth
Type: SystemObject
Current bandwidth in Hz (=don't retrieve it).
centerfreq
Type: SystemObject
Current center-frequency of the band pass filter in Hz (=don't retrieve it).
beat_rtime
Type: SystemObject
Current beat release time in ms. (=don't retrieve it).

Return Value

Type: Boolean
If successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

Beat detection is using a Band Pass Filter. A band-pass filter is a device that passes frequencies within a certain range and rejects (attenuates) frequencies outside that range. So the bandwidth parameter defines the range around a center-frequency to include in the beat detection algo. The centerfreq parameter actually defines the center-frequency of the band pass filter. Once a beat is detected, the beat_rtime parameter defines the time in ms. in which no other beat will be detected after that just detected beat. The background is, that often you have kind-of 'double beats' in a drum set. So the beat_rtime should avoid, that a second (quickly repeated beat) beat is detected.

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not valid.

Examples

Get the current beat release time only:
VB
Dim beat_rtime As Object = 0F
If BassFx.BASS_FX_BPM_BeatGetParameters(stream, Nothing, Nothing, beat_rtime) Then
  ' beat_rtime must be casted back to a float
  Console.WriteLine("Release-Time={0}", CSng(beat_rtime))
End If
object beat_rtime = 0f;
if (BassFx.BASS_FX_BPM_BeatGetParameters(stream, null, null, beat_rtime))
{
  // beat_rtime must be casted back to a float
  Console.WriteLine("Release-Time={0}", (float)beat_rtime);
}
See Also

Reference