Music data processing device, method and program
The music data processing device uses FFT-based phase error calculations to accurately determine tuning values and chord progressions, addressing the limitations of existing methods in detecting continuous frequencies in synthetic sound data and multiple instrument tones.
Patent Information
- Application Number
- JP2023061216
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-04-05
- Publication Date
- 2024-10-18
AI Technical Summary
Existing methods struggle to accurately determine tuning values and chord progressions in music data, especially when dealing with synthetic sound data or multiple instrument tones, as autocorrelation functions fail to detect continuous frequency values, and FFT analysis results are unsuitable for continuous frequency detection.
A music data processing device that utilizes a fast Fourier transform (FFT) to calculate phase errors and frequency deviations, enabling accurate tuning value determination by processing music data based on phase shifts and frequency corrections.
Enables accurate tuning values and chord progression determination, allowing instruments to play in time with songs and improving chord recognition accuracy.
Smart Images

Figure 2024148250000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a technique for processing to specify a tuning value from music data and a technique for processing to determine a chord. [Background technology]
[0002] The tuning value (for example, the frequency of an A4 note) can be identified from the music data of the audio signal using an autocorrelation function if it is a single note. In addition to the autocorrelation function method, the Fourier transform is also a method often used to analyze acoustic signals. In particular, the FFT (Fast Fourier Transform) method allows for high-speed processing on a computer and is used in many signal analyses.
[0003] Furthermore, a technique is also known that enables chord determination by combining FFT and chroma vector techniques (eg, Non-Patent Document 1). [Prior art documents] [Non-patent literature]
[0004] [Non-Patent Document 1] Yasushi Matsuoka, Mizuki Watanabe, “Musical Chord Recognition Technology and Its Applications”, [online], NTT DOCOMO Technical Journal Vol. 25 No. 2, Jul. 2017, [Retrieved February 26, 2023], Internet <URL:https: / / www.docomo.ne.jp / binary / pdf / corporate / technology / rd / technical_journal / bn / vol25_2 / vol25_2_004jp.pdf> Summary of the Invention [Problem to be solved by the invention]
[0005] However, when the target data is chord sounds or synthetic sound data made up of multiple instrument sounds, the method using the autocorrelation function cannot be applied to detect the tuning value. In addition, the frequency information in the analysis results obtained by FFT is a combination of discrete values for each FFT bin number, which means that it is not suitable for detecting frequencies that take continuous values, such as the tuning value of an entire piece of music.
[0006] An object of the present invention is to obtain accurate tuning values that are necessary when playing a musical instrument along with a piece of music or when determining the chord progression of a piece of music. [Means for solving the problem]
[0007] One example of a music data processing device includes a processor that processes music data based on the results of a fast Fourier transform performed on input data generated from music data input for each processing unit, and for each bin number corresponding to the calculation point of the fast Fourier transform, the processor calculates a phase error by subtracting the result of adding a standard phase shift, which is the amount of phase that should be shifted when the processing unit advances by one unit at the bin number frequency corresponding to the bin number, to the phase in the current processing unit, which is the calculation result, from the phase in the previous processing unit, which is the calculation result. Effect of the Invention
[0008] According to the present invention, it is possible to obtain accurate tuning values that are necessary when playing an instrument in accordance with a piece of music or when determining the chord progression of a piece of music. [Brief description of the drawings]
[0009] [Figure 1] 1 is a block diagram showing an example of the hardware configuration of a music data processing device. [Diagram 2] FIG. 4 is a block diagram of a chord determination processing unit. [Diagram 3] 13 is a flowchart illustrating an example of processing by a tuning value specifying unit. [Figure 4]13 is a flowchart showing an example of processing by a chroma vector generating unit ((a)) and an example of processing by a chord determining unit ((b)). [Diagram 5] FIG. 13 is a diagram showing an example of a chord constituent note table. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. Fig. 1 is a block diagram showing an example of the hardware configuration of a music data processing device 100 that can specify a tuning value for music data and perform chord determination based on the specified tuning value.
[0011] The music data processing device 100 is a user terminal that is a personal computer such as a smartphone terminal, a tablet terminal, or a so-called notebook computer operated by a user. In the music data processing device 100, at least one processor, a CPU (Central Processing Unit) 101, a ROM (Read Only Memory) 102, a RAM (Random Access Memory) 103, an input unit 104 and a display / output unit 105 constituted by, for example, a touch panel display, and a communication unit 106 connected to, for example, the Internet or a local area network for communicating with a server device or other user terminals, are all connected to one another by a system bus 107. Other blocks that are generally provided in a user terminal and are not directly related to the operation of this embodiment (for example, a microphone, a speaker, a calling function, a camera, etc.) are omitted, but it goes without saying that these blocks may also be provided.
[0012] The CPU 101 executes a control program stored in the ROM 102 while using the RAM 103 as a work memory, thereby executing the control operations of the music data processing device 100 in Fig. 1. The ROM 102 also stores the above-mentioned control program and various fixed data, as well as data such as the "chord constituent note table" in Fig. 5, which will be described later. The control program etc. do not have to be pre-stored in the ROM 102, but may be downloaded as appropriate from the Internet etc. via the communication unit 106 and installed.
[0013] A detailed description will be given below of an example of the processing of this embodiment executed by the computer of Fig. 1. When referring to "CPU 101", "ROM 102", "RAM 103", etc., this refers to the CPU 101, ROM 102, or RAM 103 of Fig. 1.
[0014] First, the following physical units are defined by the following formula (1). Sample rate: SR (samples per second) FFT processing rate: PR (times / sec) FFT window size: WL (sample) Processing unit: PU=SR / PR (sample / time) (1) The processing unit PU is a processing unit that is handled collectively at one time.
[0015] Fig. 2 is a block diagram of a chord determination processing unit 200 constituted by the CPU 101 and the like of the music data processing device 100 of Fig. 1. The chord determination processing unit 200 executes processes described below within the music data processing device 100, and the corresponding hardware includes at least one of the CPU 101, ROM 102, and RAM 103 as described above. The program executed by the chord determination processing unit 200 is stored in ROM 102 when the user terminal, which is the music data processing device 100 of Figure 1, is shipped from the factory, and the user can load it from ROM 102 to RAM 103 when using the device. Alternatively, the program executed by the chord determination processing unit 200 can be operated by a user by downloading and installing, for example, a so-called app (application) having the functions of the chord determination processing unit 200 from the website of a vendor company that provides the app, via a network such as the Internet, from the communication unit 106 in Figure 1 to the RAM 103 on the user terminal of the music data processing device 100.
[0016] The chord determination processing unit 200 is roughly composed of a tuning value specifying unit 201 , a chroma vector generating unit 202 , and a chord determination unit 203 .
[0017] The tuning value specifying unit 201 executes a waveform data reading process S210, an amplitude / phase calculation process S211, a phase error calculation process S212, a frequency specification process S213, and a tuning value specification process S214.
[0018] The chroma vector generating unit 202 executes an 88-tone chroma vector generating process S220 and a 12-tone chroma vector generating process S221.
[0019] The chord determination unit 203 executes a beat tracking process S230 and a chord determination process S231.
[0020] FIG. 3 is a flowchart showing a more detailed example of the processing performed by the tuning value specifying unit 201 in FIG. The CPU 101 mainly handles information such as [FFT window data], [complex data] ([amplitude] [phase]), [phase error], [current frequency] and [temporary scale], [temporary scale integer part] and [temporary scale decimal part], [temporary scale decimal part gravity center], and [tuning value], which are listed as "main information" in the block of the tuning value determination unit 201 in Figure 2, as variables stored in the RAM 103.
[0021] In FIG. 3, CPU 101 sequentially loads waveform data of the music data to be subjected to chord determination, which has been loaded from ROM 102 or an external network (such as the Internet) via communication unit 106, into RAM 103 in processing units PU [samples / time]=SR (sampling rate [samples / second]) / PR (FFT processing rate [times / second]) defined in the above-mentioned equation (1). Here, it first determines whether reading and processing of the waveform data up to the final data has been completed (step S300 in FIG. 3).
[0022] If the final data has not been processed and the determination in step S300 is NO, the CPU 101 executes the waveform data read process S210 described in Fig. 2. Specifically, the CPU 101 reads new waveform data of the PU sample into the RAM 103, and sets FFT window data having an FFT window size WL [samples] defined by equation (1) from, for example, the ROM 102 into, for example, the RAM 103 or a FIFO (First In, First Out) buffer such as a register built into the CPU 101 (not shown).
[0023] Next, the CPU 101 executes the amplitude / phase calculation process S211 described with reference to FIG.
[0024] Specifically, CPU 101 first multiplies the sample of the music data on RAM 103 by the sample of the FFT window data in the FIFO buffer for each corresponding sample, so that the center sample of the latest processing unit PU (sample) of the music data currently loaded into RAM 103 for each processing unit PU [sample] matches the center sample of the FFT window data set in the FIFO buffer.
[0025] Next, the CPU 101 executes an FFT operation on the multiplication result data for the FFT window size WL [samples].
[0026] Furthermore, for each FFT bin number bin (hereinafter referred to as "bin number bin") obtained as a result of the FFT operation, the CPU 101 acquires complex data that is the result of the FFT operation, and calculates the amplitude and phase from the complex data. Here, the number of operation points of the FFT operation is equal to the FFT window size WL [samples], but the operation results from 0 to (WL / 2)-1 and the operation results from WL / 2 to WL-1 are in a mirror image relationship. Therefore, the bin number bin corresponds to the number of operation points of the FFT and takes a value of 0 ≦ bin < FFT window size WL / 2, which is half of the number of operation points. Now, assuming that the real part of the complex data at the bin number bin is re(bin) and the imaginary part is im(bin), the amplitude Amp(bin) and phase Phs(bin) at the bin number bin are calculated by the respective operations shown in the following equations (2) and (3).
[0027] Amp(bin)=Sqrt(re(bin)×re(bin) +im(bin)×im(bin)) ···(2) Here, "Sqrt(n)" is an operation function that calculates the square root of n. Phs(bin)=Atan(im(bin),re(bin)) ···(3) Here, "Atan(y,x)" is an operation function that calculates the arctangent of y with respect to x.
[0028] Returning to the description of FIG. 3, after the above amplitude / phase calculation process S211, the CPU 101 executes the phase error calculation process S212 described in FIG. 2.
[0029] Specifically, the CPU 101 first calculates the FFT bin frequency BFQ(bin) (bin number frequency) by the operation shown in the following equation (4) for each bin number bin (0 ≦ bin < FFT window size WL / 2) corresponding to the number of operation points of the FFT.
[0030] BFQ(bin)=SR×bin / WL ···(4)
[0031] As shown in the above formula (4), the FFT bin frequency BFQ(bin) (Hz=1 / sec) is calculated by multiplying the ratio of the bin number bin to the FFT window size WL (samples) by the sample rate SR (number of samples / sec) of the music data. In other words, the FFT bin frequency BFQ(bin) is a frequency that is determined depending on the FFT calculation point indicated by the bin number bin.
[0032] Next, for each bin number bin, CPU 101 calculates the standard phase displacement NPD(bin), which is the amount of phase displacement that should occur when the processing unit PU advances by one unit (=SR / PR [samples]), based on the FFT bin frequency BFQ(bin) calculated by the calculation shown in the above equation (4), by the calculation shown in the following equation (5).
[0033] NPD(bin)=2π×BFQ(bin)×PU / SR (5) Here, π is the constant of the circumference of a circle.
[0034] Next, for each bin number bin, the CPU 101 calculates, by the operation shown in equation (6), the phase error ePhs(bin) obtained by subtracting the result of adding the standard phase displacement NPD(bin) calculated by the operation shown in equation (5) to the phase Phs0(bin) calculated by the operation shown in equation (3) for the previous processing unit, which is calculated in the same way, from the phase Phs1(bin) for the current processing unit, which is calculated by the operation shown in equation (3) from the complex data that is the result of the FFT operation.
[0035] ePhs(bin)=Phs1(bin)-(Phs0(bin) +NPD(bin))%(2π) (6) The sample rate SR [number of samples / second], FFT processing rate PR [times / second], and FFT window size WL [samples] defined in equation (1) are adjusted so that the phase error ePhs(bin) does not exceed the range of ±π. Here, "%" is a modulus calculation formula, and the right-hand side of equation (6) means the remainder when divided by 2π.
[0036] Adding the standard phase displacement NPD(bin) calculated by the operation shown in equation (5) to the phase Phs0(bin) in the previous processing unit should originally match the phase Phs1(bin) in the current processing unit. However, in reality, for cases where the frequency of the music data is different from the FFT bin frequency BFQ(bin) calculated by the operation shown in equation (4), the above two do not match. Therefore, due to the operations shown in the above equations (4), (5), and (6), the difference between Phs1(bin) and (Phs0(bin) + NPD(bin)) % (2π) is calculated as the phase error ePhs(bin).
[0037] Returning to the description of FIG. 3, after the above phase error calculation process S212, the CPU 101 executes the frequency identification process S213 described in FIG. 2.
[0038] Specifically, the CPU 101 first calculates the current frequency cFq(bin) and the virtual scale vNt(bin) from the phase error ePhs(bin) calculated in the phase error calculation process S212 for each bin number bin (0 ≤ bin < FFT window size WL / 2). By dividing the result of adding the phase error ePhs(bin) calculated by the operation shown in equation (6) to the standard phase displacement NPD(bin) calculated by the operation shown in equation (5) by the standard phase displacement NPD(bin), the ratio of the actual phase to the standard phase displacement NPD(bin) can be calculated. Therefore, the CPU 101 calculates the current frequency cFq(bin) for each bin number bin by multiplying the FFT bin frequency BFQ(bin) calculated by the operation shown in equation (4) by that ratio through the operation shown in the following equation (7).
[0039] cFq(bin) = BFQ(bin) × (NPD(bin) + ePhs(bin)) / NPD(bin) ···(7)
[0040] Further, for each bin number bin, the CPU 101 calculates a tentative pitch vNt(bin) by the operation represented by the following equation (8) using the current frequency cFq(bin) calculated by the operation represented by equation (7).
[0041] vNt(bin)=Log(cFq(bin) / 440.0,2.0)×12 +69 ···(8) Here, "69" is the pitch number of the A4 note. Also, Log(x,2.0) is an operation function that calculates the logarithm with base 2 for x. As shown in the above equation (8), the tentative pitch vNt(bin) at the bin number bin can be calculated by dividing the current frequency cFq(bin) at the bin number bin by the frequency 440 Hz of the A4 reference tone, which is the first tone frequency of any one pitch, calculating the base-2 logarithm of the result, multiplying the result by 12, and adding the A4 pitch number = 69.
[0042] Subsequently, when the total value of the amplitudes Amp(bin) of the complex data calculated by the operation represented by equation (2) for all bin numbers bin (0 ≦ bin < FFT window size WL / 2) is equal to or greater than a certain value, the CPU 101 rounds the fractional part of the tentative pitch vNt(bin) calculated by the operation represented by equation (8) for each bin number bin as shown in the following equation (9) to calculate the tentative pitch integer part ivNt(bin).
[0043] ivNt(bin)=Rounding result of the fractional part of vNt(bin) ···(9)
[0044] Furthermore, the CPU 101 subtracts the tentative pitch integer part ivNt(bin) calculated by the operation represented by equation (9) from the tentative pitch vNt(bin) calculated by the operation represented by equation (8) for each bin number bin as shown in the following equation (10) to calculate the tentative pitch fractional part fvNt(bin).
[0045] fvNt(bin)=vNt(bin)-ivNt(bin) ···(10)
[0046] Since the calculation shown in formula (9) is a rounding calculation, the provisional scale decimal part fvNt(bin) calculated by the calculation shown in formula (10) falls within the range of -0.5 or more and less than 0.5. The provisional scale decimal part fvNt(bin) calculated by the calculation shown in equation (10) can be considered as the scale deviation amount for each bin number bin.
[0047] The CPU 101 further calculates the provisional scale decimal part center of gravity Flt, which is the center of gravity of the provisional scale decimal part fvNt(bin) and the amplitude Amp(bin) (see equation (2)) in the range of bin numbers bin in which the provisional scale integer part ivNt(bin) calculated by the calculation shown in equation (9) is within a predetermined range (e.g., 36 (C2) to 95 (B6)), by the calculation shown in the following equation (11).
number
[0048] 3, after the above frequency identification process S213, the CPU 101 returns to the determination process of step S300. In this manner, the CPU 101 repeatedly executes the waveform data read process S210, the amplitude / phase calculation process S211, the phase error calculation process S212, and the frequency identification process S213 until it determines that the processes from the waveform data read process S210 to the frequency identification process S213 are completed by reading the target music data up to the final data for each processing unit PU [sample] defined by the formula (1). By this repetitive process, the CPU 101 can calculate the provisional scale decimal part gravity center Flt, which is the scale deviation amount for each processing unit, for each processing unit PU [sample] from the beginning to the end of the music data.
[0049] When the music data for which chord determination is to be performed is read up to the final data for each processing unit PU [sample] and the processing from the waveform data reading process S210 to the frequency identification process S213 is completed and the determination in step S300 in Figure 3 becomes YES, the CPU 101 executes the tuning value identification process S214 described in Figure 2.
[0050] Specifically, the CPU 101 first calculates a provisional scale decimal part gravity center average value aFlt, which is the average value of each provisional scale decimal part gravity center Flt obtained for each processing unit PU [sample] from the beginning to the end of the music data. This provisional scale decimal part gravity center average value aFlt can be said to correspond to the amount of scale deviation of the entire music piece data.
[0051] Then, the CPU 101 uses the calculated provisional scale decimal part gravity center average value aFlt to determine the tuning value sTun by the calculation shown in the following equation (12).
[0052] sTun=440.0×Pow(2.0,aFlt / 12) ···(12) Here, Pow(x, y) is an arithmetic function that calculates the power of x to the y power.
[0053] In the operation represented by the above equation (12), the CPU 101 calculates the pitch deviation rate per scale by performing the operation of "2 to the power of [the result value obtained by dividing the virtual pitch decimal part centroid average value aFlt corresponding to the pitch deviation amount of the entire music data by 12]", and multiplies the pitch deviation rate by the first pitch frequency of an arbitrary scale, for example, the frequency 440.0 (Hz) of the A4 reference pitch, to calculate the tuning value sTun for the music data.
[0054] As described above, the tuning value sTun for the entire music data can be calculated by the process of the tuning value specifying unit 201 shown in the flowchart of FIG. 3 in FIG. 2.
[0055] FIG. 4(a) is a flowchart showing a more detailed processing example of the chroma vector generation unit 202 in FIG. 2. The CPU 101 mainly treats information such as [true scale], [88-tone chroma vector], and [12-tone chroma vector], which are described as "main information" in the block of the chroma vector generation unit 202 in FIG. 2, as variables stored in the RAM 103.
[0056] The CPU 101 first executes the 88-tone chroma vector generation process S220 described in FIG. 2.
[0057] Specifically, the CPU 101 calculates the true scale sNt(bin) for each bin number bin based on the tuning value sTun for the entire music data calculated by the operation represented by the equation (12) in the tuning value specifying unit 201 in FIGS. 2 and 3 and the current frequency cFq(bin) for each bin number bin (0 ≦ bin < FFT window size WL / 2) calculated by the operation represented by the equation (7) in the frequency specifying process S213 in FIG. 2, by the operation represented by the following equation (13).
[0058] sNt(bin)=Log(cFq(bin) / sTun,2.0)×12+69 ···(13) Here, just as when the provisional scale vNt(bin) was calculated by the calculation shown in formula (8), "69" is the scale number of the note A4. As shown in the above equation (13), the true scale sNt(bin) at bin number bin can be calculated by dividing the current frequency cFq(bin) at bin number bin by the tuning value sTun calculated by the calculation shown in equation (12), calculating the logarithm to base 2 of the result, multiplying it by 12, and adding it to the A4 scale number = 69.
[0059] Next, the CPU 101 calculates the true scale integer part iNt(bin) by truncating the decimal part of the true scale sNt(bin) calculated by the operation shown in equation (13) for each bin number bin, as shown in the following equation (14).
[0060] iNt(bin) = Result of truncating the decimal part of sNt(bin) (14)
[0061] Furthermore, the CPU 101 calculates the true scale decimal part fNt(bin) by subtracting the true scale integer part iNt(bin) calculated by the calculation shown in equation (14) from the true scale sNt(bin) calculated by the calculation shown in equation (13) for each bin number bin, as shown in the following equation (15).
[0062] fNt(bin)=sNt(bin)-iNt(bin) ···(15)
[0063] Since the formula (14) is a truncation operation, the true scale fraction part fNt(bin) calculated by the operation shown in the formula (15) falls within the range of 0.0 or more and less than 1.0.
[0064] Next, the CPU 101 distributes and synthesizes, for each bin number bin, the amplitude Amp(bin) calculated by the calculation shown in equation (2) to a predetermined scale range based on the true scale integer part iNt(bin) calculated for each bin number bin by the calculation shown in equation (14) and the true scale decimal part fNt(bin) calculated for each bin number bin by the calculation shown in equation (15), to generate a chroma vector CRV[n], which is a vector whose feature is the amplitude intensity of the frequency for each of the scales.
[0065] More specifically, if the 88-note chroma vector is represented as CRV88[n] (n: 0 to 87) for the entire range of the music data, for example, the 88 notes from A0 (21) to C8 (108), the CPU 101 generates the 88-note chroma vector CRV88[n] by each distribution (synthesis) calculation shown in the following equations (16) and (17).
[0066] CRV88[iNt(bin)-21]+=Amp(bin) ×(1.0-fNt(bin)) (16) CRV88[iNt(bin)+1-21]+=Amp(bin) ×fNt(bin) (17) Here, "+=" is a compound assignment operator, which means adding the value on the left side of the expression to the value on the right side and assigning the result to the variable on the left side.
[0067] Returning to the explanation of FIG. 4(a), the CPU 101 executes the 12-tone chroma vector generation process S221 described with reference to FIG. 2 after the 88-tone chroma vector generation process S220.
[0068] Specifically, the CPU 101 performs noise removal based on the minimum value of the three adjacent scales (n-1, n, n+1) of the 88-tone chroma vector CRV88[n] (n: 0 to 87) calculated by each calculation shown in equations (16) and (17), and then performs a re-synthesis calculation to round it down to 12 scales. Here, if the 12-tone chroma vector is represented as CRV12[m] (m: 0 to 11), this is calculated by the resynthesis calculation shown in the following equation (18).
[0069] CRV12[(n+21)%12]+=CRV88[n] ···(18) Here, n: 0 to 87, %12: A modulo operation by dividing by 12.
[0070] In this manner, the 88-tone chroma vector CRV88[n] (n: 0 to 87) and the 12-tone chroma vector CRV12[m] (m: 0 to 11) can be generated by the processing of the chroma vector generation unit 202 in FIG. 2 shown in the flowchart in FIG. 4(a).
[0071] FIG. 4B is a flowchart showing a more detailed example of the process of the chord determination unit 203 in FIG. The CPU 101 mainly handles information such as [beat tracking information] (tempo value, bar position, beat position), [beat length 12-note chroma vector], [chord constituent note table], and [chord determination result], which are described as "main information" in the block of the chord determination unit 203 in Figure 2, as variables stored in the RAM 103.
[0072] First, the CPU 101 executes the beat tracking process S230 described with reference to FIG.
[0073] Specifically, the CPU 101 detects the [beat tracking information] (tempo value, bar position, beat position) from changes in the volume and constituent tones of the music data, for example, changes in the 12-tone chroma vector CRV12[m] calculated in the 12-tone chroma vector generation process S221 in Figure 4(a) by the calculation shown in equation (18) in the chroma vector generation unit 202 in Figure 2.
[0074] Next, the CPU 101 executes the chord determination process S231 described with reference to FIG.
[0075] Specifically, the CPU 101 determines the time length for chord determination based on the [beat tracking information] calculated in the beat tracking process S230 of Figure 4 (b), and creates a [beat length 12-tone chroma vector] whose element value is the sum of each element value of the 12-tone chroma vector CRV12[m] obtained by the calculation shown in equation (18) for the corresponding time length.
[0076] Furthermore, CPU 101 multiplies the above [beat length 12 note chroma vector] by the value of the [chord constituent note table] weighted by the constituent notes / non-constituent notes of the chord, using the calculation shown in the following equation (19), and stores the chord with the largest total in the [chord determination result].
[0077] The maximum value of [Beat length 12 note chroma vector] x [Chord composition note table] →[Code Judgment Result] ···(19) The CPU 101 shifts the chord constituent note table 12 times depending on the root note.
[0078] Fig. 5 shows a table of weighting configuration examples for the [Chord Constituent Note Table] with C (do) as the base (root note). The table in Fig. 5(a) shows the case of a major chord, and the table in Fig. 5(b) shows the case of a minor chord. In Fig. 5, the constituent notes are weighted with positive values, and for triads, each is weighted with 20 (total 60). Non-constituent notes are weighted with negative values, and the major and minor thirds, which are the difference between major and minor chords, are weighted with particularly large absolute values.
[0079] As described above, according to this embodiment, it is possible to easily perform tuning operations by identifying accurate tuning values when playing an instrument in accordance with a piece of music. Furthermore, it is possible to obtain more accurate chord determination results based on these tuning values. The above-described embodiment is presented as an example, and is not intended to limit the scope of the invention. The present embodiment can be implemented in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. The present embodiment and its modifications are included in the scope and gist of the invention, and are included in the scope of the invention and its equivalents described in the claims. [Explanation of symbols]
[0080] 100 Music data processing device 101 CPU 102 ROM 103 RAM 104 Input section 105 Display / Output section 106 Communications Department 107 System Bus 201 Tuning value specification unit 202 Chroma Vector Generation Unit 203 Code Judgment Section
Claims
1. a processor for processing the music data based on a result of a fast Fourier transform performed on input data generated from the music data input for each processing unit; The processor, For each bin number corresponding to an operation point of the fast Fourier transform, a deviation amount obtained by subtracting a result of adding a standard phase shift, which is a phase amount that should be shifted when the processing unit advances by one unit under a bin number frequency corresponding to the bin number, to the phase in the previous processing unit, which is the operation result, from the phase in the current processing unit, which is the operation result, is calculated as a phase error. Music data processing device.
2. Calculating a current frequency, which is a frequency obtained by multiplying a bin number frequency by a ratio of a result of adding the phase error to the standard phase shift, for each bin number; Calculating a provisional scale based on a ratio of the current frequency to a frequency of a reference tone, and calculating a scale deviation amount based on a decimal part of the provisional scale; calculating a tuning value for the music piece data based on the amount of musical scale deviation; The music data processing device according to claim 1 .
3. a processor for processing the music data based on a result of a fast Fourier transform performed on input data generated from the music data input for each processing unit; The processor, for each bin number corresponding to an operation point of the fast Fourier transform, a deviation amount obtained by subtracting a result of adding a standard phase shift, which is a phase amount that should be shifted when the processing unit advances by one unit under a bin number frequency corresponding to the bin number, to the phase in the previous processing unit, which is the operation result, from the phase in the current processing unit, which is the operation result, is calculated as a phase error; Identifying a current frequency for each bin number based on the phase error; determining a chord in the music data based on the current frequency for each of the identified bin numbers; Music data processing device.
4. The code determination is as follows: For each bin number corresponding to an operation point of the fast Fourier transform, a true scale for the bin number is calculated based on a tuning value for the music data and the current frequency calculated for the bin number; Based on the integer part and decimal part of the true scale calculated for each bin number and the amplitude for each bin number calculated from the calculation result, the amplitude value is distributed and synthesized to a scale of a predetermined scale range, thereby generating a chroma vector, which is a vector having the amplitude intensity of the frequency for each scale of the scale as a feature value; determining a chord in the music data based on the chroma vector; The music data processing apparatus according to claim 3, further comprising:
5. 4. The music data processing device according to claim 1, wherein the processor calculates the bin number frequency corresponding to the bin number by multiplying a ratio of the bin number to a window size of window data by which the music data is multiplied for each sample prior to the fast Fourier transform by a sample rate of the music data.
6. the processor executes an operation of calculating the decimal part of the provisional scale as a scale deviation amount for each bin number for each bin number within a predetermined range in one of the processing units to calculate a scale deviation amount for each processing unit corresponding to the one processing unit, and further executes an operation of calculating the scale deviation amount for each of the processing units across the entire music piece data to calculate the scale deviation amount as a music scale deviation amount corresponding to the music piece data from the calculated scale deviation amounts for each processing unit; The music data processing device according to claim 2 .
7. The music data processing device according to claim 2 , wherein the processor calculates a scale deviation rate per scale from the scale deviation amount, and multiplies the rate by a first note frequency of the arbitrary scale to calculate a tuning value for the music data.
8. The processor, generating, as the chroma vectors, an n-tone chroma vector corresponding to an n-tone scale of n tones (n>12) in the entire range of the music data, and a 12-tone chroma vector corresponding to the 12-tone scale by rounding the n-tone chroma vector to a 12-tone scale; Detecting a tempo value, a bar position, and a beat position as beat tracking information based on the change in the twelve-tone chroma vector; determining a time length for chord determination based on the beat tracking information, and generating a beat length 12-tone chroma vector having an element value that is a sum of each element value of the 12-tone chroma vector for the time length; multiplying the 12-note chroma vector with a value from a chord constituent note table weighted by constituent notes / non-constituent notes of the chord, and outputting the chord with the maximum total as the chord determination result; The music data processing device according to claim 4.
9. a processor for processing the music data based on a result of a fast Fourier transform performed on input data generated from the music data input for each processing unit; a process of calculating a phase error, which is a deviation amount when comparing a phase difference between a phase in the previous processing unit and a phase in the current processing unit, which are calculated from the calculation results, for each bin number corresponding to a calculation point of the fast Fourier transform, with a standard phase shift, which is a phase amount that should be shifted when the processing unit advances by one unit under a bin number frequency corresponding to the calculation point of the bin number; A music data processing method for executing the above.
10. A process of calculating a current frequency, which is a frequency obtained by multiplying the bin number frequency by a ratio of a result of adding the phase error to the standard phase shift for each bin number; A process of calculating a provisional scale based on a ratio of the current frequency to a frequency of a reference tone, and calculating a scale deviation amount based on a decimal part of the provisional scale; calculating a tuning value for the music piece data based on the scale deviation amount; The music data processing method according to claim 9, for executing the above.
11. a processor for processing the music data based on a result of a fast Fourier transform performed on input data generated from the music data input for each processing unit; a process of calculating, for each bin number corresponding to an operation point of the fast Fourier transform, a deviation amount obtained by subtracting a result of adding a standard phase shift, which is a phase amount that should be shifted when the processing unit advances by one unit under a bin number frequency corresponding to the bin number, to the phase in the previous processing unit, which is the operation result, from the phase in the current processing unit, which is the operation result, as a phase error; A process of identifying a current frequency for each bin number based on the phase error; determining a chord in the music data based on the current frequency for each of the identified bin numbers; A music data processing method for executing the above.
12. The process of determining the code includes: calculating a true scale for each bin number corresponding to a calculation point of the fast Fourier transform based on a tuning value for the music data and the current frequency calculated for the bin number; A process of distributing and synthesizing the amplitude values to a scale of a predetermined scale range based on the integer part and the decimal part of the true scale calculated for each bin number and the amplitude for each bin number calculated from the calculation result, thereby generating a chroma vector, which is a vector having the amplitude intensity of the frequency for each scale of the scale of the number of notes as a feature value; A process of determining a chord in the music data based on the chroma vector; The music data processing method according to claim 11 , further comprising:
13. a computer that processes music data based on a result of a fast Fourier transform performed on input data generated from the music data input for each processing unit, a process of calculating a phase error, which is a deviation amount when comparing a phase difference between a phase in the previous processing unit and a phase in the current processing unit, which are calculated from the calculation results, for each bin number corresponding to a calculation point of the fast Fourier transform, with a standard phase shift, which is a phase amount that should be shifted when the processing unit advances by one unit under a bin number frequency corresponding to the calculation point of the bin number; A program for executing.
14. A process of calculating a current frequency, which is a frequency obtained by multiplying the bin number frequency by a ratio of a result of adding the phase error to the standard phase shift for each bin number; A process of calculating a provisional scale based on a ratio of the current frequency to a frequency of a reference tone, and calculating a scale deviation amount based on a decimal part of the provisional scale; calculating a tuning value for the music piece data based on the scale deviation amount; The program according to claim 13 for executing the above-mentioned.
15. a computer that processes music data based on a result of a fast Fourier transform performed on input data generated from the music data input for each processing unit, a process of calculating, for each bin number corresponding to an operation point of the fast Fourier transform, a deviation amount obtained by subtracting a result of adding a standard phase shift, which is a phase amount that should be shifted when the processing unit advances by one unit under a bin number frequency corresponding to the bin number, to the phase in the previous processing unit, which is the operation result, from the phase in the current processing unit, which is the operation result, as a phase error; A process of identifying a current frequency for each bin number based on the phase error; determining a chord in the music data based on the current frequency for each of the identified bin numbers; A program for executing the above.
16. The process of determining the code includes: calculating a true scale for each bin number corresponding to a calculation point of the fast Fourier transform based on a tuning value for the music data and the current frequency calculated for the bin number; A process of distributing and synthesizing the amplitude values to a scale of a predetermined scale range based on the integer part and the decimal part of the true scale calculated for each bin number and the amplitude for each bin number calculated from the calculation result, thereby generating a chroma vector, which is a vector having the amplitude intensity of the frequency for each scale of the scale of the number of notes as a feature value; A process of determining a chord in the music data based on the chroma vector; The program according to claim 15 .
Citation Information
Patent Citations
Chord name detecting device and program for chord name detection
JP2008040283A
Tuning estimation device, evaluation device, and data processor
JP2017090671A
Musical instrument sound recognition device
JP2018025613A
Code presentation method and program
JP2019139061A
