This application was originally filed as PCT Application No. PCT/IB2012/053329 filed Jun. 29, 2012.
This invention relates to audio signal analysis and particularly to music meter analysis.
In music terminology, the music meter comprises the recurring pattern of stresses or accents in the music. The musical meter can be described as comprising a measure pulse, a beat pulse and a tatum pulse, respectively referring to the longest to shortest in terms of pulse duration.
Beat pulses provide the basic unit of time in music, and the rate of beat pulses (the tempo) is considered the rate at which most people would tap their foot on the floor when listening to a piece of music. Identifying the occurrence of beat pulses in a piece of music, or beat tracking as it is known, is desirable in a number of practical applications. Such applications include music recommendation applications in which music similar to a reference track is searched for, in Disk Jockey (DJ) applications where, for example, seamless beat-mixed transitions between songs in a playlist is required, and in automatic looping techniques.
Beat tracking systems and methods generate a beat sequence, comprising the temporal position of beats in a piece of music or part thereof.
The following terms are useful for understanding certain concepts to be described later.
Pitch: the physiological correlate of the fundamental frequency (f0) of a note.
Chroma, also known as pitch class: musical pitches separated by an integer number of octaves belong to a common pitch class. In Western music, twelve pitch classes are used.
Beat or tactus: the basic unit of time in music, it can be considered the rate at which most people would tap their foot on the floor when listening to a piece of music. The word is also used to denote part of the music belonging to a single beat.
Tempo: the rate of the beat or tactus pulse, usually represented in units of beats per minute (BPM).
Bar or measure: a segment of time defined as a given number of beats of given duration. For example, in a music with a 4/4 time signature, each measure comprises four beats.
Accent or Accent-based audio analysis: analysis of an audio signal to detect events and/or changes in music, including but not limited to the beginning of all discrete sound events, especially the onset of long pitched sounds, sudden changes in loudness of timbre, and harmonic changes. Further detail is given below.
It is believed that humans perceive musical meter by inferring a regular pattern of pulses from accents, which are stressed moments in music. Different events in music cause accents. Examples include changes in loudness or timbre, harmonic changes, and in general the beginnings of all sound events. In particular, the onsets of long pitched sounds cause accents. Automatic tempo, beat, or downbeat estimators may try to imitate the human perception of music meter to some extent. This may involve the steps of measuring musical accentuation, performing period estimation of one or more pulses, finding the phases of the estimated pulses, and choosing the metrical level corresponding to the tempo or some other metrical level of interest. Since accents relate to events in music, accent based audio analysis refers to the detection of events and/or changes in music. Such changes may relate to changes in the loudness, spectrum and/or pitch content of the signal. As an example, accent based analysis may relate to detecting spectral change from the signal, calculating a novelty or an onset detection function from the signal, detecting discrete onsets from the signal, or detecting changes in pitch and/or harmonic content of the signal, for example, using chroma features. When performing the spectral change detection, various transforms or filter bank decompositions may be used, such as the Fast Fourier Transform or multi rate filter banks, or even fundamental frequency f0 or pitch salience estimators. As a simple example, accent detection might be performed by calculating the short-time energy of the signal over a set of frequency bands in short frames over the signal, and then calculating the difference, such as the Euclidean distance, between every two adjacent frames. To increase the robustness for various music types, many different accent signal analysis methods have been developed.
The system and method to be described hereafter draws on background knowledge described in the following publications which are incorporated herein by reference.
A first aspect of the invention provides apparatus comprising:
The apparatus provides a robust and computationally straightforward system and method for identifying the position of beats in a music signal. In particular, the apparatus provides a robust and accurate way of beat tracking over a range of musical styles, ranging from electronic music to classical and rock music. Electronic dance music in particular is processed more accurately.
The first accent signal module may be configured to generate the first accent signal (a1) by means of extracting chroma accent features based on fundamental frequency (f0) salience analysis.
The apparatus may further comprise a tempo estimator configured to generate using the first accent signal (a1) the estimated tempo (BPMest) of the audio signal.
The first beat tracking module may be configured to estimate the first beat time sequence using the first accent signal (a1) and the estimated tempo (BPMest).
The second accent signal module may configured to generate the second accent signal (a2) using a predetermined sub-band of the audio signal's bandwidth. The predetermined sub-band may be below 200 Hz.
The second accent signal module may be configured to generate the second accent signal (a2) by means of performing a multi-rate filter bank decomposition of the audio signal and generating the accent signal using the output from a predetermined one of the filters.
The apparatus may further comprise means for obtaining an integer representation of the estimated tempo (BPMest) and wherein the second beat tracking module may be configured to generate the second beat time sequence (b2) using the second accent signal (a2) and the integer representation.
The integer representation of the estimated tempo (BPMest) may be calculated using either a rounded tempo estimate function (round(BPMest)), a ceiling tempo estimate function (ceil(BPMest)) or a floor tempo estimate function (floor(BPMest)).
The apparatus may further comprise means for performing a ceiling and floor function on the estimated tempo (BPMest) to generate respectively a ceiling tempo estimate (ceil(BPMest) and a floor tempo estimate (floor(BPMest)), wherein the second beat tracking module may be configured to generate the second and a third beat time sequence (b2) (b3) using the second accent signal (a2) and different ones of the ceiling and floor tempo estimates, and wherein the sequence selector may be configured to identify which one of the first, second and third beat time sequences corresponds most closely with peaks in one or both of the accent signal(s).
The second beat tracking module may be configured, for each of the ceiling and floor tempo estimates, to generate an initial beat time sequence (bt) using said estimate, to compare it with a reference beat time sequence (bi) and to generate using a predetermined similarity algorithm the second and third beat time sequences.
The predetermined similarity algorithm used by the second beat tracking module may comprise comparing the initial beat time sequence (bt) and the reference beat time sequence (bi) over a range of offset positions to identify a best match within the range, the generated second/third beat time sequence comprising the offset version of the reference beat time sequence (bi) which resulted in the best match.
The reference beat time sequence (bi) may have a constant beat interval. The reference beat time sequence (bi) may be generated as t=0, 1/(X/60), 2/(X/60) . . . n/(Xt/60) where X is the integer estimate representation of the estimated tempo and n is an integer.
The range of offset positions used in the algorithm may be between 0 and 1.1/(X/60) where X is the integer estimate representation of the estimated tempo. The offset positions used for comparison in the algorithm may have steps of 0.1/(BPMest/60).
The sequence selector may be configured to identify which one of the beat time sequences corresponds most closely with peaks in the second accent signal.
The sequence selector may be configured, for each of the beat time sequences, to calculate a summary statistic or value that is dependent on the values of the or each accent signal occurring at or around beat times in the sequence, and to select the beat time sequence which results in the greatest summary statistic or value.
The sequence selector may be configured, for each of the beat time sequences, to calculate the average or mean value of the or each accent signal occurring at or around beat times in the sequence, and to select the beat time sequence which results in the greatest mean value.
Further, there may be provided an apparatus according to any of the above definitions, comprising: means for receiving a plurality of video clips, each having a respective audio signal having common content; and a video editing module for identifying possible editing points for the video clips using the beats in the selected beat sequence. The video editing module may be further configured to join a plurality of video clips at one or more editing points to generate a joined video clip.
A second aspect of the invention provides a method comprising: generating a first accent signal (a1) representing musical accents in an audio signal; generating a second, different, accent signal (a2) representing musical accents in the audio signal; estimating a first beat time sequence (b1) from the first accent signal; estimating a second beat time sequence (b2) from the second accent signal; and identifying which one of the first and second beat time sequences (b1) (b2) corresponds most closely with peaks in one or both of the accent signal(s).
The first accent signal (a1) may be generated by means of extracting chroma accent features based on fundamental frequency (f0) salience analysis.
The method may further comprise generating using the first accent signal (a1) the estimated tempo (BPMest) of the audio signal.
The first beat time sequence may be generated using the first accent signal (a1) and the estimated tempo (BPMest).
The second accent signal (a2) may be generated using a predetermined sub-band of the audio signal's bandwidth.
The second accent signal (a2) may be generated using a predetermined sub-band below 200 Hz.
The second accent signal (a2) may be generated by means of performing a multi-rate filter bank decomposition of the audio signal and using the output from a predetermined one of the filters.
The method may further comprise obtaining an integer representation of the estimated tempo (BPMest) and generating the second beat time sequence (b2) using the second accent signal (a2) and said integer representation.
The integer representation of the estimated tempo (BPMest) may be calculated using either a rounded tempo estimate function (round(BPMest)), a ceiling tempo estimate function (ceil(BPMest)) or a floor tempo estimate function (floor(BPMest)).
The method may further comprise performing a ceiling and floor function on the estimated tempo (BPMest) to generate respectively a ceiling tempo estimate (ceil(BPMest) and a floor tempo estimate (floor(BPMest)), generating the second and a third beat time sequence (b2) (b3) using the second accent signal (a2) and different ones of the ceiling and floor tempo estimates, and identifying which one of the first, second and third beat time sequences corresponds most closely with peaks in one or both of the accent signal(s). For each of the ceiling and floor tempo estimates, an initial beat time sequence (bt) may be generated using said estimate, said initial beat time sequence then being compared with a reference beat time sequence (bi) for generating the second and third beat time sequences using a predetermined similarity algorithm.
The comparison step using the predetermined similarity algorithm may comprise comparing the initial beat time sequence (bt) and the reference beat time sequence (bi) over a range of offset positions to identify a best match within the range, the generated second/third beat time sequence comprising the offset version of the reference beat time sequence (bi) which resulted in the best match.
The reference beat time sequence (bi) may have a constant beat interval.
The reference beat time sequence (bi) may be generated as t=0, 1/(X/60), 2/(X/60) . . . n/(X/60) where X is the integer estimate representation of the estimated tempo and n is an integer.
The range of offset positions used in the algorithm may be between 0 and 1.1/(X/60) where X is the integer estimate representation of the estimated tempo. The offset positions used for comparison in the algorithm may have steps of 0.1/(BPMest/60).
The identifying step may comprise identifying which one of the beat time sequences corresponds most closely with peaks in the second accent signal.
The identifying step may comprise calculating, for each of the beat time sequences, a summary statistic or value that is dependent on the values of the or each accent signal occurring at or around beat times in the sequence, and selecting the beat time sequence which results in the greatest summary statistic or value.
The identifying step may comprise calculating, for each of the beat time sequences, the average or mean value of the or each accent signal occurring at or around beat times in the sequence, and selecting the beat time sequence which results in the greatest mean value.
There may also be provided a method which uses the beat identifying method defined above, the method comprising: receiving a plurality of video clips, each having a respective audio signal having common content; and identifying possible editing points for the video clips using the beats in the selected beat sequence. This method may further comprise joining a plurality of video clips at one or more editing points to generate a joined video clip.
A third aspect of the invention provides a computer program comprising instructions that when executed by a computer apparatus control it to perform the method according to any of the above definitions.
A fourth aspect of the invention provides a non-transitory computer-readable storage medium having stored thereon computer-readable code, which, when executed by computing apparatus, causes the computing apparatus to perform a method comprising: generating a first accent signal (a1) representing musical accents in an audio signal; generating a second, different, accent signal (a2) representing musical accents in the audio signal; estimating a first beat time sequence (b1) from the first accent signal; estimating a second beat time sequence (b2) from the second accent signal; and identifying which one of the first and second beat time sequences (b1) (b2) corresponds most closely with peaks in one or both of the accent signal(s).
A fifth aspect of the invention provides an apparatus, the apparatus having at least one processor and at least one memory having computer-readable code stored thereon which when executed controls the at least one processor: to generate a first accent signal (a1) representing musical accents in an audio signal; to generate a second, different, accent signal (a2) representing musical accents in the audio signal; to estimate a first beat time sequence (b1) from the first accent signal; to estimate a second beat time sequence (b2) from the second accent signal; and to identify which one of the first and second beat time sequences (b1) (b2) corresponds most closely with peaks in one or both of the accent signal(s).
The computer-readable code when executed may control the at least one processor to generate the first accent signal (a1) by means of extracting chroma accent features based on fundamental frequency (f0) salience analysis.
The computer-readable code when executed may control the at least one processor to 3o generate using the first accent signal (a1) the estimated tempo (BPMest) of the audio signal.
The computer-readable code when executed may control the at least one processor to generate the first beat time sequence using the first accent signal (a1) and the estimated tempo (BPMest).
The computer-readable code when executed may control the at least one processor to generate the second accent signal (a2) using a predetermined sub-band of the audio signal's bandwidth.
The computer-readable code when executed may control the at least one processor to generate the second accent signal (a2) using a predetermined sub-band below 200 Hz.
The computer-readable code when executed may control the at least one processor to generate the second accent signal (a2) by means of performing a multi-rate filter bank decomposition of the audio signal and using the output from a predetermined one of the filters.
The computer-readable code when executed may control the at least one processor to obtain an integer representation of the estimated tempo (BPMest) and generate the second beat time sequence (b2) using the second accent signal (a2) and said integer representation.
The computer-readable code when executed may control the at least one processor to calculate the integer representation of the estimated tempo (BPMest) using either a rounded tempo estimate function (round(BPMest)), a ceiling tempo estimate function (ceil(BPMest)) or a floor tempo estimate function (floor(BPMest)).
The computer-readable code when executed may control the at least one processor to perform a ceiling and floor function on the estimated tempo (BPMest) to generate respectively a ceiling tempo estimate (ceil(BPMest) and a floor tempo estimate (floor(BPMest)), to generate the second and a third beat time sequence (b2) (b3) using the second accent signal (a2) and different ones of the ceiling and floor tempo estimates, and to identify which one of the first, second and third beat time sequences corresponds most closely with peaks in one or both of the accent signal(s).
The computer-readable code when executed may control the at least one processor to generate, for each of the ceiling and floor tempo estimates, an initial beat time sequence (bt) using said estimate, said initial beat time sequence then being compared with a reference beat time sequence (bi) for generating the second and third beat time sequences using a predetermined similarity algorithm.
The computer-readable code when executed may control the at least one processor to compare the initial beat time sequence (bt) and the reference beat time sequence (bi) over a range of offset positions to identify a best match within the range, the generated second/third beat time sequence comprising the offset version of the reference beat time sequence (bi) which resulted in the best match.
The reference beat time sequence (bi) may have a constant beat interval.
The computer-readable code when executed may control the at least one processor to generate the reference beat time sequence (bi) as t=0, 1/(X/60), 2/(X/60) . . . n/(X/60) where X is the integer representation of the estimated tempo and n is an integer.
The computer-readable code when executed may control the at least one processor to use a range of offset positions in the algorithm between 0 and 1.1/(X/60) where X is the integer representation of the estimated tempo.
The computer-readable code when executed may control the at least one processor to use offset positions for comparison in the algorithm having steps of 0.1/(BPMest/60).
The computer-readable code when executed may control the at least one processor to identify which one of the beat time sequences corresponds most closely with peaks in the second accent signal.
The computer-readable code when executed may control the at least one processor to calculate, for each of the beat time sequences, a summary statistic or value that is dependent on the values of the or each accent signal occurring at or around beat times in the sequence, and to select the beat time sequence which results in the greatest summary statistic or value.
The computer-readable code when executed may control the at least one processor to calculate, for each of the beat time sequences, the average or mean value of the or each accent signal occurring at or around beat times in the sequence, and to select the beat time sequence which results in the greatest mean value.
The computer-readable code when executed may controls the at least one processor to: receive a plurality of video clips, each having a respective audio signal having common content; and identify possible editing points for the video clips using the beats in the selected beat sequence.
The computer-readable code when executed may control the at least one processor to join a plurality of video clips at one or more editing points to generate a joined video clip.
Embodiments of the invention will now be described by way of non-limiting example with reference to the accompanying drawings, in which:
Embodiments described below relate to systems and methods for audio analysis, primarily the analysis of music and its musical meter in order to identify the temporal location of beats in a piece of music or part thereof. The process is commonly known as beat tracking. As noted above, beats are considered to represent musically meaningful points that can be used for various practical applications, including music recommendation algorithms, DJ applications and automatic looping. The specific embodiments described below relate to a video editing system which automatically cuts video clips using the location of beats identified in their associated audio track as potential video angle switching points.
Referring to
External terminals 100, 102, 104 in use communicate with the analysis server 500 via the network 300, in order to upload video clips having an associated audio track. In the present case, the terminals 100, 102, 104 incorporate video camera and audio capture (i.e. microphone) hardware and software for the capturing, storing, uploading and downloading of video data over the network 300.
Referring to
The memory 112 may be a non-volatile memory such as read only memory (ROM) a hard disk drive (HDD) or a solid state drive (SSD). The memory 112 stores, amongst other things, an operating system 126 and may store software applications 128. The RAM 114 is used by the controller 106 for the temporary storage of data. The operating system 126 may contain code which, when executed by the controller 106 in conjunction with RAM 114, controls operation of each of the hardware components of the terminal.
The controller 106 may take any suitable form. For instance, it may be a microcontroller, plural microcontrollers, a processor, or plural processors.
The terminal 100 may be a mobile telephone or smartphone, a personal digital assistant (PDA), a portable media player (PMP), a portable computer or any other device capable of running software applications and providing audio outputs. In some embodiments, the terminal 100 may engage in cellular communications using the wireless communications module 122 and the antenna 124. The wireless communications module 122 may be configured to communicate via several protocols such as Global System for Mobile Communications (GSM), Code Division Multiple Access (CDMA), Universal Mobile Telecommunications System (UMTS), Bluetooth and IEEE 802.11 (Wi-Fi).
The display part 108 of the touch sensitive display 102 is for displaying images and text to users of the terminal and the tactile interface part 110 is for receiving touch inputs from users.
As well as storing the operating system 126 and software applications 128, the memory 112 may also store multimedia files such as music and video files. A wide variety of software applications 128 may be installed on the terminal including Web browsers, radio and music players, games and utility applications. Some or all of the software applications stored on the terminal may provide audio outputs. The audio provided by the applications may be converted into sound by the speaker(s) 118 of the terminal or, if headphones or speakers have been connected to the headphone port 120, by the headphones or speakers connected to the headphone port 120.
In some embodiments the terminal 100 may also be associated with external software application not stored on the terminal. These may be applications stored on a remote server device and may run partly or exclusively on the remote server device. These applications can be termed cloud-hosted applications. The terminal 100 may be in communication with the remote server device in order to utilise the software application stored there. This may include receiving audio outputs provided by the external software application.
In some embodiments, the hardware keys 104 are dedicated volume control keys or switches. The hardware keys may for example comprise two adjacent keys, a single rocker switch or a rotary dial. In some embodiments, the hardware keys 104 are located on the side of the terminal 100.
One of said software applications 128 stored on memory 112 is a dedicated application (or “App”) configured to upload captured video clips, including their associated audio track, to the analysis server 500.
The analysis server 500 is configured to receive video clips from the terminals 100, 102, 104 and to perform beat tracking of each associated audio track for the purposes of automatic video processing and editing, for example to join clips together at musically meaningful points. Instead of performing beat tracking of each associated audio track, the analysis server 500 may be configured to perform beat tracking in a common audio track which has been obtained by combining parts from the audio track of one or more video clips.
Referring to
Users of the terminals 100, 102, 104 subsequently upload their video clips to the analysis server 500, either using their above-mentioned App or from a computer with which the terminal synchronises. At the same time, users are prompted to identify the event, either by entering a description of the event, or by selecting an already-registered event from a pull-down menu. Alternative identification methods may be envisaged, for example by using associated GPS data from the terminals 100, 102, 104 to identify the capture location.
At the analysis server 500, received video clips from the terminals 100, 102, 104 are identified as being associated with a common event. Subsequent analysis of each video clip can then be performed to identify beats which are used as useful video angle switching points for automated video editing.
Referring to
The memory 206 (and mass storage device 208) may be a non-volatile memory such as read only memory (ROM) a hard disk drive (HDD) or a solid state drive (SSD). The memory 206 stores, amongst other things, an operating system 210 and may store software applications 212. RAM (not shown) is used by the controller 202 for the temporary storage of data. The operating system 210 may contain code which, when executed by the controller 202 in conjunction with RAM, controls operation of each of the hardware components.
The controller 202 may take any suitable form. For instance, it may be a microcontroller, plural microcontrollers, a processor, or plural processors.
The software application 212 is configured to control and perform the video processing; including processing the associated audio signal to perform beat tracking. This can alternatively be performed using a hardware-level implementation as opposed to software or a combination of both hardware and software.
The beat tracking process is described with reference to
It will be seen that there are, conceptually at least, two processing paths, starting from steps 6.1 and 6.6. The reference numerals applied to each processing stage are not indicative of order of processing. In some implementations, the processing paths might be performed in parallel allowing fast execution. In overview, three beat time sequences are generated from an inputted audio signal, specifically from accent signals derived from the audio signal. A selection stage then identifies which of the three beat time sequences is a best match or fit to one of the accent signals, this sequence being considered the most useful and accurate for the video processing application or indeed any application with which beat tracking may be useful.
Each processing stage will now be considered in turn.
First (Chroma) Accent Signal Stage
The method starts in steps 6.1 and 6.2 by calculating a first accent signal (a1) based on fundamental frequency (Fo) salience estimation. This accent signal (a1), which is a chroma accent signal, is extracted as described in [2]. The chroma accent signal (a1) represents musical change as a function of time and, because it is extracted based on the Fo information, it emphasizes harmonic and pitch information in the signal. Note that, instead of calculating an chroma accent signal based on Fo salience estimation, alternative accent signal representations and calculation methods could be used. For example, the accent signals described in [5] or [7] could be utilized.
The following step is estimation of musical accent using the normalized chroma matrix {circumflex over (x)}b(k), k=1, . . . , K and b=1, 2, . . . , bo. The accent estimation resembles the method proposed in [5], but instead of frequency bands we use pitch classes here. To improve the time resolution, the time trajectories of chroma coefficients may be first interpolated by an integer factor. We have used interpolation by the factor eight. A straightforward method of interpolation by adding zeros between samples may be used. With our parameters, after the interpolation, the resulting sampling rate fr=172 Hz. This is followed by a smoothing step, which is done by applying a sixth-order Butterworth low-pass filter (LPF). The LPF has a cuttoff frequency of fLP=10 Hz. We denote the signal after smoothing with zb (n). The following step comprises differential calculation and half-wave rectification (HWR):
żb(n)=HWR(zb(n)−zb(n−1)) (1)
with HWR(x)=max(x, 0). In the next step, a weighted average of zb(n) and its half-wave rectified differential żb(n) is formed. The resulting signal is
In Equation (2), the factor 0≦p≦1 controls the balance between zb(n) and its half-wave rectified differential. In our implementation, the value of ρ=0.6. In one embodiment of the invention, we obtain an accent signal a1 based on the above accent signal analysis by linearly averaging the bands b. Such an accent signal represents the amount of musical emphasis or accentuation over time.
First Beat Tracking Stage
In step 6.3, an estimation of the audio signal's tempo (hereafter “BPMest”) is made using the method described in [2].
The first step in the tempo estimation is periodicity analysis. The periodicity analysis is performed on the accent signal (a1). The generalized autocorrelation function (GACF) is used for periodicity estimation. To obtain periodicity estimates at different temporal locations of the signal, the GACF is calculated in successive frames. The length of the frames is W and there is 16% overlap between adjacent frames. No windowing is used. At the mth frame, the input vector for the GACF is denoted am:
am=[a1((m−1)W), . . . ,a1(mW−1),0, . . . ,0]T (3)
where T denotes transpose. The input vector is zero padded to twice its length, thus, its length is 2W. The GACF may be defined as
γm(τ)=IDFT(|DFT(am)|p) (4)
where discrete Fourier transform and its inverse are denoted by DFT and IDFT, respectively. The amount of frequency domain compression is controlled using the coefficient p. The strength of periodicity at period (lag) τ is given by γm(τ).
Other alternative periodicity estimators to the GACF include, for example, inter onset interval histogramming, autocorrelation function (ACF), or comb filter banks. Note that the conventional ACF can be obtained by setting p=2 in Equation (4). The parameter p may need to be optimized for different accent features. This may be done, for example, by experimenting with different values of p and evaluating the accuracy of periodicity estimation. The accuracy evaluation can be done, for example, by evaluating the tempo estimation accuracy on a subset of tempo annotated data. The value which leads to best accuracy may be selected to be used. For the chroma accent features used here, we can use, for example, the value p=0.65, which was found to perform well in this kind of experiments for the used accent features.
After periodicity estimation, there exists a sequence of periodicity vectors from adjacent frames. To obtain a single representative tempo for a musical piece or a segment of music, a point-wise median of the periodicity vectors over time may be calculated. The median periodicity vector may be denoted by γmed(τ). Furthermore, the median periodicity vector may be normalized to remove a trend
The trend is caused by the shrinking window for larger lags. A subrange of the periodicity vector may be selected as the final periodicity vector. The subrange may be taken as the range of bins corresponding to periods from 0.06 to 2.2 s, for example. Furthermore, the final periodicity vector may be normalized by removing the scalar mean and normalizing the scalar standard deviation to unity for each periodicity vector. The periodicity vector after normalization is denoted by s(τ). Note that instead of taking a median periodicity vector over time, the periodicity vectors in frames could be outputted and subjected to tempo estimation separately.
Tempo estimation is then performed based on the periodicity vector s(τ). The tempo estimation is done using k-Nearest Neighbour regression. Other tempo estimation methods could be used as well, such as methods based on finding the maximum periodicity value, possibly weighted by the prior distribution of various tempi.
Let's denote the unknown tempo of this periodicity vector with T. The tempo estimation may start with generation of resampled test vectors sr(τ). r denotes the resampling ratio. The resampling operation may be used to stretch or shrink the test vectors, which has in some cases been found to improve results. Since tempo values are continuous, such resampling may increase the likelihood of a similarly shaped periodicity vector being found from the training data. A test vector resampled using the ratio r will correspond to a tempo of T/r. A suitable set of ratios may be, for example, 57 linearly spaced ratios between 0.87 and 1.15. The resampled test vectors correspond to a range of tempi from 104 to 138 BPM for a musical excerpt having a tempo of 120 BPM.
The tempo estimation comprises calculating the Euclidean distance between each training vector tm(τ) and the resampled test vectors Sr(τ):
In Equation (6), m=1, . . . , M is the index of the training vector. For each training instance m, the minimum distance d(m)=minrd(m, r) may be stored. Also the resampling ratio that leads to the minimum distance {circumflex over (r)}(m)=argminrd(m, r) is stored. The tempo may then be estimated based on the k nearest neighbors that lead to the k lowest values of d(m). The reference or annotated tempo corresponding to the nearest neighbor i is denoted by Tann(i). An estimate of the test vector tempo is obtained as {circumflex over (T)}(i)=Tann(i){circumflex over (r)}(i).
The tempo estimate can be obtained as the average or median of the nearest neighbor tempo estimates {circumflex over (T)}(i), i=1, . . . , k. Furthermore, weighting may be used in the median calculation to give more weight to those training instances that are closest to the test vector. For example, weights wi can be calculated as
where i=1, . . . , k. The parameter ∂ may be used to control the steepness of the weighting. For example, the value ∂=0.01 can be used. The tempo estimate BPMest can then be calculated as a weighted median of the tempo estimates {circumflex over (T)}(i), i=1, . . . , k, using the weights wi.
Referring still to
For example, the beat tracking stage 6.4 takes BPMest and attempts to find a sequence of beat times so that many beat times correspond to large values in the first accent signal (a1). As suggested in [7], the accent signal is first smoothed with a Gaussian window. The half-width of the Gaussian window may be set to be equal to 1/32 of the beat period corresponding to BPMest.
After the smoothing, the dynamic programming routine proceeds forward in time through the smoothed accent signal values (a1). Let's denote the time index n. For each index n, it finds the best predecessor beat candidate. The best predecessor beat is found inside a window in the past by maximizing the product of a transition score and a cumulative score. That is, the algorithm calculates δ(n)=maxl(ts(l)·cs(n+l)), where ts(l) is the transition score and cs(n+l) the cumulative score. The search window spans from l=−round(−2P), . . . , −round(P/2), where P is the period in samples corresponding to BPMest. The transition score may be defined as
where l=−round(−2P), . . . , −round(P/2) and the parameter θ=8 controls how steeply the transition score decreases as the previous beat location deviates from the beat period P. The cumulative score is stored as cs(n)=αδ(n)+(1−α)a1(n). The parameter α is used to keep a balance between past scores and a local match. The value α=0.8. The algorithm also stores the index of the best predecessor beat as b(n)=n+{circumflex over (l)}, where {circumflex over (l)}=argmaxl(ts(n+l)+cs(n+l)).
In the end of the musical excerpt, the best cumulative score within one beat period from the end is chosen, and then the entire beat sequence B1 which caused the score is traced back using the stored predecessor beat indices. The best cumulative score can be chosen as the maximum value of the local maxima of the cumulative score values within one beat period from the end. If such a score is not found, then the best cumulative score is chosen as the latest local maxima exceeding a threshold. The threshold here is 0.5 times the median cumulative score value of the local maxima in the cumulative score.
It is noted that the beat sequence obtained in step 6.4 can be used to update the BPMest. In some embodiments of the invention, the BPMest is updated based on the median beat period calculated based on the beat times obtained from the dynamic programming beat tracking step.
The value of BPMest generated in step 6.3 is a continuous real value between a minimum BPM and a maximum BPM, where the minimum BPM and maximum BPM correspond to the smallest and largest BPM value which may be output. In this stage, minimum and maximum values of BPM are limited by the smallest and largest BPM value present in the training data of the k-nearest neighbours-based tempo estimator.
BPMest Modification Using Ceiling and Floor Functions
Electronic music often uses an integer BPM setting. In appreciation of this understanding, in step 6.5 a ceiling and floor function is applied to BPMest. As will be known, the ceiling and floor functions give the nearest integer up and down, or the smallest following and largest previous integer, respectively. The result of this stage 6.5 is therefore two sets of data, denoted as floor(BPMest) and ceil(BPMest). The values of floor(BPMest) and ceil(BPMest) are used as the BPM value in the second processing path, in which beat tracking is performed on a bass accent signal, or an accent signal dominated by low frequency components, to be described next.
Multi Rate Accent Calculation
A second accent signal (a2) is generated in step 6.6 using the accent signal analysis method described in [3]. The second accent signal (a2) is based on a computationally efficient multi rate filter bank decomposition of the signal. Compared to the Fo-salience based accent signal (a1), the second accent signal (a2) is generated in such a way that it relates more to the percussive and/or low frequency content in the inputted music signal and does not emphasize harmonic information. Specifically, in step 6.7, we select the accent signal from the lowest frequency band filter used in step 6.6, as described in [3] so that the second accent signal (a2) emphasizes bass drum hits and other low frequency events. The typical upper limit of this sub-band is 187.5 Hz or 200 Hz may be given as a more general figure. This is performed as a result of the understanding that electronic dance music is often characterized by a stable beat produced by the bass drum.
The accent filter bank 226 is in communication with the re-sampler 222 to receive the re-sampled audio input 224 from the re-sampler 22. The accent filter bank 226 implements signal processing in order to transform the re-sampled audio input 224 into a form that is suitable for subsequent analysis. The accent filter bank 226 processes the re-sampled audio input 224 to generate sub-band accent signals 228. The sub-band accent signals 228 each correspond to a specific frequency region of the re-sampled audio input 224. As such, the sub-band accent signals 228 represent an estimate of a perceived accentuation on each sub-band. Much of the original information of the audio signal 220 is lost in the accent filter bank 226 since the sub-band accent signals 228 are heavily down-sampled. It should be noted that although
An exemplary embodiment of the accent filter bank 226 is shown in greater detail in
As shown in
As stated above, the number of audio sub-bands can vary. However, an exemplary embodiment having four defined signal bands has been shown in practice to include enough detail and provides good computational performance. In the current exemplary embodiment, assuming 24 kHz input sampling rate, the frequency bands may be, for example, 0-187.5 Hz, 187.5-750 Hz, 750-3000 Hz, and 3000-12000 Hz. Such a frequency band configuration can be implemented by successive filtering and down sampling phases, in which the sampling rate is decreased by four in each stage. For example, in
For the present application, we are only interested in the lowest sub-band signal representing bass drum beats and/or other low frequency events in the signal. Before outputting, the lowest sub-band accent signal is optionally normalized by dividing the samples with the maximum sample value. Other ways of normalizing, such as mean removal and/or variance normalization could be applied as well. The normalized lowest-sub band accent signal is output as a2.
Second Beat Tracking Stage
In step 6.8 of
Inputs to this processing stage comprise the second accent signal (a2) and the values of floor(BPMest) and ceil(BPMest) generated in step 6.5. The motivation for this is that, if the music is electronic dance music, it is quite likely that the sequence of beat times will match the peaks in (a2) at either the floor(BPMest) or ceil(BPMest).
There are various ways to perform beat tracking using (a2), floor(BPMest) and ceil(BPMest). In this case, the second beat tracking stage 6.8 is performed as follows.
Referring to
The following paragraph describes the process for just one path, namely that applied to floor(BPMest) but it will be appreciated that the same process is performed in the other path applied to ceil(BPMest). As before, the reference numerals relating to the two processing paths in no way indicate order of processing; it is possible that both paths can operate in parallel.
The dynamic programming beat tracking method of step 7.1 gives an initial beat time sequence bt. Next, in step 7.2 an ideal beat time sequence bi is calculated as:
bi=0,1/(floor(BPMest)/60),2/(floor(BPMest)/60),etc.
Next, in step 7.3 a best match is found between the initial beat time sequence bt and the ideal beat time sequence bi when bi is offset by a small amount. For finding the match, we use the criterion proposed in [1] for measuring the similarity of two beat time sequences. We evaluate the score R(bt, bi+dev) where R is the criterion for tempo tracking accuracy proposed in [1], and dev is a deviation ranging from 0 to 1.1/(floor(BPMest)/60) with steps of 0.1/(floor(BPMest)/60). Note that the step is a parameter and can be varied. In Matlab language, the score R can be calculated as
function R=beatscore_cemgil(bt,at)
sigma_e=0.04; % expected onset spread
% match nearest beats
id=nearest(at(:)′,bt(:));
% compute distances
d=at−bt(id);
% compute tracking index
s=exp(−d.^2/(2*sigma_e^2));
R=2*sum(s)/(length(bt)+length(at));
The input ‘bt’ into the routine is bt, and the input ‘at’ at each iteration is bi+dev. The function ‘nearest’ finds the nearest values in two vectors and returns the indices of values nearest to ‘at’ in ‘bt’. In Matlab language, the function can be presented as
function n=nearest(x,y)
% x row vector
% y column vector:
% indices of values nearest to x's in y
x=ones(size(y,1),1)*x;
[junk,n]=min(abs(x−y));
The output is the beat time sequence bi+devmax, where devmax is the deviation which leads to the largest score R. It should be noted that scores other than R could be used here as well. It is desirable that the score measures the similarity of the two beat sequences.
As indicated above, the process is performed also for ceil(BPMest) in steps 7.4, 7.5 and 7.6 with values of floor(BPMest) being changed accordingly from the above paragraph.
The output from steps 7.3 and 7.6 are the two beat time sequences: Bceil which is based on ceil(BPMest) and Bfloor based on floor(BPMest). Note that these beat sequences have a constant beat interval. That is, the period of two adjacent beats is constant throughout the beat time sequences.
Selection of Beat Time Sequence
Referring back to
The remaining processing stages 6.9, 6.10, 6.11 determine which of these best explains the accent signals obtained. For this purpose, we could use either or both of the accent signals a1 or a2. More accurate and robust results have been observed using just a2, representing the lowest band of the multi rate accent signal.
As indicated in
As an implementation detail, a small constant deviation of maximum +/− ten-times the accent signal sample period is allowed in the beat indices when calculating the average accent signal value. That is, when finding the average score, the system iterates through a range of deviations, and at each iteration adds the current deviation value to the beat indices and calculates and stores an average value of the accent signal corresponding to the displaced beat indices. In the end, the maximum average value is found from the average values corresponding to the different deviation values, and outputted. This step is optional, but has been found to increase the robustness since with the help of the deviation it is possible to make the beat times to match with peaks in the accent signal more accurately. Furthermore, optionally, the individual beat indices in the deviated beat time sequence may be deviated as well. In this case, each beat index is deviated by maximum of −/+ one sample, and the accent signal value corresponding to each beat is taken as the maximum value within this range when calculating the average. This allows for accurate positions for the individual beats to be searched. This step has also been found to slightly increase the robustness of the method.
Intuitively, the final scoring step performs matching of each of the three obtained candidate beat time sequences b1, Bceil, and Bfloor to the accent signal a2, and selects the one which gives a best match. A match is good if high values in the accent signal coincide with the beat times, leading into a high average accent signal value at the beat times. If one of the beat sequences which is based on the integer BPMs, i.e. Bceil, and Bfloor, explains the accent signal a2 well, that is, results in a high average accent signal value at beats, it will be selected over the baseline beat time sequence b1. Experimental data has shown that this is often the case when the inputted music signal corresponds to electronic dance music (or other music with a strong beat indicated by the bass drum and having an integer valued tempo), and the method significantly improves performance on this style of music. When Bceil and Bfloor do not give a high enough average value, then the beat sequence b1 is used. This has been observed to be the case for most music types other than electronic music.
Instead of using the ceil(BPMest) and floor(BPMest), the method could operate also with a single integer valued BPM estimate. That is, the method calculates, for example, one of round(BPMest), ceil(BPMest) and floor(BPMest), and performs the beat tracking using that using the low-frequency accent signal a2. In some cases, conversion of the BPM value to an integer might be omitted completely, and beat tracking performed using BPMest on a2.
In cases where the tempo estimation step produces a sequence of BPM values over different temporal locations of the signal, the tempo value used for the beat tracking on the accent signal a2 could be obtained, for example, by averaging or taking the median of the BPM values. That is, in this case the method could perform the beat tracking on the accent signal a1 which is based on the chroma accent features, using the framewise tempo estimates from the tempo estimator. The beat tracking applied on a2 could assume constant tempo, and operate using a global, averaged or median BPM estimate, possibly rounded to an integer.
In summary, the audio analysis process performed by the controller 202 under software control involves the steps of:
The steps take advantage of the understanding that studio produced electronic music, and sometimes also live music (especially in clubs and/or other electronic music concerts or performances), uses a constant tempo which is set into sequencers, or is obtained through the use of metronomes. Moreover, often the tempo is an integer value. Experimental results have shown that the beat tracking accuracy on electronic music was improved from about 60% correct to over 90% correct using the above-described system and method. In particular, the beat tracking method based on the tempo estimation presented in [2] and beat tracking step presented in [7] applied on the chroma accent features sometimes tends to make beat phase errors, which means that the beats may be positioned between the beats rather than on beat. Such errors may be due to, for example, the music exhibiting large amounts of syncopation, that is having musical events, stresses, or accents off-beat instead of on-beat. The above described system and method was particularly helpful in removing beat phase errors in electronic dance music.
Although the main embodiment employs tempo estimation, period or frequency estimation could be used in a more generic sense, i.e. estimation of a period or frequency in the signal which corresponds to some metrical level, such as the beat. Period estimation of the beat period, is referred as tempo estimation, but other metrical levels can be used. The tempo is related to the beat period as 1/<beat period>*60, that is, a period of 0.5 seconds corresponds to a tempo of 120 beats per minute. That is, the tempo is a representation for the frequency of the pulse corresponding to the tempo. Alternatively, the system could of course use another representation of frequency, such as Hz, with 2 Hz corresponding to 120 BPM.
It will be appreciated that the above described embodiments are purely illustrative and are not limiting on the scope of the invention. Other variations and modifications will be apparent to persons skilled in the art upon reading the present application.
Moreover, the disclosure of the present application should be understood to include any novel features or any novel combination of features either explicitly or implicitly disclosed herein or any generalization thereof and during the prosecution of the present application or of any application derived therefrom, new claims may be formulated to cover any such features and/or combination of such features.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/IB2012/053329 | 6/29/2012 | WO | 00 | 9/13/2015 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2014/001849 | 1/3/2014 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
6542869 | Foote | Apr 2003 | B1 |
7612275 | Seppanen | Nov 2009 | B2 |
8440901 | Nakadai | May 2013 | B2 |
20030205124 | Foote | Nov 2003 | A1 |
20070261537 | Eronen | Nov 2007 | A1 |
20070291958 | Jehan | Dec 2007 | A1 |
20080236371 | Eronen | Oct 2008 | A1 |
20100170382 | Kobayashi | Jul 2010 | A1 |
20100188580 | Paschalakis | Jul 2010 | A1 |
20110255700 | Maxwell | Oct 2011 | A1 |
20140060287 | Okuda | Mar 2014 | A1 |
20150094835 | Eronen | Apr 2015 | A1 |
Number | Date | Country |
---|---|---|
2004-096617 | Mar 2004 | JP |
2004-302053 | Oct 2004 | JP |
2006-518492 | Aug 2006 | JP |
2007-052394 | Mar 2007 | JP |
2008-076760 | Apr 2008 | JP |
2008-233812 | Oct 2008 | JP |
2004042584 | May 2004 | WO |
2013164661 | Nov 2013 | WO |
Entry |
---|
International Search Report and Written Opinion received for corresponding Patent Cooperation Treaty Application No. PCT/IB2012/053329, dated Apr. 15, 2013, 12 pages. |
McKinney, M.F. et al. “Evaluation of audio beat tracking and music tempo extraction logorithms”, Journal on New Music research, vol. 36, No. 1, 2007, pp. 1-16. |
Eronen A.J. et al. “Music tempo estimation with k-NN regression”, IEEE trans. on Audio, Speech, and Language Processing, vol. 18, No. 1, Jan. 2010, pp. 50-57. |
Seppanen J. et al. “Joint beat & tatum tracking from music signals”, International conference on music information retrieval (ISMIR), Oct. 8-12, 2006, Victoria, Canada 6 pages. |
Davies,M.E. P. et al. “Context-dependent beat tracking of muscial audio,” IEEE Trans. on Audio, Speech, and Language Processing, vol. 15, No. 3, Mar. 2007, pp. 1009-1020. |
Gkiokas A. et al. “Musci tempo estimation and beat tracking by applying source separation and metrical relations”, IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP), Mar. 25-30, 2012, Kyoto Japan pp. 42-424. |
Ellis D.P.W. Beat tracking with dynamic programming:, MIREX 2006 Audio beat tracking Context system description, Sep. 2006, 3 pages. |
Peeters et al., “Simultaneous Beat And Downbeat-Tracking Using a Probabilistic Framework: Theory And Large-Scale Evaluation”, IEEE Transactions on Audio, Speech, and Language Processing, vol. 19, No. 6, Aug. 2011, pp. 1754-1759. |
Klapuri et al., “Analysis Of The Meter Of Acoustic Musical Signals”, IEEE Transactions on Audio, Speech, and Language Processing, vol. 14, No. 1, Jan. 2006, 15 Pages. |
Jehan, “Creating Music by Listening”, Thesis, Sep. 2005, pp. 1-137. |
Ellis, “Beat Tracking by Dynamic Programming”, Journal of New Music Research, vol. 36, No. 1, Mar. 2007, pp. 1-21. |
Cemgil et al., “On Tempo Tracking: Tempogram Representation and Kalman filtering”, Journal of New Music Research, vol. 29, No. 4, 2001, 19 pages. |
International Search Report and Written Opinion received for corresponding Patent Cooperation Treaty Application No. PCT/IB2012/052157, dated Feb. 18, 2013, 12 pages. |
Goto, “An Audio-Based Real-Time Beat Tracking System For Music With Or Without Drum-Sounds”, Journal of New Music Research, vol. 30, No. 2, 2001, pp. 159-171. |
Papadopoulos et al., “Joint Estimation Of Chords And Downbeats From An Audio Signal”, IEEE Transactions on Audio, Speech, and Language Processing, vol. 19, No. 1, Jan. 2011, pp. 138-152. |
Zenz et al., “Automatic Chord Detection Incorporating Beat and Key Detection”, IEEE International Conference on Signal Processing and Communications, Nov. 24-27, 2007, pp. 1175-1178. |
Degara et al., “Reliability-Informed Beat Tracking Of Musical Signals”, IEEE Transactions on Audio, Speech, and Language Processing, vol. 20, No. 1, Jan. 2012, pp. 290-301. |
Klapuri, “Multiple Fundamental Frequency Estimation By Summing Harmonic Amplitudes”, Proceedings of the 7th International Conference on Music Information Retrieval, Oct. 8-12, 2006, 6 pages. |
Extended European Search Report received for corresponding European Patent Application No. 12880120.6, dated Nov. 4, 2015, 12 pages. |
Deinert et al., “Regression-Based Tempo Recognition From Chroma and Energy Accents For Slow Audio Recordings”, Proceedings of the AES 42nd International Conference on Semantic Audio, Jul. 2011, 9 pages. |
Extended European Search Report received for corresponding European Patent Application No. 12875874.5, dated Nov. 9, 2015, 08 pages. |
Scaringella et al., “A Real-Time Beat Tracker for Unrestricted Audio Signals”, In proceedings of the conference of sound and music computing, Oct. 20-22, 2004, 6 pages. |
Papadopoulos et al., “Simultaneous Estimation Of Chord Progression And Downbeats From An Audio File”, IEEE International Conference on Acoustics, Speech and Signal Processing, Mar. 31-Apr. 4, 2008, pp. 121-124. |
Office action received for corresponding Japanese Patent Application No. 2015-519368, dated Feb. 4, 2016, 5 pages of office action and No English Language Translation available. |
Number | Date | Country | |
---|---|---|---|
20160005387 A1 | Jan 2016 | US |