CN100478810C - Beat number detector - Google Patents
Beat number detector Download PDFInfo
- Publication number
- CN100478810C CN100478810C CNB02142473XA CN02142473A CN100478810C CN 100478810 C CN100478810 C CN 100478810C CN B02142473X A CNB02142473X A CN B02142473XA CN 02142473 A CN02142473 A CN 02142473A CN 100478810 C CN100478810 C CN 100478810C
- Authority
- CN
- China
- Prior art keywords
- bpm
- value
- detection device
- values
- output
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Measurement Of Mechanical Vibrations Or Ultrasonic Waves (AREA)
Abstract
Description
技术领域 technical field
本发明涉及一种检测乐曲中单位时间内的节拍数的装置。The invention relates to a device for detecting the number of beats per unit time in music.
背景技术 Background technique
每分钟节拍(BPM)检测器有各种各样的应用。BPM检测器是一种可以检测出一支乐曲中每分钟的节拍数的装置。Beats per minute (BPM) detectors have a variety of applications. A BPM detector is a device that detects the number of beats per minute in a piece of music.
在DJ(流行音乐播音员)的应用中,需要检测两种不同的音乐源的BPM值以将其进行比较,以便从一个音乐源无缝地过渡到另一个音乐源。在MIDI的应用中,BPM检测器可用于将MIDI音序器的速度与一个已有的音轨同步。在音乐数据库系统中,可根据BPM速度值对舞曲进行分类和检索。In the application of DJ (popular music announcer), it is necessary to detect the BPM values of two different music sources to compare them, so as to seamlessly transition from one music source to another. In MIDI applications, the BPM detector can be used to synchronize the tempo of a MIDI sequencer to an existing track. In the music database system, dance music can be classified and retrieved according to the BPM speed value.
检测一首乐曲的节拍数的常用方法是,首先从音频信号中选取一个节拍位置。在这样的系统中,使用者通过人工的操作在一个节拍的位置上输入数据。这就要求使用者边听音频信号,边完成敲击的动作,并且从音频信号开始至结束不能出现错误,因此要求使用者聚精会神,并能坚持到底。使用者被迫进行长时间的操作,其操作的时间由乐曲的长短决定。该系统总是要受到使用者操作的影响。A common way to detect the number of beats in a piece of music is to first pick a beat position from the audio signal. In such a system, the user manually inputs data at the position of a beat. This just requires the user to listen to the audio signal while completing the knocking action, and no mistakes can occur from the beginning to the end of the audio signal, so the user is required to concentrate and stick to the end. The user is forced to operate for a long time, and the operation time is determined by the length of the music. The system is always subject to user actions.
最近,在检测乐曲节拍数的装置和处理方法方面进行了大量的研究和开发。Recently, a great deal of research and development has been conducted on devices and processing methods for detecting the number of beats of a musical piece.
例如,美国第5614687号专利公开了一种检测节拍数的装置,在此作为参考。为了检测乐曲中的节拍数,这种已有的装置使用了可变的阈值。该可变阈值是在假定某一段时间间隔中无瞬变事件发生的情况下得到的。在此时间中,音频信号的最大值被检测出来,然后,将其与一个常数因子相乘,乘积的结果将作为阈值,在后面的时间间隔中,如果信号超过这一阈值就会被检测出来,这就表明产生了一个突发事件。两个相邻的突发事件之间的时间间隔就被测量出来。这一步骤在输入信号的三个不同频带中进行。For example, US Patent No. 5,614,687 discloses a device for detecting the number of beats, which is hereby incorporated by reference. In order to detect the number of beats in a musical piece, such known devices use a variable threshold. This variable threshold is obtained under the assumption that no transient events occur for a certain time interval. During this time, the maximum value of the audio signal is detected, and then it is multiplied by a constant factor, and the result of the product will be used as a threshold. In the following time interval, if the signal exceeds this threshold, it will be detected. , which indicates that an emergency has occurred. The time interval between two adjacent bursts is measured. This step is performed in three different frequency bands of the input signal.
这种已有的检测节拍数的装置存在的缺点就是:至少需要5至6拍来检测BPM值。The disadvantage of this existing device for detecting the number of beats is that at least 5 to 6 beats are needed to detect the BPM value.
发明内容 Contents of the invention
因此本发明的一个目的就是要提供一个只需3拍的检测时间即可高精度地检测乐曲节拍数的装置。It is therefore an object of the present invention to provide a device which can detect the number of beats of a musical piece with high precision in a detection time of only 3 beats.
目前的BPM检测器的实时操作通常是以自相关和可变阈值原理为基础的。The real-time operation of current BPM detectors is usually based on autocorrelation and variable threshold principles.
根据本发明的节拍检测装置,其特征包括:带通滤波器,用于从输入音频信号中选取特定频率;瞬变值检测装置,用于从带通滤波器的输出中检测瞬变值;定时器,用于确定积分器窗口(window)长度;周期检测装置,用于检查被测时间间隔和确定BPM平均值;以及显示逻辑装置,用于从上述周期检测装置中确定最可信的被测BPM值。According to the beat detection device of the present invention, it is characterized in that it comprises: a band-pass filter for selecting a specific frequency from an input audio signal; a transient value detection device for detecting a transient value from the output of the band-pass filter; a device for determining the length of the integrator window; period detection means for examining the measured time interval and determining the BPM average; and display logic means for determining the most plausible measured value from the above period detection means BPM value.
按照本发明,BPM检测器的检测精确度可高达±0.1BPM。According to the present invention, the detection accuracy of the BPM detector can be as high as ±0.1 BPM.
附图说明 Description of drawings
通过下面的详细说明及其所附各图,本发明的目的和特点将更加清楚。Objects and features of the present invention will become more clear through the following detailed description and accompanying drawings.
图1示出根据本发明的节拍检测装置;Fig. 1 shows a beat detection device according to the present invention;
图2为瞬变值检测器的结构框图;Fig. 2 is the structural block diagram of transient value detector;
图3示出按照本发明的窗口积分器;Figure 3 shows a window integrator according to the invention;
图4示出在延迟长度和恒定时间间隔之间的时间关系;Figure 4 shows the time relationship between delay length and constant time interval;
图5示出根据本发明的阈值电路;Figure 5 shows a threshold circuit according to the invention;
图6示出用于检测被测能量值的最大值的过程;Figure 6 shows a process for detecting the maximum value of the measured energy value;
图7示出对几个延迟器中被测能量值进行线性衰减的流程图;Fig. 7 shows the flow chart that the measured energy value in several retarders is linearly attenuated;
图8示出周期检测器的运行流程图;和Figure 8 shows a flow diagram of the operation of the cycle detector; and
图9示出显示逻辑单元的运行流程图。FIG. 9 shows a flow chart showing the operation of the logic unit.
具体实施方式 Detailed ways
以下将根据附图对本发明的一个具体实施例进行详细的说明。A specific embodiment of the present invention will be described in detail below according to the accompanying drawings.
图1示出根据本发明的节拍检测装置。FIG. 1 shows a tempo detection device according to the present invention.
在该BPM检测装置中,模拟音频信号首先被输入到A/D转换器1中。这样,通过A/D转换器1,输入的模拟音频信号就被转化为数字音频信号。被转化的数字音频信号作为每个BPM检测器101,102,...,10n的输入。In this BPM detection device, an analog audio signal is first input into the A/
图1示出BPM检测器101的所有元件。因为所有的BPM检测器101,102,...,10n之间的差别仅在于其各自的带通滤波器的参数不同,因此仅详细示出BPM检测器101。FIG. 1 shows all elements of the
从图1中可以看出,BPM检测器101包含一个带通滤波器2,一个瞬变值检测器3,一个计时器4和一个周期检测器5。带通滤波器2与A/D转换器1相连,接收输入的数字音频信号。带通滤波器2被设计为一个带宽非常小的滤波器(高Q)。带通滤波器2的中心频率是一个特定的频率,如80Hz。对于不同的BPM检测器101,102,...,10n,每一个BP滤波器仅被设定到一个中心频率。不同的BPM检测器中的每一个BP滤波器被设定到的不同中心频率最好是在可听得见的声音的频谱中的非常高的频率和低的频率的范围之内,典型地用于监测节奏乐器,如踩钹和低音鼓。It can be seen from FIG. 1 that the
带通滤波器2的输出端与瞬变值检测器3相连。从带通滤波器2中得到的经滤波的数字信号被输入到瞬变值检测器3并被瞬变值检测器3分析。The output of the
图2为瞬变值检测器的结构框图。Figure 2 is a block diagram of the transient value detector.
从图2可以看出,瞬变值检测器3包含窗口积分器201,阈值电路202,开关203,计时器205和本地最大值检测器204。窗口积分器201接收从带通滤波器2得到的经滤波的数字信号。下面将参照图3对该数字信号的详细处理过程进行说明。It can be seen from FIG. 2 that the
图3示出按照本发明的窗口积分器。Figure 3 shows a windowed integrator according to the invention.
积分器201包含一个乘法器301,其用于接收从带通滤波器2输出的输入数字信号。从图3中可以看出,从带通滤波器2中输出的数字信号首先在乘法器301中进行自乘。乘法器301的输出端与延迟器302和加法器304相连。乘法器301的输出首先送给延迟器302并被延迟一个tw长度。tw长度就是窗口积分器的长度。延迟器302的输出端与乘法器303相连。The
这样,延迟器302输出的被延迟了的数字信号被乘以“-1”,乘法器303的输出端与加法器304相连。从图3可以看出,乘法器303的输出信号与延迟器302的输入信号通过加法器304相加,加法器304中相加的结果随后送到延迟元件305的输入端。In this way, the delayed digital signal output by the
延迟元件305的输出端分别与加法器304的输入端、常数乘法器306和阈值电路202相连。这样,延迟器302的输出在被乘以“-1”后与延迟器302的输入和延迟元件305的输出相加,得到一个宽度为tw的,用于测量一个频段中的平均能量值的矩形积分窗口。The output terminals of the
然后,延迟元件305的输出与常数因子“C”相乘,也就是说,被测量的能量值可以由常数因子“C”来调整。常数乘法器306的输出端与开关203相连。这样,常数乘法器306的输出被传送到开关203。在本实施例中,开关203是一个门电路。但本发明并不限于此。Then, the output of the
定时器4控制开关203,使之在一个ts的时间间隔中闭合一次。由常数因子“C”来调整的被测能量值在ts的恒定时间段中输出。当门电路闭合时,被测能量值被传送到本地最大值检测器204。
定时器4还与计时器205相连。每隔ts定时器4不断地增加计时器205的值,该值将在本地最大值检测器204中被使用。
图4示出在延迟长度和恒定时间间隔之间的时间关系。FIG. 4 shows the time relationship between the delay length and the constant time interval.
从乘法器301中输出的数字信号由延迟器302延迟了时间长度tw。定时器4产生恒定时间段ts。为了使积分窗之间产生如图4所示的交迭,需要将恒定时间段ts选择得比延迟长度tw短。例如,在本实施例中,恒定时间ts=0.5*延迟时间长度tw。The digital signal output from the
图5示出根据本发明的阈值电路。Figure 5 shows a threshold circuit according to the invention.
为了监控频带中的平均能量水平,使用了标准峰值保持电路来产生信号阈值。该阈值电路202包括比较器501,延迟器502,常数乘法器503,延迟器504和常数乘法器505。从图5中可以看出延迟器504的输出与常数因子CRel相乘,再被输入到比较器501中。在比较器501中,从延迟器504中输出后再乘以常数因子CRel的能量值与从窗口积分器201中得到的被测能量值进行比较。其中较大的值送入上述延迟器504中,同时该值被延迟器502延迟5*ts时间长度。通过常数乘法器503,延迟器502的输出与常数因子C相乘并被传送到本地最大值检测器204。To monitor the average energy level in the frequency band, a standard peak-and-hold circuit is used to generate a signal threshold. The
图5示出比较器501的输出被延迟了5*ts后,其值又乘以小于1.0的常数因子C。但延迟的时间长度并不限于上述时间长度。只要不超出本发明的范围,这个时间长度是可以被修改的。FIG. 5 shows that after the output of the
图6示出用于检测被测能量值的最大值的过程。Fig. 6 shows a procedure for detecting the maximum value of the measured energy value.
参照图6,窗口积分器201的被分成不同时间段的输出送入一个延迟线601中。延迟线601包含10个延迟器611,612,...,620。第5个延迟器615输出的能量值被称作X(n)。前5个和后5个被测能量值被称作X(n-5),X(n-4),X(n-3),X(n-2),X(n-1),X(n+1),X(n+2),X(n+3),X(n+4)和X(n+5)。假设X(n)为本地的最大能量值。Referring to FIG. 6 , the output of the
参照图6,在步骤S61中,检查被测能量值X(n)在11个能量值X(n-5),X(n-4),...,X(n+5)中是否为最大值。如果经检查被测能量值X(n)在这11个能量值中为最大值,则流程进入步骤S62。但是,如果经检查从延迟器615中输出的能量值X(n)并非这11个能量值中的最大值,流程在步骤S61结束。Referring to Fig. 6, in step S61, check whether the measured energy value X(n) is among 11 energy values X(n-5), X(n-4), ..., X(n+5) maximum value. If it is checked that the measured energy value X(n) is the maximum value among the 11 energy values, the process goes to step S62. However, if it is checked that the energy value X(n) output from the
在步骤S62中,检查能量值X(n)是否超过了阈值电路输出的阈值。为了避免在没有音频信号存在的情况下进行BPM检测,也要检查能量值X(n)是否低于规定的最小能量标准MinLevel。如果能量值X(n)比阈值大且比规定的最小能量值MinLevel大,则流程进入步骤S63。否则,流程在S62结束。In step S62, it is checked whether the energy value X(n) exceeds the threshold output by the threshold circuit. In order to avoid BPM detection when no audio signal exists, it is also checked whether the energy value X(n) is lower than the specified minimum energy standard MinLevel. If the energy value X(n) is greater than the threshold value and greater than the prescribed minimum energy value MinLevel, the flow goes to step S63. Otherwise, the process ends at S62.
在步骤S63中,能量值X(n)前面的两个和后面的两个被测能量值同样需要满足两个条件:In step S63, the two measured energy values before and after the energy value X(n) also need to meet two conditions:
X(n-2)<X(n-1)&X(n+1)>X(n+2) (1)X(n-2)<X(n-1)&X(n+1)>X(n+2) (1)
其中X(n-2)是延迟器613的输出的能量值,X(n-1)是延迟器614输出的能量值,其中X(n+1)是延迟器616输出的能量值,其中X(n+2)是延迟器617输出的能量值。Wherein X(n-2) is the energy value of the output of
在步骤S63中,检查能量值X(n-1)是否超过能量值X(n-2),并且能量值X(n+1)是否超过能量值X(n+2)。如果在步骤S63中经检查满足公式(1)定义的条件,则流程进入步骤S64。否则,流程在步骤S63结束。In step S63, it is checked whether the energy value X(n-1) exceeds the energy value X(n-2), and whether the energy value X(n+1) exceeds the energy value X(n+2). If it is checked in step S63 that the condition defined by formula (1) is satisfied, the flow goes to step S64. Otherwise, the process ends in step S63.
本系统是为可能的最大值为158BPM的BPM值的测量而设计的。但是考虑到音乐信号中的某些打击乐器可能产生相当于实际的BPM值2倍或4倍的瞬变值,被检测的两个瞬变事件之间的最小时间间隔应不少于90ms。This system is designed for the measurement of the possible maximum BPM value of 158BPM. However, considering that some percussion instruments in the music signal may produce a transient value equivalent to 2 times or 4 times the actual BPM value, the minimum time interval between the two detected transient events should not be less than 90ms.
因此,我们假定本发明的最小时间间隔tmin=90ms。Therefore, we assume the minimum time interval tmin=90ms of the present invention.
在步骤S64中,计时器205的值与最小时间值tmin相比较。如果经检查,计时器205的值比最小时间值tmin小,则流程在步骤S64结束。这样,从前面被检测出的瞬变值中得到的于tmin时间段中产生的所有本地最大值被忽略不计。但是,如果经检查计时器205的值比最小时间值tmin大,则流程进入步骤S65。In step S64, the value of the
在步骤S65中,对第3,第4,第6,第7个延迟器613,614,616,617输出的能量值进行线性衰减处理。时间值Δt可以由该线性衰减处理去确定。该线性衰减的详细处理过程参考图7进行说明。然后,流程进入步骤S66。In step S65, the energy values output by the 3rd, 4th, 6th and
在步骤S66中,被计算出的时间值Δt与计时器205的值相加。这样,被测时间段tp与计时器的值和被计算出的时间值Δt之和相等。之后,被测的计时器205的时间值被传送到周期检测器5。然后,计时器205被重新初始化为Δt。In step S66 , the calculated time value Δt is added to the value of the
因为仅在长度为ts的时间段中检测本地最大值的存在,很明显,本地最大值位置的精度仅能被确定为±0.5*ts(因为计时器在各个步骤中随ts而增加)。为得到本地最大值更为精确的位置,使用延迟器615的前两个和后两个被测能量值来计算一个四点线性衰减。Since the presence of the local maximum is detected only in a time period of length ts, it is clear that the local maximum position can only be determined with an accuracy of ±0.5*ts (because the timer is incremented with ts in each step). To get a more precise location of the local maximum, a four-point linear decay is calculated using the first two and last two measured energy values of
图7示出对几个延迟器中被测能量值进行线性衰减的流程图。Fig. 7 shows a flow chart for linear attenuation of measured energy values in several retarders.
参照图7,X轴表示时间,Y轴表示能量值。从图7可以看出,两个被测值X(n-2)和X(n-1)与两个被测值X(n+1)和X(n+2)都是通过直线相连的。这样,这两条直线的交点就表示本地最大值的确切位置:Referring to FIG. 7, the X-axis represents time, and the Y-axis represents energy values. It can be seen from Figure 7 that the two measured values X(n-2) and X(n-1) and the two measured values X(n+1) and X(n+2) are connected by a straight line . Thus, the intersection of these two lines indicates the exact location of the local maximum:
Δt=[5*X(n+1)-4*X(n+2)+X(n-1)-2*X(n-2)]/[X(n-1)-X(n-2)-X(n+2)+X(n+1)] (2)Δt=[5*X(n+1)-4*X(n+2)+X(n-1)-2*X(n-2)]/[X(n-1)-X(n- 2)-X(n+2)+X(n+1)] (2)
图8示出周期检测器的运行流程图。Fig. 8 shows a flowchart of the operation of the cycle detector.
参照图8,流程开始于步骤S801。首先,在步骤S801中,利用如下公式被测时间间隔tp先转化为一个BPM值:Referring to FIG. 8, the process starts at step S801. First, in step S801, the measured time interval tp is first converted into a BPM value using the following formula:
BPMnew=60/tp (3)BPMnew=60/tp (3)
其中BPMnew为一个新确定的BPM值,tp是从本地最大值检测器中输出的被测时间间隔。Where BPMnew is a newly determined BPM value, and tp is the measured time interval output from the local maximum detector.
假定被测时间间隔可以从一个节拍中得到,该节拍为被检测的乐曲的实际BPM值的1/2,1/4或2倍。鉴于BPM检测器仅被用于在60到158BPM的范围内确定BPM的值,因此假定低于或高于该范围的BPM值很可能是实际的BPM值的倍数。基于这个原因,为了使BPMnew的值落入理想的范围,根据BPMnew值,新确定的BPM值BPMnew乘以因子2,4,或0.5。It is assumed that the time interval to be measured can be obtained from a beat which is 1/2, 1/4 or 2 times the actual BPM value of the music piece to be detected. Given that the BPM detector is only used to determine BPM values within the range of 60 to 158 BPM, it is assumed that BPM values below or above this range are likely to be multiples of the actual BPM value. For this reason, in order to make the value of BPMnew fall within a desired range, the newly determined BPM value BPMnew is multiplied by a factor of 2, 4, or 0.5 according to the BPMnew value.
之后,流程进入步骤S802。在步骤S802中,检查新确定的BPM值BPMnew是否低于60BPM。如果它低于60BPM,则流程进入步骤S803,否则流程进入步骤S804。After that, the flow goes to step S802. In step S802, it is checked whether the newly determined BPM value BPMnew is lower than 60 BPM. If it is lower than 60 BPM, the flow goes to step S803, otherwise the flow goes to step S804.
在步骤S803中,利用如下公式,新确定的BPM值被加倍:In step S803, the newly determined BPM value is doubled using the following formula:
BPMnew=2*BPMnew (4)BPMnew=2*BPMnew (4)
然后,流程进入步骤S804。在步骤S804中,再次检查新确定的BPM值BPMnew是否低于60BPM。如果它低于60BPM,流程进入步骤S805,否则,流程进入步骤S806。Then, the flow goes to step S804. In step S804, it is checked again whether the newly determined BPM value BPMnew is lower than 60 BPM. If it is lower than 60 BPM, the flow goes to step S805, otherwise, the flow goes to step S806.
在步骤S805中,利用公式(4)新确定的BPM值BPMnew被加倍。然后,流程进入步骤S806。In step S805, the newly determined BPM value BPMnew using formula (4) is doubled. Then, the flow goes to step S806.
在步骤S806中,检查新确定的BPM值BPMnew是否大于158BPM。如果它大于158BPM,则流程进入步骤S807,否则,流程进入步骤S808。In step S806, it is checked whether the newly determined BPM value BPMnew is greater than 158 BPM. If it is greater than 158BPM, the flow goes to step S807, otherwise, the flow goes to step S808.
在步骤S807中,利用如下公式,新确定的BPM值BPMnew被减半:In step S807, the newly determined BPM value BPMnew is halved by using the following formula:
BPMnew=0.5*BPMnew (5)BPMnew=0.5*BPMnew (5)
然后,流程进入步骤S808。在步骤S808中,利用如下公式,可以得到前面所测BPM值的平均值BPMavr:Then, the flow goes to step S808. In step S808, the average value BPMavr of the previously measured BPM values can be obtained by using the following formula:
BPMavr=SUM/NUMBER (6)BPMavr=SUM/NUMBER (6)
其中BPMavr为前面所测BPM值的平均值;SUM为前面BPM值之和;NUMBER为累加的BPM值的个数。Among them, BPMavr is the average value of the previously measured BPM values; SUM is the sum of the previous BPM values; NUMBER is the number of accumulated BPM values.
之后,流程进入步骤S809。在步骤S809中,新检测得到的BPM值BPMnew与前面所测的BPM值的平均值BPMavr进行比较并确定这两个值之差的绝对值是否小于当前值ΔBPMmax。After that, the flow goes to step S809. In step S809, the newly detected BPM value BPMnew is compared with the average BPMavr of the previously measured BPM values and it is determined whether the absolute value of the difference between the two values is smaller than the current value ΔBPMmax.
如果新检测得到的BPM值BPMnew与前面所测的BPM值的平均值BPMavr之差的绝对值大于ΔBPMmax的当前值,则认为新的检测是失败的。失败标记FAIL被置为1。If the absolute value of the difference between the newly detected BPM value BPMnew and the average BPMavr of the previously measured BPM values is greater than the current value of ΔBPMmax, the new detection is considered to be a failure. The failure flag FAIL is set to 1.
如果差的绝对值在当前值ΔBPMmax的范围之内,则流程进入步骤S813。否则流程进入步骤S810。If the absolute value of the difference is within the range of the current value ΔBPMmax, the flow proceeds to step S813. Otherwise, the process goes to step S810.
在步骤S813中,新检测得到的BPM值BPMnew与前面的BPM值之和相加。并且,累加的BPM值的个数增加1。然后流程进入步骤S814。In step S813, the newly detected BPM value BPMnew is added to the sum of the previous BPM values. And, the number of accumulated BPM values increases by 1. Then the flow goes to step S814.
在步骤S810中,检查失败标记FAIL是否小于值“2”。如果失败标记FAIL小于“2”,则流程进入步骤S812.在步骤S812中,失败标记FAIL被增加1并且流程在步骤S812结束。否则,如果在步骤S810中经检查失败标记FAIL不小于2,则流程进入步骤S811。在步骤S811中,前面BPM值之和SUM和累加的BPM值的个数NUMBER都被初始化为“0”。然后流程在步骤S811结束。In step S810, it is checked whether the failure flag FAIL is smaller than the value "2". If the failure flag FAIL is less than "2", the flow proceeds to step S812. In step S812, the failure flag FAIL is incremented by 1 and the flow ends in step S812. Otherwise, if the failed flag FAIL is not less than 2 after checking in step S810, then the flow goes to step S811. In step S811, both the sum of the previous BPM values SUM and the number of accumulated BPM values NUMBER are initialized to "0". Then the flow ends in step S811.
再返回步骤S814,检查累加的BPM值的个数NUMBER是否大于或等于“3”。如果它小于3,则流程在步骤S814结束。否则,流程进入步骤S815并且失败标记FAIL被重新置为“0”。然后流程进入步骤S816。Returning to step S814, it is checked whether the number NUMBER of the accumulated BPM values is greater than or equal to "3". If it is less than 3, the flow ends at step S814. Otherwise, the flow goes to step S815 and the failure flag FAIL is reset to "0". Then the flow goes to step S816.
在步骤S816中,利用公式6重新计算前面所测的BPM值的平均值BPMavr。最后,前面所测的BPM值的平均值BPMavr和累加的BPM值的个数NUMBER都被传送到显示逻辑单元6。In step S816,
图9示出显示逻辑单元的运行流程图。FIG. 9 shows a flow chart showing the operation of the logic unit.
参照图1和9,显示逻辑单元6首先从每个BPM检测器101,102,...,10n的周期检测器中接收前面所测的BPM值的平均值BPMavr和累加的BPM值的个数NUMBER。1 and 9, the
在步骤S901中,变量“i”被用作循环指示变量并被首先初始化为“2”。另外,变量ibest被初始化为“1”。In step S901, a variable "i" is used as a loop indicator variable and is first initialized to "2". Also, the variable ibest is initialized to "1".
假定所有BPM检测器101,102,...,10n中的前面所测的BPM值的平均值BPMavr和累加的BPM值的个数NUMBER被存储在数组变量BPMavr(i)和NUMBER(i)中。这就意味着BPM检测器101中的被测BPM值的平均值BPMavr存储在BPMavr(1)中并且累加的BPM值的个数存储在NUMBER(1)中。BPM检测器102中的被测BPM值的平均值BPMavr存储在BPMavr(2)中等等。Assume that the average value BPMavr of the BPM values measured in front of all
为了确定当前哪一个BPM检测器存储着最大值NUMBER,使用一个循环来得到最大值NUMBER的指示。To determine which BPM detector currently stores the maximum NUMBER, a loop is used to get an indication of the maximum NUMBER.
在步骤S902中,比较变量NUMBER(i)和NUMBER(ibest)中的内容。只有当值NUMBER(i)比值NUMBER(ibest)大时,循环指示变量“i”中的内容才被存储到ibest中。下面,循环变量“i”被增加“1”。然后流程进入步骤S903。在步骤S903中,检查“i”是否等于或大于“n”,其中“n”为BPM检测器的个数加1。如果“i”比“n”小,则流程返回步骤S902。否则,流程进入步骤S904。In step S902, the contents of variables NUMBER(i) and NUMBER(ibest) are compared. Only when the value NUMBER(i) is greater than the value NUMBER(ibest), the content of the loop indicator variable "i" is stored in ibest. Next, the loop variable "i" is incremented by "1". Then the flow goes to step S903. In step S903, it is checked whether "i" is equal to or greater than "n", where "n" is the number of BPM detectors plus 1. If "i" is smaller than "n", the process returns to step S902. Otherwise, the process goes to step S904.
在步骤S904中,检查存储最大的NUMBER值的BPM检测器中的NUMBER(ibest)的值是否等于或大于“3”。如果它小于3,则流程在步骤S904结束。但是,如果它等于或大于3,流程进入步骤S905。然后,已确定的BPM值BPMavr(ibest)输出到显示单元7。这样,一支乐曲的节拍数就被准确地检测出来了。In step S904, it is checked whether the value of NUMBER(ibest) in the BPM detector storing the largest NUMBER value is equal to or greater than "3". If it is less than 3, the flow ends in step S904. However, if it is equal to or greater than 3, the flow advances to step S905. Then, the determined BPM value BPMavr(ibest) is output to the
上面说明的实施例是专门适用于检测一支乐曲的节拍数的。鉴于这种装置主要应用于“DJ设备”,BPM检测器被设计为速度范围在60到158BPM之间。但是,本发明并不限于此,对于其它检测方法它也是适用的,例如检测其它音频信号节拍数的方法。The above-described embodiment is specially adapted to detect the number of beats of a piece of music. Given that this device is mainly used in "DJ equipment", the BPM detector is designed to have a tempo range between 60 and 158BPM. However, the present invention is not limited thereto, and it is also applicable to other detection methods, such as methods for detecting beat numbers of other audio signals.
不脱离本发明的范围和构思可以作出许多其它改变和改型。应当理解,本发明不限于特定的实施例,本发明的范围由所附权利要求限定。Many other changes and modifications can be made without departing from the scope and spirit of the invention. It should be understood that the invention is not limited to the particular embodiments, but that the scope of the invention is defined by the appended claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB02142473XA CN100478810C (en) | 2002-09-20 | 2002-09-20 | Beat number detector |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB02142473XA CN100478810C (en) | 2002-09-20 | 2002-09-20 | Beat number detector |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1484116A CN1484116A (en) | 2004-03-24 |
CN100478810C true CN100478810C (en) | 2009-04-15 |
Family
ID=34148064
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB02142473XA Expired - Fee Related CN100478810C (en) | 2002-09-20 | 2002-09-20 | Beat number detector |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100478810C (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1684263B1 (en) * | 2005-01-21 | 2010-05-05 | Unlimited Media GmbH | Method of generating a footprint for an audio signal |
US7330803B2 (en) * | 2005-06-22 | 2008-02-12 | Ametek, Inc. | High resolution time interval measurement apparatus and method |
CN104299621B (en) * | 2014-10-08 | 2017-09-22 | 北京音之邦文化科技有限公司 | The timing intensity acquisition methods and device of a kind of audio file |
CN107103917B (en) * | 2017-03-17 | 2020-05-05 | 福建星网视易信息系统有限公司 | Music rhythm detection method and system |
CN113011549A (en) * | 2021-02-20 | 2021-06-22 | 重庆博奥新景医学科技有限公司 | Self-adaptive measurement and calculation method applied to luminescence value of chemiluminescence analyzer |
-
2002
- 2002-09-20 CN CNB02142473XA patent/CN100478810C/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN1484116A (en) | 2004-03-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6812394B2 (en) | Method and device for determining rhythm units in a musical piece | |
US10497348B2 (en) | Evaluation device and evaluation method | |
US20110067555A1 (en) | Tempo detecting device and tempo detecting program | |
EP0146640B1 (en) | Period detection circuit | |
US11749240B2 (en) | Beat timing generation device and method thereof | |
CN100478810C (en) | Beat number detector | |
CN109584902B (en) | Music rhythm determining method, device, equipment and storage medium | |
JP3373315B2 (en) | Beat detection device | |
US6940931B2 (en) | Clock-synchronism evaluating apparatus and method | |
JP4214606B2 (en) | Tempo calculation method and tempo calculation device | |
JP2001311754A (en) | Time measuring device | |
JP2017203931A (en) | Acoustic property measurement device and acoustic property measurement method | |
EP3346468B1 (en) | Musical-piece analysis device, musical-piece analysis method, and musical-piece analysis program | |
JPS6370294A (en) | Tempo display device | |
JP3919359B2 (en) | Device for detecting the attack position of a musical sound signal | |
KR0132493B1 (en) | Score calculating device of karaoke | |
KR870003461A (en) | Piano tuning method and device | |
JPH021566A (en) | Cycle measuring instrument | |
Bhatta et al. | Laya Estimation for Hindustani Classical Vocals, Devoid of Rhythmic Indicators | |
RU2003985C1 (en) | Device for measuring frequency instability | |
JP3092197B2 (en) | Pitch extraction device | |
JP2000267654A5 (en) | Tempo calculation method and tempo calculation device | |
SU546901A1 (en) | Delay device | |
JPWO2017037919A1 (en) | Music analysis apparatus, music analysis method, and music analysis program | |
JPS6370293A (en) | Tempo display device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
ASS | Succession or assignment of patent right |
Owner name: MUSIC GROUP IP LTD. Free format text: FORMER OWNER: HONGXIN LTD. Effective date: 20121113 |
|
C41 | Transfer of patent application or patent right or utility model | ||
TR01 | Transfer of patent right |
Effective date of registration: 20121113 Address after: The British Virgin Islands of Tortola Patentee after: MUSIC GROUP INTELLECTUAL PROPERTY CO., LTD. Address before: The British Virgin Islands of Tortola Patentee before: Red Core Co., Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090415 Termination date: 20160920 |