Music data processing apparatus and method, and storage medium
Through fast Fourier transform and chroma vector technology, the problem of difficulty in detecting tuning values in chord tone or multi-instrument tone data is solved, and the accuracy of chord tuning value determination and chord determination in music performance is achieved.
Patent Information
- Application Number
- CN202410396801.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-04-05
- Filing Date
- 2024-04-02
- Publication Date
- 2024-10-15
AI Technical Summary
In the case of synthetic sound data composed of chord tones or multiple instrument tones, methods based on autocorrelation functions cannot effectively detect tuning values.
Using technology based on fast Fourier transform (FFT) and chroma vectors, the tuning value is determined by calculating the phase error and frequency, and the chord is determined based on the chord composition table.
It can accurately determine the tuning value of the chord when playing the music, improving the accuracy of the chord determination.
Smart Images

Figure CN118781997A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a technique for a process for determining a tuning value from music piece data and a process for performing chord determination. Background Art
[0002] Regarding the determination of the tuning value of the music data from the sound signal (for example, the frequency of the A4 tone), if it is a single tone, it can be detected using an autocorrelation function.
[0003] In addition to the autocorrelation function method, Fourier transform processing is also a method that is often used in the analysis of sound signals. In particular, the method based on FFT (Fast Fourier Transform) can be processed at high speed on a computer and is used in many signal analyses.
[0004] Furthermore, in "Musical Chord Recognition Technology and Its Applications", NTT DOCOMO Technical Journal Vol. 25 No. 2, July 2017, Matsuoka Yasushizu and Watanabe Mizuki, a technology that combines FFT and chroma vector technology to enable chord determination is also known.
[0005] However, when the target data is synthetic sound data composed of chord sounds (harmony) or a plurality of musical instrument sounds, the method based on the autocorrelation function cannot be applied to the detection of the tuning value. Summary of the invention
[0006] One of the advantages of the present disclosure is that when a musical instrument is played in conjunction with a piece of music and when the chord progression of the music is determined, the required correct tuning value is obtained.
[0007] A music data processing device in one example of the method includes a processor that processes music data based on the operation results of a fast Fourier transform performed on input data generated according to the music data input for each processing unit, and the processor calculates a deviation as a phase error for each bin number corresponding to an operation point of the fast Fourier transform, wherein the deviation is obtained by subtracting a result of adding a standard phase shift to the phase in a previous processing unit as a result of the operation from the phase in the current processing unit as a result of the operation, and the standard phase shift is the phase amount that should be shifted when the processing unit advances 1 unit at the bin number frequency corresponding to the bin number.
[0008] Effects of the Invention
[0009] According to the present invention, it is possible to obtain the correct tuning value required when performing a musical instrument matching a piece of music or determining the chord progression of the piece of music. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1This is a block diagram showing a hardware configuration example of a music data processing device.
[0011] Figure 2 This is a block diagram of a chord determination processing unit.
[0012] Figure 3 : is a flowchart showing a processing example of the tuning value determination unit.
[0013] Figure 4A This is a flowchart showing a processing example of a chroma vector generating unit.
[0014] Figure 4B : is a flowchart showing a processing example of the chord determination unit.
[0015] Figure 5A FIG. 1 is a diagram showing an example of a chord composition table in the case of a major chord.
[0016] Figure 5B FIG. 1 is a diagram showing an example of a chord composition table in the case of a minor triad. DETAILED DESCRIPTION
[0017] Hereinafter, a mode for carrying out the present invention will be described in detail with reference to the drawings. Figure 1 1 is a block diagram showing a hardware configuration example of a music data processing device 100 that can determine a tuning value for music data and perform chord determination based on the determined tuning value.
[0018] The music data processing device 100 is, for example, a user terminal such as a smartphone terminal, a tablet terminal, or a personal computer such as a so-called desktop personal computer operated by a user.
[0019] In the music data processing device 100, a CPU (central processing unit) 101 as at least one processor, a ROM (read only memory) 102, a RAM (random access memory) 103, an input unit 104 constituted by, for example, a touch panel display, and a display / output unit 105, and a communication unit 106 connected to, for example, the Internet, a local area network, etc. for communicating with a server device or other user terminals are mutually connected via a system bus 107. In addition, blocks generally provided as user terminals and not directly related to the operation of this embodiment (for example, a microphone, a speaker, a call function, a camera, etc.) are omitted, but of course these blocks may be provided.
[0020] CPU 101 executes the control program stored in ROM 102 while using RAM 103 as a working memory. Figure 1The control operation of the music data processing device 100 is performed. In addition to the above-mentioned control program and various fixed data, the ROM 102 also stores data such as the [chord composition sound table] of FIG. 5 described later. The control program and the like may not be stored in the ROM 102 in advance, but may be downloaded and installed as appropriate via the communication unit 106 and a network such as the Internet.
[0021] The control program is stored in the ROM 102, but the present invention is not limited thereto and may be stored in a removable storage medium such as a USB memory, CD, DVD, etc., or in a storage medium of a server. The electronic keyboard instrument 100 may obtain the control program from such a storage medium and execute it.
[0022] The following detailed description is provided by Figure 1 When "CPU 101", "ROM 102" or "RAM 103" is mentioned, it means reference to Figure 1 CPU101, ROM102 or RAM103.
[0023] First, a processing unit PU, which is a processing unit to be handled collectively once, is defined by the following formula (1).
[0024] PU = SR / PR (samples / times)…(1)
[0025] Here, SR is the sampling rate (samples / second), and PR is the FFT processing rate (times / second).
[0026] In addition, the FFT window size (samples) is set to WL.
[0027] Figure 2 yes Figure 1 The chord determination processing unit 200 of the music data processing device 100 is a block diagram of the chord determination processing unit 200 composed of the CPU 101 and the like. The chord determination processing unit 200 executes the processing described below in the music data processing device 100, and the corresponding hardware includes at least one of the CPU 101, the ROM 102, and the RAM 103 as described above. The program executed by the chord determination processing unit 200 is executed as Figure 1 The user terminal of the music data processing device 100 is shipped from the factory and stored in the ROM 102. When the user uses the music data processing device 100, the data can be loaded from the ROM 102 to the RAM 103 for use. Alternatively, the user can download a so-called application having the function of the chord determination processing unit 200 from the website of a supplier company providing the application via a network such as the Internet. Figure 1 The communication unit 106 downloads and installs the program to the RAM 103, so that the program executed by the chord determination processing unit 200 can be operated.
[0028] The roughly divided chord determination processing section 200 is composed of a tuning value determination section 201 , a chroma vector generation section 202 , and a chord determination section 203 .
[0029] The tuning value determination unit 201 executes a waveform data reading process S210 , an amplitude / phase calculation process S211 , a phase error calculation process S212 , a frequency determination process S213 , and a tuning value determination process S214 .
[0030] The chroma vector generation unit 202 executes an 88-tone chroma vector generation process S220 and a 12-tone chroma vector generation process S221.
[0031] The chord determination unit 203 executes a beat tracking process S230 and a chord determination process S231 .
[0032] Figure 3 Yes means Figure 2 The CPU 101 mainly performs the following steps: Figure 2 The information such as [FFT window data], [complex data] ([amplitude][phase]), [phase error], [current frequency], [pseudo-scale], [pseudo-scale integer part], [pseudo-scale fractional part], [pseudo-scale fractional part center of gravity] and [tuning value] recorded as "main information" in the block of the tuning value determination unit 201 is processed as variables stored in RAM 103.
[0033] exist Figure 3 In the process, the CPU 101 reads the waveform data of the music data of the chord determination object read from the ROM 102 or read from the external network (such as the Internet) via the communication unit 106 into the RAM 103 in sequence according to the processing unit PU [sample / time] = SR (sampling rate [sample / second]) / PR (FFT processing rate [times / second]) defined by the above-mentioned formula (1). Here, first, it is determined whether the final data of the waveform data has been read and whether the processing has been completed ( Figure 3 Step S300).
[0034] If the final data is not completed and the determination in step S300 becomes "No", the CPU 101 executes Figure 2 Specifically, CPU 101 reads new waveform data sampled by PU into RAM 103, and sets FFT window data having FFT window size WL [samples] from, for example, ROM 102 to, for example, RAM 103 or a FIFO (First In, First Out) buffer such as a register built into CPU 101 (not shown).
[0035] Next, CPU 101 executes Figure 2 Amplitude / phase calculation processing S211 described in .
[0036] Specifically, CPU 101 first makes the central sample of the latest processing unit PU (sample) of the music data read into RAM 103 according to each processing unit PU [sample] so far consistent with the central sample of the FFT window data set in the FIFO buffer, and multiplies the samples of the music data on RAM 103 and the samples of the FFT window data in the FIFO buffer according to each corresponding sample.
[0037] Next, the CPU 101 performs an FFT operation on the multiplication result data corresponding to the FFT window size WL [samples].
[0038] Furthermore, CPU 101 obtains complex data as the result of FFT operation for each FFT bin number bin (hereinafter referred to as "bin number bin") that obtains the result of FFT operation, and calculates amplitude and phase based on the complex data. Here, the operation point of FFT operation is equal to the FFT window size WL [sample], and the operation result of 0 to (WL / 2)-1 and the operation result of WL / 2 to WL-1 are in a mirror relationship. Therefore, the bin number bin corresponds to the operation point of FFT, and takes a value of 0≤bin<FFT window size WL / 2 which is half of the number of operation points.
[0039] Now, if the real part of the complex data in bin number bin is set to re(bin) and the imaginary part is set to im(bin), the amplitude Amp(bin) and phase Phs(bin) in bin number bin are calculated by the operations shown in the following equations (2) and (3).
[0040] Amp(bin)=Sqrt(re(bin)×re(bin)+im(bin)×im(bin))…(2)
[0041] Here, "Sqrt(n)" is a calculation function for calculating the square root of n.
[0042] Phs(bin)=Atan(im(bin),re(bin))…(3)
[0043] Here, "Atan (y, x)" is a calculation function that calculates the arc tangent of y with respect to x.
[0044] Back to Figure 3 After the above amplitude / phase calculation process S211, CPU 101 executes Figure 2 The phase error calculation process S212 described in FIG.
[0045] Specifically, CPU 101 first calculates the FFT bin frequency BFQ(bin) (bin number frequency) by performing the operation shown in the following formula (4) for each bin number bin (0≤bin<FFT window size WL / 2) corresponding to the FFT operation point.
[0046] BFQ(bin)=SR×bin / WL…(4)
[0047] As shown in the above formula (4), the FFT bin frequency BFQ (bin) (Hz = 1 / second) is calculated by multiplying the ratio of the bin number bin to the FFT window size WL (samples) by the sampling rate SR (samples / second) of the music data. That is, the FFT bin frequency BFQ (bin) is a frequency determined by the FFT operation point represented by the bin number bin.
[0048] Next, CPUl01 calculates the phase amount that should be shifted when the processing unit PU advances 1 unit (=SR / PR[sampling]) at the FFT bin frequency BFQ(bin) calculated by the operation shown in the above formula (4) for each bin number bin through the operation shown in the following formula (5). That is, the standard phase shift NPD(bin).
[0049] NPD(bin)=2π×BFQ(bin)×PU / SR…(5)
[0050] Here, π is the ratio of a circle to its circumference.
[0051] Next, CPU 101 calculates the deviation amount as the phase error ePhs(bin) by the operation shown in the following formula (6) for each bin number bin, wherein the deviation amount is obtained by subtracting the phase Phs0(bin) in the previous processing unit calculated by the operation shown in formula (5) from the phase Phs1(bin) in the current processing unit calculated by the operation shown in formula (3) based on the complex data as the FFT operation result, and adding the standard phase shift NPD(bin) calculated by the operation shown in formula (5).
[0052] ePhs(bin)=Phs1(bin)-(Phs0(bin)+NPD(bin))%(2π)…(6)
[0053] In addition, the phase error ePhs(bin) adjusts the sampling rate SR [samples / second], FFT processing rate PR [times / second], and FFT window size WL [samples] defined in formula (1) not exceeding the range of ±π. Here, "%" is the remainder operation, and the right side of formula (6) means the remainder after dividing by 2π.
[0054] The result of adding the standard phase shift NPD(bin) calculated by the operation shown in formula (5) to the phase Phs0(bin) in the previous processing unit should originally be consistent with the phase Phs1(bin) in the current processing unit. However, in fact, when the frequency of the music data is different from the FFT bin frequency BFQ(bin) calculated by the operation shown in formula (4), the two are not consistent. Therefore, the difference between Phs1(bin) and (Phs0(bin)+NPD(bin))%(2π) is calculated by the operations shown in formulas (4), (5) and (6) as the phase error ePhs(bin).
[0055] Back to Figure 3 After the above phase error calculation process S212, CPU 101 executes Figure 2 The frequency determination process S213 described in FIG.
[0056] Specifically, CPU 101 first calculates the current frequency cFq(bin) and the pseudo-scale vNt(bin) for each bin number bin (0≤bin<FFT window size WL / 2) according to the phase error ePhs(bin) calculated in the phase error calculation process S212.
[0057] By adding the phase error ePhs(bin) calculated by the calculation shown in formula (6) to the standard phase shift NPD(bin) calculated by the calculation shown in formula (5) and dividing the result by the standard phase shift NPD(bin), the ratio of the actual phase to the standard phase shift NPD(bin) can be calculated.
[0058] To this end, CPU 101 multiplies the FFT bin frequency BFQ(bin) calculated by the operation shown in equation (4) by the ratio through the operation shown in equation (7) below, thereby calculating the current frequency cFq(bin) for each bin number bin.
[0059] cFq(bin)=BFQ(bin)×(NPD(bin)+ePhs(bin)) / NPD(bin)…(7)
[0060] Furthermore, CPU 101 calculates a pseudo-scale vNt(bin) by calculation shown in the following formula (8) using the current frequency cFq(bin) calculated by calculation shown in formula (7) for each bin number bin.
[0061] vNt(bin)=Log(cFq(bin) / 440.0, 2.0)×12+69…(8)
[0062] Here, "69" is the scale number of the note A4. In addition, Log(x, 2.0) is a calculation function for calculating the logarithm with base 2 for x.
[0063] As shown in the above formula (8), the logarithm of base 2 is calculated for the result of dividing the current frequency cFq(bin) in the bin number bin by the frequency 440 Hz of the A4 reference tone which is the first audio frequency of any pitch. The result is multiplied by 12 and added to the A4 scale number = 69, thereby calculating the pseudo scale vNt(bin) in the bin number bin.
[0064] Next, when the total value of the amplitude Amp(bin) of the complex data calculated by the operation shown in formula (2) in all bin numbers bin (0≤bin<FFT window size WL / 2) is greater than a certain value, CPU101 calculates the pseudo-scale integer part ivNt(bin) by rounding off the decimal part of the pseudo-scale vNt(bin) calculated by the operation shown in formula (8) for each bin number bin, as shown in the following formula (9).
[0065] ivNt(bin) = The result of rounding off the decimal part of vNt(bin)…(9)
[0066] Furthermore, as shown in the following formula (10), CPU 101 subtracts the pseudo-scale integer part ivNt(bin) calculated by the operation shown in formula (9) from the pseudo-scale vNt(bin) calculated by the operation shown in formula (8) for each bin number bin, thereby calculating the pseudo-scale decimal part fvNt(bin).
[0067] fvNt(bin)=vNt(bin)-ivNt(bin)…(10)
[0068] The operation shown in formula (9) is a rounding operation, and the pseudo-scale decimal part fvNt(bin) calculated by the operation shown in formula (10) falls within the range of greater than -0.5 and less than 0.5.
[0069] The pseudo-scale decimal part fvNt(bin) calculated by the operation shown in formula (10) can be regarded as the scale deviation amount for each bin number bin.
[0070] CPU101 further calculates the pseudo-scale integer part ivNt(bin) calculated by the operation shown in the following formula (9) through the operation shown in the following formula (11), and the centroid of the pseudo-scale decimal part fvNt(bin) and the amplitude Amp(bin) (refer to formula (2)) in the range of bin number bin where the pseudo-scale integer part ivNt(bin) calculated by the operation shown in the following formula (9) is within a predetermined range of sound (for example: 36 (C2) to 95 (B6)), that is, the pseudo-scale decimal part centroid Flt.
[0071]
Mathematical formula 1
[0072]
[0073] Here, bin is the bin number, min bin is the minimum bin number of the predetermined range, max bin is the maximum bin number of the predetermined range, Amp(bin) is the amplitude of bin number bin calculated by the operation of formula (2), and fvNt(bin) is the pseudo-scale decimal part of bin number bin calculated by the operation of formula (10). In addition, in order to satisfy the above formula, the amplitude must be above a given threshold.
[0074] That is, CPU 101 calculates each pseudo-scale decimal part fvNt(bin) for each bin number bin within the above-given range within one processing unit PU by the operation shown in formula (10), and calculates the scale deviation amount per processing unit corresponding to one processing unit, i.e., the pseudo-scale decimal part centroid Flt, by calculating, for example, the centroid of each pseudo-scale decimal part fvNt(bin).
[0075] Back to Figure 3 As described above, after the frequency determination process S213, the CPU 101 returns to the determination process of step S300. In this way, the CPU 101 repeatedly executes the waveform data reading process S210, the amplitude / phase calculation process S211, the phase error calculation process S212, and the frequency determination process S213 until the target music data is read into the final data in each processing unit PU [sample] defined by formula (1), and the CPU 101 determines that the processing from the waveform data reading process S210 to the frequency determination process S213 is completed.
[0076] By this repetitive processing, the CPU 101 can calculate the scale deviation amount per processing unit, that is, the pseudo-scale decimal center Flt, for each processing unit PU [sample] from the beginning to the end of the music data.
[0077] If the music data for chord determination is read into the final data in each processing unit PU [sample], and the processing from the waveform data reading process S210 to the frequency determination process S213 is completed, Figure 3 If the determination of step S300 is "yes", CPU 101 executes Figure 2 The tuning value determination process S214 described in .
[0078] Specifically, first, the CPU 101 calculates the average value of the pseudo-scale decimal centroids Flt obtained for each processing unit PU [sample] from the beginning to the end of the music data, that is, the pseudo-scale decimal centroid average value aFlt.
[0079] The pseudo-scale decimal point centroid average value aFlt can be said to be equivalent to the scale deviation amount of the entire music data.
[0080] Then, CPU 101 uses the calculated pseudo-scale fractional part centroid average value aFlt to determine the tuning value sTun through the calculation shown in the following equation (12).
[0081] sTun=440.0×Pow(2.0,aFlt / 12)…(12)
[0082] Here, Pow(x, y) is a calculation function for obtaining x raised to the power of y.
[0083] In the calculation shown in the above formula (12), CPU101 calculates the scale deviation rate of each scale by calculating "2 raised to the power of [the result obtained by dividing the average value of the centroid of the pseudo-scale decimal part aFlt equivalent to the scale deviation of the entire music data by 12]", and calculates the tuning value sTun for the music data by multiplying the scale deviation rate by the frequency 440.0 (Hz) of the first audio frequency A4 reference sound of an arbitrary scale.
[0084] As above, through Figure 3 The flowchart shown in Figure 2 The processing of the tuning value determination unit 201 can calculate the tuning value sTun for the entire music data.
[0085] Figure 4A Yes means Figure 2 The CPU 101 mainly performs the following steps on the chromaticity vector generating unit 202: Figure 2 Information such as [true scale], [88-tone chroma vector], and [12-tone chroma vector] recorded as “main information” in the block of the chroma vector generation unit 202 is handled as variables stored in RAM 103.
[0086] First, CPU 101 executes Figure 2 The 88-tone chromaticity vector generation process S220 described in the above description.
[0087] Specifically, CPU 101 is based on Figure 2 as well as Figure 3 The tuning value sTun of the entire music data is calculated by the operation shown in formula (12) in the tuning value determination unit 201, and the tuning value sTun of the entire music data is calculated by the operation shown in formula (12) in Figure 2The current frequency cFq(bin) of each bin number bin (0≤bin<FFT window size WL / 2) is calculated by the operation shown in formula (7) in the frequency determination processing S213, and the true scale sNt(bin) of each bin number bin is calculated by the operation shown in the following formula (13).
[0088] sNt(bin)=Log(cFq(bin) / sTun, 2.0)×12+69…(13)
[0089] Here, "69" is the scale number of the A4 tone, similarly to when the pseudo scale vNt(bin) is calculated by the operation shown in formula (8). As shown in formula (13) above, the logarithm of the base 2 is calculated for the result of dividing the current frequency cFq(bin) in the bin number bin by the tuning value sTun calculated by the operation shown in formula (12), and the result is multiplied by 12 and added to the A4 scale number = 69, thereby calculating the true scale sNt(bin) in the bin number bin.
[0090] Next, as shown in the following formula (14), CPU 101 discards the decimal part of the true scale sNt(bin) calculated by the operation shown in formula (13) for each bin number bin, thereby calculating the true scale integer part iNt(bin).
[0091] The result of discarding the decimal part of iNt(bin)=sNt(bin)…(14)
[0092] Furthermore, as shown in the following formula (15), CPU 101 subtracts the true scale integer part iNt(bin) calculated by the operation shown in formula (14) from the true scale sNt(bin) calculated by the operation shown in formula (13) for each bin number bin, thereby calculating the true scale decimal part fNt(bin).
[0093] fNt(bin)=sNt(bin)-iNt(bin)…(15)
[0094] The operation of discarding is performed by equation (14), and the true scale decimal part fNt(bin) calculated by the operation shown in equation (15) converges within the range of greater than 0.0 and less than 1.0.
[0095] Next, CPU101 distributes and synthesizes the amplitude Amp(bin) calculated by the operation shown in formula (2) to the number scales in a given scale range based on the true scale integer part iNt(bin) calculated by the operation shown in formula (14) and the true scale decimal part fNt(bin) calculated by the operation shown in formula (15) for each bin number bin, to generate a vector, i.e., a chromaticity vector CRV[n], which has the amplitude intensity of the frequency of each number scale as a feature quantity.
[0096] More specifically, if CRV88[n] (n: 0 to 87) is used to represent 88 timbre vectors in the overall range of the music data, for example, the 88-note scale of A0 (21) to C8 (108), then CPU 101 generates 88 timbre vectors CRV88[n] through the allocation (synthesis) operations shown in the following equations (16) and (17).
[0097] CRV88[iNt(bin)-21]+=Amp(bin)×(1.0-fNt(bin))…(16)
[0098] CRV88[iNt(bin)+1-21]+=Amp(bin)×fNt(bin)…(17)
[0099] Here, "+=" is a compound substitution operator, which means that the result of adding the value on the left side and the value on the right side of the formula is substituted into the variable on the left side.
[0100] Back to Figure 4A The CPU 101 executes the 88 timbre vector generation process S220 after the 88 timbre vector generation process S220. Figure 2 The 12-tone chromaticity vector generation process S221 described in the above description.
[0101] Specifically, CPU 101 performs a resynthesis operation, removes noise based on the minimum value of the adjacent three-tone scale (n-1, n, n+1) of the 88-tone chromaticity vector CRV88[n] (n: 0 to 87) calculated by the operations shown in equations (16) and (17), and rounds it to 12-tone scale.
[0102] Here, if the 12-tone chromaticity vector is represented by CRV12[m] (m: 0 to 11), it is calculated by the resynthesis operation shown in the following formula (18).
[0103] CRV12[(n+21)%12]+=CRV88[n]…(18)
[0104] Here, n: division by 0 to 87, %12: remainder operation of 12.
[0105] As above, through Figure 4A The flowchart shown in Figure 2 The processing of the chroma vector generating unit 202 can generate 88-tone chroma vectors CRV88[n] (n: 0 to 87) and 12-tone chroma vectors CRV12[m] (m: 0 to 11).
[0106] Figure 4B Yes means Figure 2 A flowchart of a more detailed processing example of the chord determination unit 203 is shown.
[0107] CPU101 will mainly Figure 2 The information recorded as "main information" in the block of the chord determination unit 203, such as [beat tracking information] (rhythm value, measure position, beat position), [beat length 12-tone chromaticity vector], [chord composition sound table] and [chord determination result], is processed as variables stored in RAM 103.
[0108] First, CPU 101 executes Figure 2 The beat tracking process S230 described in .
[0109] Specifically, CPU 101 changes the volume of the music data, the composition sound, for example, Figure 2 In the chroma vector generating unit 202, Figure 4A The [beat tracking information] (rhythm value, measure position, beat position) is detected by the change of the 12-tone chromaticity vector CRV12[m] calculated by the operation shown in formula (18) in the 12-tone chromaticity vector generation process S221.
[0110] Next, CPU 101 executes Figure 2 The chord determination process S231 described in .
[0111] Specifically, CPU 101 is based on Figure 4B The [beat tracking information] calculated in the beat tracking processing S230 is used to determine the time length for chord judgment, and a [beat length 12-tone chromaticity vector] is prepared for the corresponding time length, with the sum of each element value of the 12-tone chromaticity vector CRV12[m] obtained by the operation shown in formula (18) being the element value.
[0112] Furthermore, CPU 101 multiplies the above-mentioned [beat length 12-tone chromaticity vector] by the value of the [chord component tone table] weighted by the component tones / non-component tones of the chord through the calculation shown in the following formula (19), and stores the chord with the largest sum in the [chord determination result].
[0113] [Beat length 12-tone chromaticity vector] × [Chord composition tone table] Total maximum value → [Chord determination result]… (19)
[0114] In addition, CPU 101 determines a [chord composition tone table] by performing 12 shifts according to the difference in the root note.
[0115] Figure 5A , Figure 5B This is a table diagram showing a structural example of weighting of a [chord composition tone table] with C (Do) tone as a reference (root tone). Figure 5A The table shows the major chord situation. Figure 5B The table shows the case of a minor triad. In FIG5 , the weighting of the constituent notes takes a positive value, and each of the constituent notes is set to 20 (a total of 60) in the triad. The non-constituent notes take a negative value, and in particular, the third degree of difference between the major and minor triads becomes a value with a large absolute value.
[0116] In the present disclosure, unless otherwise specified, the term “at least” means “(A), (B), (C), (A and B), (A and C), (B and C), or (A, B and C)”, for example, “at least one of A, B, and C”, including multiple combinations or numbers greater than the number shown. In addition, for example, when there is a plurality of C, the term “at least one of A, B, and C” means “(A), (B), (at least one or more C), (A and B), (A and at least one or more C), (B and at least one or more C) or (A, B and at least one or more C)”. In the case where there are multiple A or multiple B, it is also interpreted as being handled in the same way as above.
[0117] According to the present embodiment, the frequency information in the analysis results obtained by FFT in the past becomes a synthesis of discrete values of each FFT bin number, which is not suitable for the detection of the frequency of a continuous value such as the tuning value of the entire music. For such a subject, the required correct tuning value can be obtained when playing an instrument that matches the music and when determining the chord progression of the music, and the tuning operation can be easily performed. In addition, a more accurate chord determination result can be obtained based on the tuning value. In addition, 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 ways, and various omissions, substitutions, and changes can be made without departing from the scope of the subject matter of the invention. The present embodiment and its variations are included in the scope and subject matter of the invention, and are included in the invention described in the claims and the scope of their equivalents.
Claims
1. A music data processing device, It is characterized in that The music data processing device has at least one processor. The at least one processor performs the following processing: In order to process the music data based on the operation result of the fast Fourier transform performed on the input data generated according to the music data input according to each processing unit, a deviation is calculated as a phase error for each bin number corresponding to the operation point of the fast Fourier transform, wherein the deviation is obtained by subtracting the result of adding a standard phase shift to the phase in the previous processing unit which is the operation result from the phase in the processing unit of this time which is the operation result, and the standard phase shift is the phase amount that should be shifted when the processing unit advances 1 unit at the bin number frequency corresponding to the bin number.
2. The music data processing device according to claim 1, in, For each bin number, calculate the current frequency, which is the frequency obtained by multiplying the ratio of the result of adding the phase error to the standard phase shift with the frequency of the bin number; calculate a pseudo-scale based on the ratio of the current frequency to the frequency of the reference sound; calculate a scale deviation based on the decimal part of the pseudo-scale; and calculate a tuning value for the music data based on the scale deviation.
3. The music data processing device according to claim 1, in, The at least one processor performs the following processing: The bin number frequency corresponding to the bin number is calculated by multiplying the ratio of the bin number to the window size of the window data multiplied by the music data for each sample before the fast Fourier transform by the sampling rate of the music data.
4. The music data processing device according to claim 2, in, The at least one processor performs the following processing: The action of calculating the decimal part of the pseudo-scale as the scale deviation of each bin number within a given range of sound within one of the processing units is performed to calculate the scale deviation of each processing unit corresponding to the one processing unit; the action of calculating the scale deviation of each processing unit is further performed on each of the processing units continuing the entire music data to calculate the scale deviation of each processing unit; the scale deviation is calculated based on the scale deviation of each processing unit as the music scale deviation corresponding to the music data.
5. The music data processing device according to claim 2, in, The at least one processor performs the following processing: A tuning value for the music data is calculated by calculating a scale deviation rate per scale based on the scale deviation amount and multiplying the scale deviation rate by a first frequency of the arbitrary scale.
6. A music data processing device, It is characterized in that The music data processing device has at least one processor. The at least one processor performs the following processing: In order to process the music data based on the operation result of the fast Fourier transform performed on the input data generated according to the music data input in each processing unit, a deviation is calculated as a phase error for each bin number corresponding to the operation point of the fast Fourier transform, wherein the deviation is obtained by subtracting the result of adding a standard phase shift to the phase in the previous processing unit as the operation result from the phase in the processing unit as the operation result, and the standard phase shift is the phase amount that should be displaced when the processing unit advances 1 unit at the bin number frequency corresponding to the bin number, determining a current frequency of each of the bin numbers based on the phase error, Chords in the music data are determined based on the determined current frequency of each of the bin numbers.
7. The music data processing device according to claim 6, in, The at least one processor performs the following processing: In the determination of the chord, the true scale of each bin number is calculated based on the tuning value of the music data and the current frequency calculated for the bin number according to each bin number corresponding to the operation point of the fast Fourier transform. Based on the integer part and the decimal part of the true scale calculated for each bin number and the amplitude of each bin number calculated according to the calculation result, the amplitude value is assigned and synthesized to the tone number scale of a given scale range, so as to generate a vector, i.e., a chromaticity vector, whose characteristic quantity is the amplitude intensity of the frequency of each tone number scale. A chord in the music data is determined based on the chroma vector.
8. The music data processing device according to claim 7, in, The at least one processor performs the following processing: Generate an n-tone chromaticity vector corresponding to an n-tone scale having a total number of notes n (n>12) in the musical range of the music data, and a 12-tone chromaticity vector corresponding to the 12-tone scale by rounding the n-tone chromaticity vector to the 12-tone scale, as the chromaticity vector, detect a rhythm value, a measure position, and a beat position based on changes in the 12-tone chromaticity vector, as beat tracking information, determine a time length for chord determination based on the beat tracking information, generate a beat-length 12-tone chromaticity vector with a sum of the element values of each element of the 12-tone chromaticity vector as an element value for the time length, multiply the beat-length 12-tone chromaticity vector by a value of a chord composition table weighted by the constituent notes / non-constituent notes of the chord, and output the chord with the largest sum as a chord determination result.
9. The music data processing device according to claim 6, in, The at least one processor performs the following processing: The bin number frequency corresponding to the bin number is calculated by multiplying the sampling rate of the music data by the ratio of the bin number to the window size of the window data multiplied by the music data for each sample before the fast Fourier transform.
10. A music data processing method, It is characterized in that At least one processor performs the following processing: In order to process the music data based on the operation results of the fast Fourier transform performed on the input data generated according to the music data input according to each processing unit, the phase difference between the phase in the previous processing unit and the phase in the current processing unit calculated according to the operation results and the deviation amount at the time of the standard phase shift, that is, the phase error, are calculated and compared for each bin number corresponding to the operation point of the fast Fourier transform. The standard phase shift is the phase amount that should be shifted when the processing unit advances 1 unit at the bin number frequency corresponding to the operation point of the bin number.
11. The music data processing method according to claim 10, in, The at least one processor performs the following processing: For each bin number, a frequency, that is, a current frequency, is calculated by multiplying the ratio of the result of adding the phase error to the standard phase shift to the standard phase shift by the bin number frequency. calculating a pseudo-scale based on a ratio of the current frequency to the frequency of the reference sound, The scale deviation is calculated based on the decimal part of the pseudo-scale. A tuning value for the music data is calculated based on the scale deviation amount.
12. A music data processing method, It is characterized in that At least one processor performs the following processing: In order to process the music data based on the operation result of the fast Fourier transform performed on the input data generated according to the music data input in each processing unit, the deviation amount is calculated as a phase error for each bin number corresponding to the operation point of the fast Fourier transform, wherein the deviation value is obtained by subtracting the result of adding a standard phase shift to the phase in the previous processing unit as the operation result from the phase in the processing unit as the operation result, and the standard phase shift is the phase amount that should be shifted when the processing unit advances 1 unit at the bin number frequency corresponding to the bin number, determining a current frequency of each of the bin numbers based on the phase error, Chords in the music data are determined based on the determined current frequency of each of the bin numbers.
13. The music data processing method according to claim 12, in, The at least one processor performs the following processing: In the determination of the chord, the true scale of each bin number is calculated based on the tuning value of the music data and the current frequency calculated for the bin number according to each bin number corresponding to the operation point of the fast Fourier transform. Based on the integer part and the decimal part of the true scale calculated for each bin number and the amplitude of each bin number calculated according to the calculation result, the amplitude value is assigned and synthesized to the tone number scale of a given scale range, so as to generate a vector, i.e., a chromaticity vector, whose characteristic quantity is the amplitude intensity of the frequency of each tone number scale. A chord in the music data is determined based on the chroma vector.
14. A storage medium, It is characterized in that The program code that causes the computer to execute the following processing is stored: In order to process the music data based on the operation results of the fast Fourier transform performed on the input data generated from the music data input according to each processing unit, the phase difference between the phase in the previous processing unit and the phase in the current processing unit calculated according to the operation results and the deviation amount at the time of the standard phase shift, that is, the phase error, are calculated and compared for each bin number corresponding to the operation point of the fast Fourier transform. The standard phase shift is the phase amount that should be shifted when the processing unit advances 1 unit at the bin number frequency corresponding to the operation point of the bin number.
15. The storage medium according to claim 14, in, The computer is caused to execute the following processing: For each bin number, a frequency obtained by multiplying the ratio of the result of adding the phase error to the standard phase shift to the standard phase shift by the bin number frequency, that is, the current frequency, is calculated; calculating a pseudo-scale based on a ratio of the current frequency to the frequency of the reference sound, A scale deviation amount is calculated based on the decimal part of the pseudo scale, and a tuning value for the music data is calculated based on the scale deviation amount.
16. A storage medium, It is characterized in that The program code that causes the computer to execute the following processing is stored: In order to process the music data based on the operation result of the fast Fourier transform performed on the input data generated according to the music data input in each processing unit, a deviation is calculated as a phase error for each bin number corresponding to the operation point of the fast Fourier transform, wherein the deviation is obtained by subtracting the result of adding a standard phase shift to the phase in the previous processing unit as the operation result from the phase in the processing unit as the operation result, and the standard phase shift is the phase amount that should be displaced when the processing unit advances 1 unit at the bin number frequency corresponding to the bin number, determining a current frequency of each of the bin numbers based on the phase error, Chords in the music data are determined based on the determined current frequency of each of the bin numbers.
17. The storage medium according to claim 16, in, The computer is caused to execute the following processing: In the determination of the chord, the true scale of each bin number is calculated based on the tuning value of the music data and the current frequency calculated for the bin number according to each bin number corresponding to the operation point of the fast Fourier transform. Based on the integer part and the decimal part of the true scale calculated for each bin number and the amplitude of each bin number calculated according to the calculation result, the amplitude value is assigned and synthesized to the tone number scale of a given scale range, so as to generate a vector, i.e., a chromaticity vector, whose characteristic quantity is the amplitude intensity of the frequency of each tone number scale. A chord in the music data is determined based on the chroma vector.
