The present invention relates to the task of identifying notes in a music signal by a method for processing a sequence of signals. More specifically, the invention relates to a method and installation for the recognition of polyphonic notes from a musical signal being captured or played back, of multiple notes being played simultaneously and consecutively.
Especially since the introduction of digital audio technology and of techniques for digitally processing digital audio signals, there have been many developments aimed at identifying, out of a digital signal, which sequences of single or multiple notes are being played. In many applications, such as when a computer program is used to assist a music student in playing an instrument, an additional requirement is to perform this identification in real time, with a moderate latency, and with a high level of reliability.
In present-day solutions to the problem of identifying notes in an audio signal, a sequence of digitally coded samples is used to represent the audio signal. The task of note identification thus is that of extracting from a sequence of digital samples signal characteristics pointing to the momentary presence of musical notes, in the presence of unwanted noise caused by ambient sound and by the instrument being played.
It is well-known that, for most instruments, any given, ongoing musical note can be described over a short observation period as a time-varying sum of a sinusoidal oscillation at a fundamental frequency and several sinusoidal oscillations at harmonic frequencies, the value of each harmonic frequency being some integer times the value of the fundamental frequency, and each oscillation featuring an instantaneous amplitude and phase.
It is common in the art to select consecutive groups of samples and to analyse their spectral content in the frequency domain with a discrete Fourier transform. This transform yields a number of complex or real values which can be used to characterize, equivalently, the amplitude or the amount of signal energy present in equidistant, constant-width spectral bands. Spectral bands with low energy with respect to total energy and to the energy of neighbouring bands are considered to be empty, whereas spectral bands with significant energy are identified and characterized as peaks. The peak frequency associated with each peak, often defined as either the arithmetic average of the lower and upper cut-off frequencies or as their geometrical average, is then used for further processing, and musical note detection becomes the task of finding which patterns of fundamentals and harmonics generated by a possible combination of notes best matches the pattern of such peak frequencies.
In the following, the state of the art is further discussed based on three references, namely these documents:
Ref. 1: Patent U.S. Pat. No. 8,592,670 Polyphonic Note Detection.
Ref. 2: Judith C. Brown and Miller S. Puckette, An efficient algorithm for the calculation of a constant Q transform, J. Acoust. Soc. Am. 92(5):2698-2701 (1992).
Ref. 3: R. C. Maher and J. W. Beauchamp, “Fundamental frequency estimation of musical signals using a two-way mismatch procedure”, J. Acoust. Soc. Am. 94(4), 2254-2263 (1994).
Ref. 1 is a recent example of such a method for polyphonic note detection. The above method, though quite straightforward, is often made ineffective for reasons directly related to the behaviour of fundamentals and harmonics in the time domain. For example, it is common for a chord to include two notes precisely one octave apart. In such a case, the second harmonic of the lower note will be in the same frequency band as the fundamental of the higher note. This makes the detection of the fundamental of the higher notes more difficult as itself and all its harmonics will be in frequency bands also occupied by harmonics of the lower note. In addition, spectral components originating from both notes and presents in the same frequency band will display the well-known phenomenon of beats, in which two sinusoidal oscillations with a small difference in frequency will alternately reinforce or partially cancel each other. Thus, over a short period of time, it is quite possible for a band to appear nearly empty and thus to not be identified as a peak.
Because a straightforward Fourier transform performs an instantaneous frequency analysis based on equidistant bands, whereas the common definition of notes, as well as many psycho acoustical effects, are based on a logarithmic frequency scaling, a variant of frequency domain analysis is often used by persons of the art which performs Fourier transformation on the basis of bands with a constant relative bandwidth as opposed to an absolute one, as illustrated by Ref. 2. When this method is applied to note recognition, it is common practice to compute the energy present in the frequency bands over a short time interval and to then define frequency peaks, which now relate to non-equidistant frequency bands as opposed to the equidistant frequency bands of conventional Fourier analysis. However, the same fundamental disadvantages encountered in the case of multiple occupancy of individual bands by spectral components originating from different notes obviously remains.
Components originating from different notes and occurring simultaneously within a given individual band can be subject to a more precise analysis, for example by increasing the resolution provided by the frequency analysis. This can be achieved by significantly increasing the number of frequency bands, though with the disadvantage of simultaneously increasing the number of samples to be processed by the Fourier transform, which in turn increases the response time of the detection method.
There exists, therefore, a considerable interest in developing methods for musical note and chord detection providing accurate, detailed and reliable decisions as to whether a given band is occupied either by noise only or by two signals of significant amplitude in short term cancellation, as well as a better decision as to whether a given band is occupied either by one single signal of significant amplitude or by several such signals.
One feature common to all methods for note detection encountered so far relates to information reduction. A Fourier transform as described in Ref. 1 and involving consecutive time segments of the audio signal computes for each band an average of the energies of the frequency components present in each band. This also holds true for another type of processing also well known to people of the art as described in Ref. 2 which combines a Fourier transform with band specific window functions and yielding a spectral analysis with non-uniform frequency bands. This transform also operates over one segment of the input signal, then the next segment of the same length of the input signal, etc. and its output also corresponds to an average of the energies of the frequency components present in a specific band.
Similarly, splitting a signal into frequency bands and computing the signal energy present within each band over some time interval for further processing is equivalent to computing an average before proceeding with further processing. In both cases, peaks are defined on the basis of short-term signal averages, and subsequent decisions on possible notes and combinations of notes are made either by taking solely into account the peak frequencies, or, as is occasionally done, see Ref. 3, by also taking into account the energy values of the peaks. In other words, decisions are made after a very significant reduction (through averaging) of the information present in the frequency bands.
It is therefore a natural next step in sophistication and effectiveness, though one which has not been encountered in any existing solution to the problem of note and chord detection, to define peaks by algorithmic methods which refrain from reducing existing information solely to peak energies, thus allowing further processing of band signal properties for the sake of resolving ambiguities in band occupancy or for that of detection accuracy. Another further and natural step in sophistication and effectiveness, and again one which has not been encountered in any existing solution to the problem of note and chord detection, is to avoid an initial binary allocation of frequency bands to either non-peaks or peaks, and to make decisions based on the extraction of several types of short-term features from all bands, thus allowing for a much more robust decision-making process based on a much greater amount of information. In both those further natural steps, it is important to make sure that the additional processing steps do not unduly increase latency, i,e, the time required to reach a decision as to which notes, if any, were being played in the time interval under consideration.
The present invention solves the problem of determining which notes are being played on a polyphonic instrument, based on a short term, low latency analysis of the acoustic signal generated by the instrument or of signals derived from it.
It is an object of the invention to take into account as much of the available information as possible for as long as possible along the decision process, as opposed to discarding a significant amount of information early in the decision process.
It is yet another object of the invention to make possible whenever appropriate a detailed analysis of all available information in order to resolve under the best possible conditions cases of band occupancy by harmonics and all of fundamentals which could not be resolved on the basis of a simple peak definition only.
It is also an object of the invention to make possible the use of algorithms leading to a fast, reliable and accurate resolution for most of the cases of band occupancy encountered under normal playing conditions.
It is yet another object of the invention to make possible the use of algorithms which do not have a significant impact on the overall computational complexity of polyphonic note detection, as this is an important boundary condition in the implementation of real-time, almost instantaneous polyphonic note detection in such contexts as the software assisted learning of a musical instrument.
Embodiments of the present invention overcome the difficulties described in the background of the invention because, rather than discarding detection-relevant information prior to making decisions on the best possible fit between a hypothetical set of notes and the observed data, the method of the present invention preserves all available information over the full length of the time interval with respect to which a decision has to be taken, this being equally true for bands displaying significant energy and for bands with a much lower energy.
It is a further object of the invention to apply similar methods for the recognition of notes being played, for the recognition of those phases when new notes start being played (the short time intervals commonly referred to in the art as “onset”), and for the ongoing recognition of the precise tuning of the instrument being played.
In the following the method will be explained and described by way of examples relating to the following figures, which show:
In the present invention, a set of narrow-band, time-domain signals is generated from the input signal via a band-pass filter bank, which itself can be implemented, as is well known to persons of the art, either by implementing the individual filters directly, or by performing at least one part of the processing via Fourier transformation. The resulting time-domain signals are temporarily stored, thus allowing for a pre-defined or a decision-dependent extraction of relevant features from the individual narrow-band time-domain signals. An early peak/non-peak decision based on energy average measurement is not performed.
Digital signal processing algorithms are installed which can extract specific features from the individual, narrow-band time-domain signals, such as, for illustration and not as an exhaustive list, by processing short-term statistics, signal envelopes, envelope-derived signal parameter estimates, and frequency measurements and their statistics.
The results of such signal processing allow a decision-making algorithm to reach tentative or final partial decisions concerning the non-occupancy, the ambiguous occupancy, and the single or multiple occupancy of individual frequency bands by spectral components, and also to represent the corresponding segments of band signals in terms of sets of parameters from signal models.
The decision-making algorithm requests a first set of features to be extracted from a set of time-domain band signals. Upon reception and processing of such features, the decision-making algorithm may require further features to be selectively extracted from some time-domain band signals, and the process of requesting features, processing the results, and possibly requesting further features can be repeated a number of times depending on the signal properties and the complexity of decision making.
It is clear to a person of the art that the time signals belonging to one particular decision interval can be stored exclusively for the duration of the decision interval, but also stored over consecutive several decision intervals, in order to confirm or infirm tentative decisions made over short periods of time. Similarly, it is also possible to store extracted features over several consecutive decision intervals.
It is also clear to a person of the art that, while the invention has been described within the scope of detecting notes on the basis of fundamentals and harmonics, it can equally be applied to the task of detecting multiple sounds which are not characterized by simple harmonic models, to the task of reliably detection the onset of musical notes, and to the task of extracting ongoing information relative to the tuning of the instrument.
It is further clear to a person of the art that the method of signal processing described in this invention can be implemented either offline on in real-time, and run on a general-purpose stationary or portable computer of sufficient processing power with the necessary built-in or external peripherals (for example a desktop computer or a notebook), a special-purpose stationary or portable device of sufficient processing power with the necessary built-in or external peripherals (for example a tablet or a smartphone), or a dedicated electronic device of sufficient processing power with the necessary built-in or external peripherals.
It is further clear to a person of the art that the individual functional blocks mentioned in this invention can be implemented in a plurality of ways, such as, in the sense of a list of illustrative examples and not as an exhaustive list, within separate signal processors or within a common one, using separate memory devices or common ones, and with code that can be either stored in a fixed form, or retrieved from an external code repository, or compiled locally on demand.
Number | Date | Country | Kind |
---|---|---|---|
14197438.6 | Dec 2014 | EP | regional |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/EP2015/079205 | 12/10/2015 | WO | 00 |