The present invention relates to a music piece analyzer and a music piece analysis program.
It has been typically known to extract specific instrumental sounds from music piece data and analyze a music piece in terms of a beat position, bar position and the like on a basis of a rhythm pattern and the like of the extracted instrumental sounds.
Patent Literature 1 discloses a technique of extracting an attack sound of a snare drum to differentiate the attack sound from instrumental sounds (e.g., voice and piano) other than the snare drum, by subtracting amplitude data of the music piece after an elapse of a predetermined time from an attack position of the snare drum.
Patent Literature 1: JP2015-125239 A
However, since various instrumental sounds coexist in the music piece data, the technique of Patent Literature 1 cannot necessarily accurately specify sounding positions of the snare drum.
An object of the invention is to provide a music piece analyzer and a music piece analysis program, which are capable of accurately specifying sounding positions of a snare drum from music piece data.
According to an aspect of the invention, a music piece analyzer includes: a beat interval acquiring unit configured to acquire a beat interval of music piece data; a candidate detector configured to detect sounding positions where a change amount for sounding is equal to or more than a predetermined threshold in the music piece data, as candidates for sounding positions of the snare drum; and a sounding position determination unit configured to determine that the candidates for the sounding positions at a two-beat interval calculated by the beat interval acquiring unit in the music piece data are the sounding positions of the snare drum, among the candidates for the sounding positions of the snare drum.
According to another aspect of the invention, a music piece analysis program enables a computer to function as: a beat interval acquiring unit configured to acquire a beat interval of music piece data; a candidate detector configured to detect sounding positions where a change amount for sounding is equal to or more than a predetermined threshold in the music piece data, as candidates for sounding positions of the snare drum; and a sounding position determination unit configured to determine that the candidates for the sounding positions at a two-beat interval calculated by the beat interval acquiring unit in the music piece data are the sounding positions of the snare drum, among the candidates for the sounding positions of the snare drum.
1. Concept of Invention
The invention not only excludes attack sounds in a low frequency band through the HPF processing and the like as in a typical technique but also notes that a snare drum is often hit at the second and fourth beats. For instance, as shown in
Accordingly, in an exemplary embodiment of the invention, among candidates for sounding position of the snare drum, the candidates selected with reference to a large change in a sound level, the candidates having the large change in the sound level at a two-beat interval and a four-beat interval are used as the sounding positions of the snare drum. Specifically as shown in
2. Structure of Music Piece Analyzer 1
The music piece analyzer 1 analyzes the sounding positions of the snare drum in an inputted music piece data AD with reference to beat positions of the music piece data AD, enters the analyzed sounding positions of the snare drum in the music piece data AD, and stores the music piece data AD in the storage 3.
The music piece data AD in a form of digital data (e.g., WAV and MP3) has been analyzed in terms of the beat position of the music piece by FFT analysis and the like. The music piece data AD may be provided by importing music piece data, which has been played in a music player (e.g., CD player and DVD player), into the music piece analyzer 1 through a USB cable and the like, or may be provided by playing the digital music piece data stored in the storage 3.
The music piece analyzer 1 includes a beat interval acquiring unit 21, an HPF processor 22, a level detector 23, a candidate detector 24, and a sounding position determination unit 25, which are implemented as a music piece analysis program to be executed in the CPU 2.
The beat interval acquiring unit 21 acquires a beat interval obtained by analyzing the music piece data AD. Specifically, the beat interval acquiring unit 21 acquires, as a beat interval, a value obtained by multiplying a reciprocal number of a value of the detected BPM (Beats Per Minute) by 60 seconds. Although the beat interval is acquired from the music piece data AD having the BPM value analyzed in advance in the exemplary embodiment, the beat interval acquiring unit 21 may detect the BPM value through the FFT analysis and the like.
The HPF processor 22 subjects the music piece data AD to a HPF (Hi Pass Filter) processing, thereby excluding sounds in a low-pitch sound range (e.g., attack sounds of a bass drum) in the music piece data AD.
Specifically, the HPF processor 22 subjects the music piece data AD to a ⅛ downsampling and subjects the downsampled data to the HPF processing at a cutoff frequency of 300 Hz. For instance, the HPF processor 22 excludes attack sounds of a bass drum BD and attack sounds of a bass Bass from the music piece data AD in which sounds of the snare drum SD, vocal VO, bass drum BD, bass Bass coexist as shown in
The HPF processor 22 outputs the music piece data AD, which has been subjected to the HPF processing, to the level detector 23.
The level detector 23 subjects the music piece data AD, which has been subjected to the HPF processing, to the absolute-value conversion processing and, subsequently, to a smoothing processing, and detects a signal intensity level.
Specifically, after the HPF processing as shown in
The level detector 23 outputs the smoothed signal intensity level to the candidate detector 24.
The candidate detector 24 detects sounding positions where a change amount for sounding is equal to or more than a threshold for the processing in the music piece data AD, as candidates for sounding positions of the snare drum.
Firstly, the candidate detector 24 calculates differential data of the smoothed signal intensity level as shown in
Next, the candidate detector 24 divides the obtained change amount of the signal intensity level by four beats into blocks, thereby acquiring differential data of the signal intensity level per four beats as shown in
The candidate detector 24 sorts the differential data per block in a descending order and arranges the sorted differential data in a descending order starting from the largest change amount of the signal intensity level as shown in
The candidate detector 24 picks up the sorted differential data in each block in the descending order starting from the largest change amount as shown in
The candidate detector 24 terminates detecting the sounding positions as the candidates for the sounding positions of the snare drum when a difference from the next candidate in the change amount of the signal intensity level is equal to or less than a predetermined threshold.
The candidate detector 24 outputs the detected candidates for the sounding positions of the snare drum to the sounding position determination unit 25.
Among the candidates for the sounding positions of the snare drum detected by the candidate detector 24, the sounding position determination unit 25 identifies that the candidates for the sounding positions at a two-beat interval in the music piece data AD acquired by the beat interval acquiring unit 21 are the sounding positions of the snare drum.
Specifically, the sounding position determination unit 25 provides data by again sorting the candidates for the sounding positions of the snare drum in a temporal order as shown in
Next, among the candidates for the sounding positions of the snare drum, the sounding position determination unit 25 excludes the candidates for the sounding positions where no change amount of the signal level is observed at a two-beat interval and a four-beat interval, on a basis of the beat interval acquired by the beat interval acquiring unit 21.
The sounding position determination unit 25 determines that only the candidates for the sounding positions where the change amount of the signal level is observed at a two-beat interval and four-beat interval are the sounding position of the snare drum.
The sounding position determination unit 25 performs the above operation on all the blocks to specify the sounding positions of the snare drum in the music piece data AD.
The sounding position determination unit 25 enters the identified sounding positions of the snare drum into the music piece data AD, and stores the music piece data AD in the storage 3.
3. Operations and Advantages in Exemplary Embodiment
Next, operations in the exemplary embodiment will be described with reference to flowcharts shown in
The beat interval acquiring unit 21 acquires a beat interval of the music piece data AD (Step S1).
The HPF processor 22 subjects the music piece data AD to the HPF processing, thereby excluding sounds in a low-pitch sound range (e.g., attack sounds of a bass drum) in the music piece data AD (Step S2).
The level detector 23 subjects the HPF-processed signal intensity level to the absolute-value conversion processing, thereby calculating the signal intensity level in a form of an absolute value (Step S3).
The level detector 23 subjects the signal intensity level in a form of the absolute value to the smoothing processing (Step S4).
The candidate detector 24 calculates differential data of the smoothed signal intensity level, thereby calculating the change amount of the signal intensity level (Step S5).
The candidate detector 24 divides the change amounts of the signal intensity levels by four beats into blocks and sorts the differential data of the signal intensity level in each block in a descending order starting from the largest change amount (Step S6).
The candidate detector 24 sequentially detects sounding positions in an order starting from the sounding position having the largest signal intensity level, as the candidates for the sounding positions of the snare drum (Step S7).
The candidate detector 24 judges whether a difference in the change amount of the signal intensity level becomes equal to or less than a predetermined threshold (Step S8).
The candidate detector 24 continues to detect another candidate when the difference in the change amount is not equal to or less than the predetermined threshold.
The candidate detector 24 terminates detecting the candidates for the sounding positions of the snare drum when the difference in the change amount becomes equal to or less than the predetermined threshold.
The sounding position determination unit 25 sorts, in a temporal order, the candidates for the sounding positions of the snare drum detected by the candidate detector 24 (Step S9).
The sounding position determination unit 25 judges whether data on the change amounts of the signal levels sorted in a temporal order includes data on the change amount of the signal level at two-beat intervals before and after a current target candidate (Step S10).
When data on the change amount of the signal level at the two-beat interval and the four-beat interval exists, the sounding position determination unit 25 determines the data as the candidates for the sounding positions of the snare drum (Step S11).
However, when no data on the change amount of the signal level at the two-beat interval and the four-beat interval exists, the sounding position determination unit 25 excludes the data from the sounding positions of the snare drum (Step S12).
The sounding position determination unit 25 determines the sounding positions of the snare drum in the data of all the divided blocks (Step S13).
After determining the data of all the blocks, the sounding position determination unit 25 enters the sounding positions of the snare drum into the music piece data AD (Step S14).
The sounding position determination unit 25 stores the music piece data AD, in which the sounding positions of the snare drum is entered, in the storage 3 (Step S15).
According to the exemplary embodiment, the sounding position determination unit 25 determines that only the data with the change amounts of the signal levels at two-beat interval and four-beat interval are the sounding positions of the snare drum. Since the sounding positions at the second and fourth beats, which are characteristic of the snare drum, are thus identified as the sounding positions of the snare drum, a possibility of erroneously detecting the sounding positions of the snare drum is reducible.
Since the sounding positions of the snare drum are determined after the HPF processor 22 subjects the music piece data AD to the HPF processing, sounds in a low-pitch sound range (e.g., attack sounds of a bass drum and a bass) are excludable, so that the sounding positions of the snare drum can be more highly accurately identified.
In the step of determining whether to exclude the candidates, the determination can be further more accurately performed by checking the data not only at the two-beat interval before the candidates but also at the two-beat interval after the candidates.
Since the candidate detector 24 acquires the differential data as a unit of the block per four beats in the music piece data AD, the signal level having a large change amount at the second beat and the fourth beat in the music piece data AD can be easily specified, thereby facilitating identifying the sounding positions of the snare drum.
1 . . . music piece analyzer, 2 . . . CPU, 3 . . . storage, 21 . . . beat interval acquiring unit, 22 . . . HPF processor, 23 . . . level detector, 24 . . . candidate detector, 25 . . . sounding position determination unit, A . . . sound level, AD . . . music piece data, B . . . sound level, BD . . . bass drum, Bass . . . bass, SD . . . snare drum, VO . . . vocal.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2017/031000 | 8/29/2017 | WO | 00 |