Method and apparatus for tempo and downbeat detection and alteration of rhythm in a musical segment
AssigneeCreative Technology Ltd
InventorJean Laroche
Life of this patent
Estimating the term…
Abstract
An apparatus and method for determining the tempo and locating the downbeats of music encoded by an audio track performs a cross-correlation between a click track and a pulse track to indicate tempo candidates and between the click track and a series of pulses to determine downbeat candidates. The rhythm of the track is modified by altering segments located between the beats before playback. Swing is added by lengthening and shortening certain segments and the time-signature is modified by deleting certain segments.
Claims7
A method for determining the tempo period, P, of a musical segment stored as a digital file, said method comprising the steps of:
- determining a series of transient times, ti, measured from the beginning of the digital file where transients occur in the musical segment;
- generating a click track having a click template at each ti;
- cross-correlating the click track with a series of impulses located at the transient times to form a cross-correlation function as a function of a first time variable;
- and
- performing peak detection on said cross-correlation function to select a value of the first time variable at a first detected peak as a tempo period candidate for the musical segment.
A method of determining the location of downbeats in a musical segment stored as a digital file, said method comprising the steps of:
- determining a series of transient times, ti, at times measured from the beginning of the digital file where transients occur in the musical segment;
- generating a click track having a click template at each ti;
- evaluating the fit between a series of beat candidate impulses starting at t0, measured from the beginning of the digital file, with the click track, where the impulses are separated by P seconds, by performing the following steps:
- selecting a range of values of P between Pmin and Pmax;
- for a given P between Pmin and Pmax, determining the maximum, M(P), of the cross-correlation of the click track and the beat candidate impulses for values of t0 between 0 and the given P;
- determining the maximum of M(P) for all values of P between Pmin and Pmax, with P0 being the value of P at the maximum;
- selecting P0 as the value of the separation of the impulses;
- and
- determining peaks of the cross-correlation of the click track and the series of impulses with P=P0 as a function of t0 to determine downbeat candidates equal to the values of t0 at the peaks.
A method of determining the location of downbeats in musical interval, having a variable tempo, with the musical interval stored as a digital file, said method comprising the steps of:
- dividing the musical interval into a series of overlapping segments;
- for the first segment:
- determining a series of transient times, ti, measured from the beginning of the digital file where transients occur in the musical segment;
- generating a click track having a click template at each ti;
- cross-correlating the click track with a series of impulses located at the transient times to form a cross-correlation function as a function of a first time variable;
- performing peak detection on said cross-correlation function to select a value of the first time variable at a first detected peak as the tempo period, P0(0), of the first musical segment;
- and
- determining downbeat candidates, with a last downbeat candidate occurring at tlast;
- and
- for the second segment:
- estimating a local tempo, Plocal, that is close to P0(0);
- selecting a second tempo period for the second segment by averaging the tempo periods of the first segment, P0(0), and Plocal;
- determining a series of downbeat candidates;
- and
- selecting one of the series of downbeat candidates separated from tlast by an integral multiple of the second tempo periods as the downbeat candidate t0(1) for the second segment.
A system for locating downbeats in a musical interval, said system comprising:
- a central processing unit;
- a memory, with the memory storing a digitized audio track encoding the musical interval, and program code;
- a bus coupling the central processing unit;
- with the central processing unit for executing:
- program code for determining a series of transient times, ti, at times measured from the beginning of the digital file where transients occur in the musical segment;
- program code for generating a click track having a click template at each ti;
- program code for evaluating the fit between a series of beat candidate impulses starting at t0, measured from the beginning of the digital file, with the click track, where the impulses are separated by P seconds, said program code comprising:
- program code for selecting a range of values of P between Pmin and Pmax;
- for a given P between Pmin and Pmax, program code for determining the maximum, M(P), of the cross-correlation of the click track and the beat candidate impulses for all values of t0 between 0 and the given P;
- program code for determining the maximum of M(P) for all values of P between Pmin and Pmax, with P0 being the value of P at the maximum;
- program code for selecting P0 as the value of the separation of the impulses;
- and
- program code for determining peaks of the cross-correlation of the click track and the series of impulses with P=P0 as a function of t0 to determine downbeat candidates equal to the values of t0 at the peaks.
A computer product for determining the location of downbeats in a musical segment stored as a digital file comprising:
- a computer usable medium having computer readable program code embodied therein for directing operation of said data processing system, said computer readable program code including:
- program code for determining a series of transient times, ti, at times measured from the beginning of the digital file where transients occur in the musical segment;
- program code for generating a click track having a click template at each ti;
- program code for evaluating the fit between a series of beat candidate impulses starting at t0, measured from the beginning of the digital file, with the click track, where the impulses are separated by P seconds, said program code comprising:
- program code for selecting a range of values of P between Pmin and Pmax;
- for a given P between Pmin and Pmax, program code for determining the maximum, M(P), of the cross-correlation of the click track and the beat candidate impulses for all values of t0 between 0 and the given P;
- program code for determining the maximum of M(P) for all values of P between Pmin and Pmax, with P0 being the value of P at the maximum;
- program code for selecting P0 as the value of the separation of the impulses;
- and
- program code for determining peaks of the cross-correlation of the click track and the series of impulses with P=P0 as a function of t0 to determine downbeat candidates equal to the values of t0 at the peaks.
A method of determining the location of downbeats in a musical segment stored as a digital file, said method comprising the steps of:
- determining a series of transient times, ti, at times measured from the beginning of the digital file where transients occur in the musical segment;
- generating a click track having a click template at each ti;
- evaluating the fit between a series of beat candidate impulses starting at t0, measured from the beginning of the digital file, with the click track, where the impulses are separated by P seconds, by performing the following steps:
- selecting a plurality of values of P between Pmin and Pmax;
- for each of the selected plurality of values of P, determining the maximum, M(P), of the cross-correlation of the click track and the beat candidate impulses for a plurality of values of t0 between 0 and the selected P;
- determining the maximum of M(P) over the selected plurality of values of P, with P0 being the value of P that yields the maximum M(P);
- selecting P0 as the value of the separation of the impulses;
- and
- determining peaks of the cross-correlation of the click track and the series of impulses with P=P0 as a finction of to to determine downbeat candidates equal to the values of t0 at the peaks.
Dependencies are inferred from the claim text.