The present invention relates to a music piece analyzer, a program and a music piece analysis method.
There has been proposed a technique for automatically specifying a key of a music piece. For instance, Patent Literature 1 discloses a music piece key estimation device including: an audio data acquisition unit for acquiring audio data of a music piece; a storage for storing key information indicating a relationship between a key and notes of a scale; and a key estimator for analyzing frequency of the audio data of a predetermined section to calculate a chroma vector, selecting a plurality of scales from among the scales included in the chroma vector, determining key candidates based on combinations of the selected plurality of scales and key information, and specifying the key of the music piece from among the determined key candidates.
In the above-described Patent Literature 1, the key of the music piece is specified from among the key candidates based on a distance between the scales of the key candidates, strength of notes included in each of the key candidates, and strength of a note of the scale preceding a note representing each of the key candidates. However, this method sometimes fails to highly accurately and appropriately estimate a key of a music piece.
An object of the invention is to provide a music piece analyzer, a program, and a music piece analysis method capable of more highly accurately and appropriately estimating a key of a music piece.
According to an aspect of the invention, there is provided a music piece analyzer including: a key candidate determiner configured to analyze music data to determine a plurality of key candidates; and a key selector configured to: extract each one of the plurality of key candidates; detect a key corresponding to a related key from among remaining ones of the plurality of key candidates supposing that the extracted one of the plurality of key candidates is a main key; on each extracted one of the plurality of key candidates, calculate a related key score in accordance with the number of the key corresponding to the related key; and select a key of the music piece in accordance with the calculated related key score from among the plurality of key candidates.
According to another aspect of the invention, there is provided a program configured to cause a computer to function as the above-described music piece analyzer.
According to still another aspect of the invention, there is provided a music piece analysis method including: analyzing music data to determine a plurality of key candidates; extracting each one of the plurality of key candidates; detecting a key corresponding to a related key from among remaining ones of the plurality of key candidates supposing that the extracted one of the plurality of key candidates is a main key; on each extracted one of the plurality of key candidates, calculating a related key score in accordance with the number of the key corresponding to the related key; and selecting a key of the music piece in accordance with the calculated related key score from among the plurality of key candidates.
According to the above aspects of the invention, a key of a music piece can be more highly accurately and appropriately estimated through a determination using the related key.
Suitable exemplary embodiments of the invention will be described in detail below with reference to the attached drawings. It should be noted that components of the same or substantially the same function(s) and structure(s) will be denoted by the same reference numerals in the specification and drawings, omitting repetition of description thereof.
The chroma vector generator 110 is configured to perform frequency analysis processes (specifically, an FFT (Fast Fourier Transform) process 112, a pitch detection process 113, and a 1/12 octave banding process 114) on music data 111 (specifically, PCM (Pulse Code Modulation) data or the like) and perform a chroma vector generation process 115 (specifically, combining the results of the 1/12 octave banding process 114 into one octave of twelve notes and integrating components of the twelve notes in a temporal axis direction to create a chroma vector 116 (audio chroma vector). In the present exemplary embodiment, the chroma vector 116 is composed of twelve factors corresponding to respective appearance frequencies of the twelve notes in the music piece.
The key candidate determiner 120 determines a key candidate 121 based on the chroma vector 116 generated through the above-described analysis of the music data. Specifically, the key candidate determiner 120 is configured to, after normalizing the chroma vector 116 as necessary, determine the key candidate 121 with reference to a key table 122 of total 24 keys as exemplarily shown in
As an example, when a chroma vector V=(vA, vB ♭, vB, vC, vD ♭, vD, vE ♭, vE, vF, vG ♭, vG, vA ♭) is satisfied, a score vector S=(sAmajor, sB ♭ major, sBmajor, sCmajor, sD ♭ major, sDmajor, sE ♭ major, sEmajor, sFmajor, sG ♭ major, sGmajor, sA ♭ major, sAminor, sB ♭ minor, sBminor, sCminor, sD ♭ minor, sDminor, sE ♭ minor, sEminor, sFminor, sG ♭ minor, sGminor, sA ♭ minor) of each of the keys is calculated by multiplying the chroma vector V by a coefficient matrix M as shown below.
The coefficients kI, kII, kIII, . . . , kVII of the coefficient matrix are determined to correspond to the I to VII degree notes of each of the keys. In music pieces, III and V degree notes of the key are most frequently used next to I degree note, where II, IV, VI, and VII degree notes are less frequently used. Accordingly, the key candidate determiner 120 optionally calculates the candidate score of each of the keys with the coefficients kI, kII, kIII, . . . , kVII being set at, for instance, kI=3, kIII=kV=2, kII=kIV=kVI=kVII=1. In another example, instead of multiplying the chroma vector V by the coefficients, the key candidate determiner 120 optionally multiplies the magnitude of elements of the chroma vector V converted into a rank (for instance, 12 for the largest element, 11 for the second largest element, and, in the same manner, 1 for the smallest element) by the coefficients.
After calculating the candidate score of each of the keys, for instance, as described above, the key candidate determiner 120 determines a key whose candidate score is relatively high and/or whose candidate score exceeds a predetermined threshold as the key candidate 121. More specifically, the key candidate determiner 120 optionally determines, for instance, a predetermined number of keys with relatively high candidate scores (e.g. top five keys with high scores) as the key candidate 121. Alternatively, the key candidate determiner 120 optionally determines all of the keys whose candidate score exceeds a threshold or, further alternatively, a predetermined number of key(s) whose candidate score is relatively high exceeding a threshold as the key candidate 121. It should be noted that the key candidate determiner 120, which is configured to determine a plurality of key candidates 121, optionally determines a single key candidate 121 when, for instance, there is a large difference between one of the candidate scores and other candidate scores.
The key selector 130 is configured to perform a related key determination as described below on the plurality of key candidates 121 determined by the key candidate determiner 120 to select the key of the music piece. The selected key of the music piece is outputted as music piece key information 141 by the music piece key information output unit 140. The related key determination is made, for instance, based on a relationship between the related keys as shown in
More specifically, the key selector 130 is configured to: extract each one of the plurality of key candidates determined by the key candidate determiner 120; detect keys corresponding to the related keys from among remaining keys of the plurality of key candidates supposing that the extracted one of the plurality of key candidates is a main key; on each extracted one of the plurality of key candidates, calculate a related key score in accordance with the number of keys corresponding to the related keys; and select the key of the music piece in accordance with the related key score from among the plurality of key candidates. For instance, when the key candidate determiner 120 determines that five keys {Cmajor, Cminor, Gmajor, Fmajor, Aminor} are the key candidates, the key selector 130 detects the key(s) corresponding to the related keys from among remaining keys of the key candidates for each of the five instances (i.e. (i) when the main key is Cmajor, (ii) when the main key is Cminor, (iii) when the main key is Gmajor, (iv) when the main key is Fmajor, and (v) when the main key is Aminor). When the number of the key(s) corresponding to the related key(s) is represented by n, n=4 is satisfied in the case of (i) (all of the remaining key candidates correspond to the related keys as shown in the example shown in
In the above example, the key selector 130 is optionally configured to use the number n directly as the related key score and select a key with the largest n (the main key in the case of (i), i.e. Cmajor) as the key of the music piece. Alternatively, the key selector 130 is optionally configured to calculate the related key score so that the related key score becomes relatively high when a specific type of the related key is included. For instance, the key selector 130 is optionally configured to sum the scores that are weighted for each type of the keys corresponding to the related keys detected from among the remaining keys of the candidate keys (e.g. 3 points when the key is the parallel key, 2 points when the key is the dominant key or the subdominant key, 1 point when the key is the relative key) to calculate the related key score.
It should be noted that, when the key candidate determiner 120 determines a single key candidate, the process to be performed by the key selector 130 is not performed but the identified key candidate is directly selected as the key of the music piece. In contrast, when the key candidate determiner 120 determines two key candidates, the related key score becomes the same in either key candidates determined as the main key. In this case and a case with three or more determined key candidates of the same related key score, the key selector 130 is optionally configured to select, for instance, one of the keys whose candidate score calculated by the key candidate determiner 120 is relatively high as the key of the music piece.
The music piece key information output unit 140 outputs the music piece key information 141 for presentation to a user, for instance, by showing the music piece key information on a display. Alternatively, the music piece key information output unit 140 is optionally configured to output the music piece key information 141, for instance, to be recorded in association with the music piece in a form of metadata of the music data 111. With the use of the music piece key information 141 recorded in association with the music piece, for instance, the key of the music piece can be presented to a user when the music piece is to be played using the music data 111. Alternatively, when a DJ machine is used to combine music pieces to make a mix, the music piece to be a candidate(s) for the mix is optionally automatically presented to a user based on the music piece key information 141 recorded in association with the music piece.
In the present exemplary embodiment, the key of a music piece can be highly accurately and appropriately estimated through the determination of the related key. Accordingly, for instance, when a mix is to be prepared with use of a DJ machine as in the above example, an accurate key of the music piece can be presented to a user or a music piece to be a candidate can be automatically presented to a user based on the accurate key of the music piece, thereby allowing preparation of a high-quality mix. The estimation of the accurate key of a music piece is also of great use in the other applications (specifically, in karaoke, creation of a music piece and the like).
Suitable exemplary embodiments of the invention have been detailed above with reference to the attached drawings. However, the scope of the invention is not limited by the exemplary embodiment. It would be obvious for those skilled in the art to which the invention pertains that various modifications and revisions are conceivable within the technical idea described within claims, and it is understood that such modifications and revisions are naturally within the technical scope of the invention.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2019/023929 | 6/17/2019 | WO |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2020/255214 | 12/24/2020 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
20130289756 | Resch | Oct 2013 | A1 |
20140366710 | Eronen | Dec 2014 | A1 |
20170358302 | Orr | Dec 2017 | A1 |
20180357991 | Barry | Dec 2018 | A1 |
Number | Date | Country |
---|---|---|
5-273976 | Oct 1993 | JP |
2018-25644 | Feb 2018 | JP |
2010137074 | Dec 2010 | WO |
Entry |
---|
International Search Report dated Jul. 30, 2019, Application No. PCT/JP2019/023929; English translation included, 2 pages. |
International Preliminary Report on Patentability dated Dec. 21, 2021, 5 pages. |
Number | Date | Country | |
---|---|---|---|
20220262331 A1 | Aug 2022 | US |