SOUND PROCESSING METHOD USING DJ TRANSFORM
20230215456 · 2023-07-06
Inventors
Cpc classification
G10L13/02
PHYSICS
G10L25/18
PHYSICS
International classification
Abstract
Provided is a sound processing method performed by a computer, the method comprising generating a DJ transform spectrogram indicating estimated pure-tone amplitudes for respective frequencies corresponding to natural frequencies of a plurality of springs and a plurality of time points by modeling an oscillation motion of the plurality of springs having different natural frequencies, with respect to an input sound, and calculating the estimated pure-tone amplitudes for the respective natural frequencies; calculating degrees of fundamental frequency suitability based on a moving average of the estimated pure-tone amplitudes or a moving standard deviation of the estimated pure-tone amplitudes with respect to each natural frequency of the DJ transform spectrogram; and extracting the fundamental frequency based on local maximum values of the degrees of fundamental frequency suitability for the respective natural frequencies at each of the plurality of time points.
Claims
1. A sound processing method performed by a computer, the method comprising: generating a DJ transform spectrogram indicating estimated pure-tone amplitudes for respective frequencies corresponding to natural frequencies of a plurality of springs and a plurality of time points by modeling an oscillation motion of the plurality of springs having different natural frequencies, with respect to an input sound, and calculating the estimated pure-tone amplitudes for the respective natural frequencies, wherein the generating the DJ transform spectrogram includes: estimating expected steady-state amplitudes, each of which is a convergence value of an amplitude of each of the plurality of springs in a steady state, based on amplitudes at two time points having an interval there between equal to one natural period of each of the plurality of springs; and calculating the estimated pure-tone amplitudes based on predicted pure-tone amplitudes that are amplitudes of the input sound estimated based on the expected steady-state amplitudes; calculating degrees of fundamental frequency suitability based on a moving average of the estimated pure-tone amplitudes or a moving standard deviation of the estimated pure-tone amplitudes with respect to each natural frequency of the DJ transform spectrogram; extracting the fundamental frequency based on local maximum values of the degrees of fundamental frequency suitability for the respective natural frequencies at each of the plurality of time points; providing, based on the fundamental frequency, a resultant frequency comprising a high measurement precision of least one of: (a) temporal resolution or (b) frequency resolution, and identifying the input sound or synthesizing an output sound, based on the resultant frequency.
2. The method of claim 1, wherein the estimated pure-tone amplitudes are same as the predicted pure-tone amplitudes.
3. The method of claim 1, wherein the degrees of fundamental frequency suitability are proportional to the moving average of the estimated pure-tone amplitudes or are inversely proportional to the moving standard deviation of the estimated pure-tone amplitudes.
4. The method of claim 1, wherein the extracting the fundamental frequency includes: generating a black-and-white spectrogram by extracting the N (N being an integer equal to or greater than 2) topmost degrees of fundamental frequency suitability among the degrees of fundamental frequency suitability at respective time points, setting values corresponding to natural frequencies corresponding to the N degrees of fundamental frequency suitability to “1”, and setting remaining values to “0”; generating an average black-and-white spectrogram by calculating an average over each region of the black-and-white spectrogram, where the regions of the black-and-white-spectrogram have the same size containing each point of the black-and-white spectrogram; and extracting the local maximum values in the average black-and-white spectrogram depending on the natural frequencies at the respective time points.
5. The method of claim 4, wherein the extracting the fundamental frequency further includes: extracting a candidate fundamental frequency based on a difference between natural frequencies corresponding to adjacent local maximum values in the average black-and-white spectrogram depending on the natural frequencies, at respective time points, and a lowest frequency among the natural frequencies corresponding to local maximum values in the average black-and-white spectrogram.
6. The method of claim 5, wherein the extracting the fundamental frequency further includes: setting a candidate fundamental frequency at a time point, when a moving average of a difference between the candidate fundamental frequencies at the time point and an adjacent time point is smallest among candidate fundamental frequencies at a plurality of time points, to a black-and-white-spectrogram-based fundamental frequency at each time point; and setting a first region including a positive integer multiple of a time average of the black-and-white-spectrogram-based fundamental frequency, set for a predetermined time duration, and setting a value, obtained by dividing a frequency having a highest value in an average black-and-white spectrogram among frequencies belonging to the first region of the average black-and-white spectrogram at a time adjacent to the predetermined time duration by a positive integer (k) corresponding to the first region, to which the frequency having the highest value in the average black-and-white spectrogram belongs among frequencies belonging to the first region, to the black-and-white-spectrogram-based fundamental frequency at the time adjacent to the predetermined time duration.
7. The method of claim 6, wherein the extracting the fundamental frequency further includes: setting a second region including a positive integer multiple of the black-and-white-spectrogram-based fundamental frequency at each time point and setting a value, obtained by dividing a frequency having a highest degree of fundamental frequency suitability among frequencies of the second region by a positive integer (I) corresponding to the second region to which the frequency having the highest degree of fundamental frequency suitability belongs, to the final fundamental frequency at each time point.
8. The method of claim 1, wherein a spectrogram variance corresponding to a lowest frequency is smaller than spectrogram variances corresponding to other frequencies in a spectrogram of a result obtained by processing the input sound using the method.
9. The method of claim 1, wherein each expected steady-state amplitude is calculated using an equation:
10. The method of claim 1, wherein each predicted pure-tone amplitude is calculated using an equation:
F.sub.ext(t)≅A.sub.i.sup.ab(ω.sub.ext)MΓ.sub.iω.sub.ext where F.sub.ext(t) is the predicted pure-tone amplitude, A.sub.i.sup.ab is the expected steady-state amplitude of an .sub.ith spring S.sub.i of the plurality of springs, wherein i is a positive integer, M indicates a mass of an object fixed to an end of the spring S.sub.i, Γ.sub.i is a damping constant per unit mass of the spring S.sub.i, and ω.sub.ext is an angular velocity of the input sound.
11. The method of claim 1, wherein the calculating the estimated pure-tone amplitudes includes: calculating the predicted pure-tone amplitudes; calculating transient-state-pure-tone amplitudes, which are amplitudes of an input sound estimated based on an amplitude during the one natural period of each of the plurality of springs, based on the amplitude during the one natural period of each of the plurality of springs; and calculating filtered pure-tone amplitudes based on values obtained by multiplying the predicted pure-tone amplitudes by the transient-state-pure-tone amplitudes and calculating the estimated pure-tone amplitudes based on the calculated filtered pure-tone amplitudes.
12. The method of claim 11, wherein each transient-state-pure-tone amplitude is calculated using an equation:
F.sub.i,t(t)≅A.sub.i,t.sup.ab(ω.sub.ext)MΓ.sub.iω.sub.ext where F.sub.i,t(t) is the transient-state-pure-tone amplitude of an .sub.ith spring S.sub.i of the plurality of springs, wherein i is a positive integer, A.sub.i,t.sup.ab(ω.sub.ext) is a maximum value of a displacement during one natural period of the spring S.sub.i at time t, M indicates a mass of an object fixed to an end of the spring S.sub.i, Γ.sub.i is a damping constant per unit mass of the spring S.sub.i, and ω.sub.ext is an angular velocity of the input sound.
13. A non-transitory computer-readable recording medium having recorded thereon instructions that when performed by a computer, cause the computer to: generate a DJ transform spectrogram indicating estimated pure-tone amplitudes for respective frequencies corresponding to natural frequencies of a plurality of springs and a plurality of time points by modeling an oscillation motion of the plurality of springs having different natural frequencies, with respect to an input sound, and calculating the estimated pure-tone amplitudes for the respective natural frequencies, wherein generating the DJ transform spectrogram includes: estimating expected steady-state amplitudes, each of which is a convergence value of an amplitude of each of the plurality of springs in a steady state, based on amplitudes at two time points having an interval therebetween equal to one natural period of each of the plurality of springs, and calculating the estimated pure-tone amplitudes based on predicted pure-tone amplitudes that are amplitudes of the input sound estimated based on the expected steady-state amplitudes; calculate degrees of fundamental frequency suitability based on a moving average of the estimated pure-tone amplitudes or a moving standard deviation of the estimated pure-tone amplitudes with respect to each natural frequency of the DJ transform spectrogram; extract the fundamental frequency based on local maximum values of the degrees of fundamental frequency suitability for the respective natural frequencies at each of the plurality of time points; provide, based on the fundamental frequency, a resultant frequency comprising a high measurement precision of least one of: (a) temporal resolution or (b) frequency resolution, and identify the input sound or synthesize an output sound, based on the resultant frequency.
Description
DESCRIPTION OF DRAWINGS
[0036]
[0037]
[0038]
[0039]
DETAILED DESCRIPTION
[0040] Reference will now be made in detail to the exemplary embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings.
[0041]
[0042] Referring to
[0043] With regard to the generation of the DJ transform spectrogram, the DJ transform will be first described. The DJ transform in the case in which a sound having one frequency (angular velocity) is input will be described, and based thereon, the DJ transform in the case in which a sound having various frequencies (angular velocities) is input will be described.
[0044] The DJ transform may be configured by modeling a oscillation motion of a plurality of springs having different natural frequencies and may be used for appropriately showing the characteristic of an actual sound by mimicking a motion of hair cells in the cochlea of the ear through the oscillation motion of the springs. Since it is possible to easily convert a frequency into an oscillation frequency or an angular velocity, they are interchangeably referred to throughout this specification.
[0045] A plurality of springs may be assumed to have different natural frequencies. The natural frequencies of the plurality of springs may have a predetermined frequency interval, for example, 1 Hz, 2 Hz, or 10 Hz in a frequency range corresponding to a sound, that is, a human audible frequency range between 20 Hz and 20 kHz.
[0046] The following equation may be an equation of motion for a displacement x.sub.i(t) from an equilibrium position of an object having a mass M and fixed to one end of a spring s.sub.i having a spring constant k, with respect to an external force F(t).
[0047] Here, when ω.sub.oi is an intrinsic resonance angular velocity and satisfies
and a damping ratio is ζ, Γ.sub.i may be a damping constant per unit mass and may satisfy Γ.sub.i≅2ζω.sub.0i. In the model, M=1 and ζ=0.001 may be used, and these values may be varied in the future in order to improve performance.
[0048] First, it may be assumed that an angular velocity is ω.sub.ext and an external sound F(t)=F.sub.ext cos (ω.sub.extt) of a predetermined amplitude F.sub.ext is input. In this case, a solution x.sub.i(t) of an equation of motion of a spring having a stop state as an initial condition may be represented as follows.
[0049] Here, ω.sub.i=ω.sub.0i√{square root over (1−ζ.sup.2)} may be satisfied, and in the model, if ζ uses a very small ab el value, for example, about 0.001, ω.sub.0i≅ω.sub.oi may be satisfied. A.sub.i.sup.ab(ω.sub.ext) and A.sub.i.sup.el(ω.sub.ext) may be represented as follows.
[0050] When the angular velocity ω.sub.ext of an external force and the angular velocity ω.sub.0i of a natural frequency of a spring are identical to each other, A.sub.i.sup.ab(ω.sub.ext) and A.sub.i.sup.el(ω.sub.ext) may be represented as follows.
[0051] A spring that satisfies a condition in which the angular velocity ω.sub.0i of the natural frequency of the spring used in the DJ transform is ω.sub.ext=ω.sub.i≅ω.sub.0i if the external sound has the angular velocity ω.sub.ext may be referred to as a spring in a resonance condition. In this case, A.sub.i.sup.ab(ω.sub.ext)≅0 satisfied, and thus the displacement x.sub.i(t) of the spring may be represented as follows.
x.sub.i(t)≅A.sub.i.sup.ab(ω.sub.ext)(1−e.sup.−0.5Γ,t)sin(ω.sub.it) (Equation 7)
[0052] In Equation 7, the value A.sub.i.sup.ab(ω.sub.ext) at ω.sub.ext=ω.sub.i is almost the same as a value F.sub.ext/(MΓ.sub.iω.sub.ext) at ω.sub.ext=ω.sub.0i of Equation 5, and thus they may be taken as the same value to develop the equation.
[0053] T.sub.n may be defined to be (2nπ+π/2)/ω.sub.i. If Equation 7 is observed at time t=T.sub.n, that is, the time at which the displacement x.sub.i(t) is the maximum in one cycle, a value of x.sub.i(t=T.sub.n) may be briefly represented as follows.
x.sub.i(t=τ.sub.n)≅A.sub.i.sup.ab(ω.sub.ext)(1−e.sup.−0.5Γ,τ.sup.
[0054] According to Equation 8, after a sufficient time elapses (n.fwdarw.∞), the displacement x.sub.i(t=T.sub.n) in a stabilized state may converge to the value A.sub.i.sup.ab(ω.sub.ext).
[0055] At the time before the sufficient time elapses and the displacement x.sub.i(t=T.sub.n) in the stabilized state converges after an external sound begins to be input, the convergence value A.sub.i.sup.ab(ω.sub.ext) of the displacement x.sub.i(t) in the stabilized state after the sufficient time elapses may be calculated. A calculation procedure will be described below.
[0056] First, Equation 8 may be transformed as follows.
[0057] If the value of n in Equation 9 is changed to n+1, Equation 9 may be transformed as follows.
[0058] If both sides of Equation 9 are divided by both sides of Equation 10, respectively, the following equation may be obtained.
[0059] As seen from Equation 11, if ω.sub.ext=ω.sub.i≅ω.sub.0i and values of x.sub.i(t=T.sub.n) and x.sub.i(t=T.sub.n+1) are known, the convergence value of the displacement x.sub.i(t) in the stabilized state after a sufficient time elapses, that is, an expected steady-state amplitude A.sub.i.sup.ab(ω.sub.ext), may be estimated. The amplitude, F.sub.ext(t), of an external sound at this time point may be calculated as follows using the estimated value A.sub.i.sup.ab(ω.sub.ext) obtained at this time point and Equation 5.
F.sub.ext(t)≅A.sub.i.sup.ab(ω.sub.ext)MΓ.sub.iω.sub.ext (Equation 12)
[0060] Throughout this specification, the amplitude, F.sub.ext(t), of the external sound, calculated based on the convergence value A.sub.i.sup.ab(ω.sub.ext) of the displacement x.sub.i(t) in the stabilized state, is referred to as a predicted pure-tone amplitude.
[0061] Equation 11, representing the expected steady-state amplitude, may be derived from Equation 7, stating a motion of the spring in a resonance condition. Thus, if Equation 12 is calculated using the displacement x.sub.i(t) for each spring prior to determination of whether the spring resonates, the predicted pure-tone amplitude of a natural frequency of a spring that does not satisfy the resonance condition may also have a great value. Accordingly, the following operation may be performed.
[0062] Assuming that a displacement of a spring is the displacement in the stabilized state, the amplitude A.sub.i,t.sup.ab(ω.sub.ext) of the spring at this time point may be determined to be the maximum value of the displacement x.sub.i(t) during one natural cycle of each spring. With reference to Equation 12, a transient-state-pure-tone amplitude F.sub.i,t(t)=A.sub.i,t.sup.ab(ω.sub.ext)MΓ.sub.iω.sub.ext may be calculated.
[0063] A value obtained by multiplying the transient-state-pure-tone amplitude F.sub.i,t(t) as calculated above by the predicted pure-tone amplitude F.sub.ext(t) will be referred to as a filtered pure-tone amplitude F.sub.i,p(t)=F.sub.i,t(t)×F.sub.ext(t). A filtered pure-tone amplitude may have a characteristic in which, if a spring that resonates with an external sound is compared with a spring that does not resonate therewith, the difference in the amplitude therebetween is high, and if the external sound disappears, the amplitude rapidly converges to 0.
[0064] In the specification, the estimated pure-tone amplitudes may indicate the DJ transform result obtained by modeling an oscillation motion of a plurality of springs having different natural frequencies, may be any amplitude among the predicted pure-tone amplitude, the filtered pure-tone amplitude, and the expected steady-state amplitude, and in detail may be the predicted pure-tone amplitude or the filtered pure-tone amplitude.
[0065] Hereinafter, it may be assumed that a harmonic wave including n frequencies that are positive integer multiples of the fundamental frequency f.sub.0 is input. In this case, a set W of angular velocities of the harmonic wave may be represented as follows.
W={ω.sub.i|ω.sub.i=i×2πf.sub.0,i being positive integer depending on input harmonic wave} (Equation 13)
[0066] Elements of the set W may be sequentially ordered from the smallest and may then be represented as follows.
W={ω.sub.ext,1,ω.sub.ext,2,ω.sub.ext,3, . . . ,ω.sub.ext,n} (Equation 14)
[0067] The harmonic wave may be represented by
[0068] If a harmonic wave F(t) is input, the displacement x.sub.i(t) of the spring may be represented as follows by the sum of spring displacements for respective angular velocities included in the frequency set W.
[0069] Here, A.sub.i,j.sup.ab(ω.sub.ext,j) and A.sub.i,j.sup.el(ω.sub.ext,j) may be represented as follows.
[0070] If the displacement x.sub.i(t) is observed in the direction in which the angular velocity ω.sub.0i of the natural frequency of the spring increases (or decreases), springs in a resonance condition, which resonate with each of the elements of the set w of the angular velocity included in the harmonic wave, may be found. When the displacement x.sub.i(t) is observed for an arbitrary short time duration, the maximum value of the displacement x.sub.i(t) of the spring in the resonance condition may be greater than the maximum value of the displacement x.sub.i(t) of a spring that is not in the resonance condition, which is immediately adjacent to the spring in the resonance condition based on a unique angular velocity of the spring, according to Equations 15, 16, and 17. Accordingly, if the DJ transform spectrogram is generated using Equations 11 and 12 based on the maximum values for respective natural frequencies of springs having the displacement x.sub.i(t) of a spring, angular velocity values at points where local maximum values are observed at a specific time point may correspond one to one with the elements of the set W of the angular velocities of the harmonic wave.
[0071] That is, the displacement x.sub.i(t) of the spring represented by Equations 15 to 17 may be determined by modeling the oscillation motion of the spring, and the estimated pure-tone amplitude when a sound having various frequencies is input may be calculated by applying Equations 11 and 12 to the displacement x.sub.i(t) of the spring. Accordingly, the DJ transform spectrogram based on the estimated pure-tone amplitude may be generated by displaying the estimated pure-tone amplitude in a space defined by a time axis and a frequency axis corresponding to a resonance frequency of the spring.
[0072] In this regard, the displacement x.sub.i(t) corresponding to one local maximum value of the spectrogram may be greatly affected by a sound in a resonance condition among sounds having angular velocities included in the harmonic wave, but as seen from Equations 15, 16, and 17, the displacement x.sub.i(t) may also be affected by a sound having each of the angular velocities, which is not in a resonance condition. If the harmonic wave is given, a rate of change in an amplitude of the displacement x.sub.i(t) of the spring s.sub.i in a resonance condition in which the angular velocity ω.sub.0i of the natural frequency resonates with ω.sub.ext,m that is, ω.sub.ext,m≅ω.sub.0i when a sound of an angular velocity ω.sub.ext,n, which is not in a resonance condition, that is, ω.sub.ext,m≠ω.sub.0i is input may be estimated using the following equation.
[0073] As seen from Equations 16 and 17, A.sub.i,m.sup.ab(ω.sub.ext,m)>>A.sub.i,m.sup.el(ω.sub.ext,m) may be satisfied near the resonance condition, and A.sub.i,n.sup.el(ω.sub.ext,n)>>A.sub.i,n.sup.ab(ω.sub.ext,n) may be satisfied in a condition that greatly deviates from the resonance condition. Equation 18 represents the result obtained by selecting and comparing only greater values among these values. As seen from Equation 18, when values of F.sub.ext,n and F.sub.ext,m are not greatly different, if ζ=0.001, the effect of the term A.sub.i,m.sup.ab(ω.sub.ext,m) may be much higher than that of A.sub.i,n.sup.el(ω.sub.ext,n). An effect of a frequency that is not in a resonance condition in the harmonic wave may not be enough to change the locations of the local maximum values caused by the resonance condition. Accordingly, the local maximum values may be observed in the DJ transform spectrogram at the locations of the frequencies included in the harmonic wave.
[0074] Hereinafter, the relationship between frequencies included in the harmonic wave and a maximum value of the displacement x.sub.i(t) of the spring, which is in a resonance condition to one of the frequencies, will be described. In the DJ transform, a maximum value of the displacement x.sub.i(t) of the spring, which resonates with the fundamental frequency f.sub.0, may be calculated at a period of 1/f.sub.0. An frequency f.sub.j, which is not a fundamental frequency, but included in the harmonic wave, may affect the maximum value of the displacement x.sub.i(t) of the spring, but a period 1/f.sub.j of the frequency f.sub.j may be a divisor of 1/f.sub.0, and thus when the maximum value is calculated at a period 1/f.sub.0, the behavior of the maximum value with respect to time may have a periodic characteristic. In the DJ transform, a maximum value of the displacement x.sub.i(t) of the spring in the resonance condition to f.sub.j, which is not the fundamental frequency, may also be calculated at a period 1/f.sub.j. Because a period in a section affected by f.sub.0 may be 1/f.sub.0 (1/f.sub.0>1/f.sub.j), when a maximum value of the displacement x.sub.i(t) of the spring, which does not resonate with the fundamental frequency f.sub.0, is calculated at a period of 1/f.sub.j, the amplitude of the fundamental frequency f.sub.0 may not be uniform at time points of the period of 1/f.sub.j so that the maximum value of the displacement x.sub.i(t) of the spring may not have a periodic characteristic.
[0075] Accordingly, since the periodic characteristic of the maximum value of the displacement x.sub.i(t) related to f.sub.0 may be maintained, an oscillation amplitude of the value may be small, and since the periodic characteristic of the maximum value of the displacement x.sub.i(t) related to f.sub.i may not be maintained, the oscillation amplitude of the value may be large. The characteristic of the maximum value of the displacement x.sub.i(t) may be applied without change to the amplitude of the spectrogram based on the estimated pure-tone amplitude, calculated using the maximum value of the displacement x.sub.i(t) and using Equations 11 and 12. Accordingly, when a standard deviation of the amplitude of the spectrogram is calculated, the standard deviation may be small in a section related to f.sub.0 and may be great in a section related to f.sub.i.
[0076] In summary, it may be seen that, for a given harmonic wave, when the amplitude of the spectrogram of a fundamental frequency of a spring that resonates with fundamental frequencies of the harmonic wave is measured, the spring that resonates with the fundamental frequencies of the harmonic wave has 1) a small variance of the amplitude over time and 2) a great maximum value of the amplitude.
[0077] Based on these characteristics, the degree of fundamental frequency suitability may be calculated based on the moving average of the estimated pure-tone amplitude or the moving standard deviation of the estimated pure-tone amplitude with respect to each natural frequency of the DJ transform spectrogram (S200).
[0078] For example, the degrees of fundamental frequency suitability may be proportional to a moving average M(t, f) of a DJ transform spectrogram S(t, f), or may be inversely proportional to a moving standard deviation σ(t, f).
[0079] Here, N may be an integer, and c may be a very small value that is greater than 0. For example, ε may be ε(t)=max.sub.f(S(t,f)×10.sup.−12 at time t.
[0080] In order to reduce an effect of a small amplitude in the spectrogram, if M(t,f)<0.1×max.sub.f(S(t,f)), M(t,f)=β×max.sub.f(S(t,f)) may be satisfied. Here, β may be a small value, and β=10.sup.−12 may be used.
[0081] In some embodiments,
may also be used, instead of Equation 19.
[0082] Then, a fundamental frequency may be extracted based on the local maximum values of the degrees of fundamental frequency suitability of natural frequencies at each time point (S300).
[0083] In some embodiments, the fundamental frequency may be extracted as the lowest value among frequencies corresponding to the local maximum values of the degrees of fundamental frequency suitability depending on the natural frequencies at each time point.
[0084]
[0085] Referring to
[0086] The fundamental frequency extraction operation S300 does not need to include all of operations S310 to S360, and in some embodiments, may include only some of operations S310 to S360.
[0087] In some embodiments, the fundamental frequency extraction operation S300 may include: the black-and-white spectrogram generation operation S310 in which the N (N being an integer equal to or greater than 2) topmost degrees of fundamental frequency suitability are extracted among the degrees of fundamental frequency suitability at the respective time points, values corresponding to natural frequencies corresponding to the N topmost degrees of fundamental frequency suitability are set to “1”, and the remaining values are set to “0”; the average black-and-white spectrogram generation operation S320 in which an average over each region of the black-and-white spectrogram is calculated, where the regions of the black-and-white-spectrogram have the uniform size containing each point of the black-and-white spectrogram; and operation S330 of extracting the local maximum value in the average black-and-white spectrogram depending on the natural frequencies at the respective time points.
[0088] In the black-and-white spectrogram generation operation S310, the N topmost degrees of fundamental frequency suitability may be extracted from the degrees of fundamental frequency suitability, R(t,f), at time t at which the DJ transform spectrogram is configured. Based on whether a corresponding degree of fundamental frequency suitability is one of the N topmost degrees of fundamental frequency suitability, a black-and-white spectrogram having a value of 0 and 1 may be configured. When each of the degrees of fundamental frequency suitability, R(t,f), is one of the N topmost degrees of fundamental frequency suitability at time t, BW(t,f)=1, and otherwise, BW(t,f)=0.
[0089] In the average black-and-white spectrogram generation operation S320, an average over a region may be calculated using the following equation based on each point for respective points included in the black-and-white spectrogram BW(t,f). The result as configured above will be referred to as the average black-and-white spectrogram
[0090] In operation S330 of extracting the local maximum value of the average black-and-white spectrogram, greater local maximum values than a given threshold
[0091] That is, the extracted local maximum values may simultaneously satisfy the following conditions.
[0092] The fundamental frequency extraction operation S300 may further include the candidate fundamental frequency extraction operation S340 in which a candidate fundamental frequency is extracted based on both a difference between natural frequencies corresponding to adjacent local maximum values in the average black-and-white spectrogram depending on the natural frequencies at respective time points and the lowest frequency among the natural frequencies corresponding to local maximum values in the average black-and-white spectrogram.
[0093] A frequency corresponding to a kth local maximum value in the result, which is obtained by aligning the local maximum values extracted from the average black-and-white spectrogram at time tin ascending order of frequency, will be referred to as {circumflex over (f)}(t, k). An interval {circumflex over (d)}(t, k) between adjacent frequencies may be calculated as follows.
{circumflex over (d)}(t,k)={circumflex over (f)}(t,k+1)−{circumflex over (f)}(t,k) (Equation 27)
[0094] Values greater than 0.4×{circumflex over (f)}(t,0) may be selected among values of {circumflex over (d)}(t, k), the lowest value thereamong may be compared with {circumflex over (f)}(t, 0), and the smaller value of the lowest value and {circumflex over (f)}(t,0) may be taken as a candidate fundamental frequency (t) at time t. This is based on the observation that there is a high probability that the frequency having the minimum frequency difference with a frequency adjacent thereto, among the frequencies of the harmonic wave present in a sound of a voice or a musical instrument, is the fundamental frequency.
[0095] If all frequencies included in the harmonic wave without noise have the same amplitude, {circumflex over (d)}(t, k)={circumflex over (f)}(t,0) may be satisfied for all values of k.
[0096] The fundamental frequency extraction operation S300 may include the black-and-white-spectrogram-based fundamental frequency setting operation S350, and the black-and-white-spectrogram-based fundamental frequency setting operation may include: an operation of setting a candidate fundamental frequency at a time having the smallest moving variance that corresponds to a difference with a candidate fundamental frequency at an adjacent time thereto among candidate fundamental frequencies at a plurality of time points to a black-and-white-spectrogram-based fundamental frequency at the time; and an operation of setting a first region including a positive integer multiple of a time average of the black-and-white-spectrogram-based fundamental frequency, set for a predetermined time duration, and setting a value, obtained by dividing the highest frequency belonging to the first region in the average black-and-white spectrogram at a time adjacent to the predetermined time duration by a positive integer corresponding to the first region, to which the highest frequency belongs, to the black-and-white-spectrogram-based fundamental frequency at the time adjacent to the predetermined time duration.
[0097] It may be assumed that the candidate fundamental frequency (t) at each time t is found. First, in order to search for the black-and-white-spectrogram-based fundamental frequency BF.sub.0(t) each time t, the black-and-white-spectrogram-based fundamental frequency BF.sub.0(t) at a specific time t.sub.0 may be calculated. Second, as a time increases from the time t.sub.0, the black-and-white-spectrogram-based fundamental frequency may be calculated. Third, as a time decreases from the time t.sub.0, the black-and-white-spectrogram-based fundamental frequency may be calculated.
[0098] In a first operation, the time t.sub.0 at which the black-and-white-spectrogram-based fundamental frequency is calculated may be determined as a time having the smallest variance of change over time in the black-and-white spectrogram-based candidate fundamental frequency at each time. A variance V(t) of change in a black-and-white spectrogram-based candidate fundamental frequency at each time t may be calculated using the following equation.
[0099] The time t.sub.0 at which V(t) has the smallest value may be t.sub.0=argmin.sub.t(V(t)), and the fundamental frequency BF.sub.0(t.sub.0) at the time t.sub.0 may be finally determined to be the same value as a candidate fundamental frequency as follows.
BF.sub.0(t.sub.0)=(t.sub.0) (Equation 31)
[0100] In a second operation, as a time increases from the time t.sub.0, the black-and-white-spectrogram-based fundamental frequency may be calculated. The black-and-white-spectrogram-based fundamental frequency will be assumed to be calculated from the time t.sub.0 to time t.sub.k. A set of natural frequencies which include both frequencies, which are near an average frequency,
H(t.sub.k+1)=∪.sub.1≤i≤i.sub.
[0101] Here,
[0102] For example, Δf=20 Hz, i.sub.max=5 may be set.
[0103] Let f.sub.max be the frequency which is included in the set H(t.sub.k+1) and, compared to other frequencies in the set H(t.sub.k+1), has the highest value in the average black-and-white spectrogram. It may be assumed that f.sub.max belongs to the frequency domain [m×
[0104] As k is incremented by one until the time t.sub.k+1 becomes the last time of a given spectrogram, the aforementioned second operation may be repeatedly performed.
[0105] In a third operation, as a time decreases from the time t.sub.0, the black-and-white-spectrogram-based fundamental frequency at each time may be calculated until t=0 by performing a procedure similar to the second operation.
[0106] Then, the fundamental frequency extraction operation S300 may further include the final fundamental frequency setting operation S360 in which a second region including a positive integer multiple of the black-and-white-spectrogram-based fundamental frequency at an arbitrary time is set, and a value, which is obtained by dividing a frequency having the highest degree of fundamental frequency suitability among frequencies of the second region by a positive integer corresponding to the second region to which the frequency having the highest degree of fundamental frequency suitability belongs, is set to the final fundamental frequency at the arbitrary time.
[0107] A final fundamental frequency f.sub.0(t) may be extracted using the black-and-white-spectrogram-based fundamental frequency BF.sub.0(t) at each time t and the aforementioned degrees of fundamental frequency suitability, R(t,f).
[0108] A set of frequencies near the black-and-white-spectrogram-based fundamental frequency BF.sub.0(t) at each time t and frequencies of a positive integer multiple of BF.sub.0(t) will be referred to as H.sub.BF.sub.
[0109] Here, Δf=20 Hz and i.sub.max=5 may be set.
[0110] It may be assumed that the frequency having the highest degree of fundamental frequency suitability, R(t,f), among frequencies belonging to the set H.sub.BF.sub.
[0111]
[0112]
[0113] As seen from
[0114]
[0115]
[0116] As seen from
[0117]
[0118]
[0119]
[0120] In a method of extracting the fundamental frequency of an input sound according to an embodiment of the present disclosure, the measurement precision enables the resultant frequency obtained by processing the input sound using the method to be determined within an error range of 5 Hz.
[0121] In the method of extracting a fundamental frequency of an input sound according to an embodiment of the present disclosure, a spectrogram variance corresponding to the lowest frequency may be smaller than spectrogram variances corresponding to other frequencies in a spectrogram of the result obtained by processing the input sound using the method.
[0122] As seen from
[0123]
[0124] The sound processing device may be any one of various types of digital computers. For example, the sound processing device may be a laptop computer, a desktop computer, a workstation, a server, a blade server, a mainframe, or any other suitable computers. Alternatively, the sound processing device may be any one of various types of mobile devices. For example, the sound processing device may be a personal digital assistant (PDA), a cellular phone, a smartphone, a wearable device, or any other similar computing devices. Components, connections and relations therebetween, and functions thereof, disclosed in the present disclosure, are merely illustrative and do not limit the scope of the present disclosure.
[0125] As shown in
[0126] A plurality of components of the sound processing device 900 are connected to the I/O interface 905. The plurality of components include an input unit 906, such as a keyboard, a mouse, or a microphone, an output unit 907, such as a monitor, or a speaker, a storage unit 908, such as a magnetic disk or an optical disc, and a communication unit 909, such as a network card, a modem, or a wireless communication transceiver. For example, a sound from which a fundamental frequency is to be extracted may be input through the microphone. The communication unit 909 allows the sound processing device 900 to exchange information/data with other devices through a computer network, such as the Internet, and/or telegraph networks.
[0127] The computing unit 901 may be a general purpose/dedicated processing component having processing and calculation functions. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), a dedicated artificial intelligence calculation chip, a computing unit configured to execute a machine learning model algorithm, a digital signal processor (DSP), and any other suitable processors, controllers, and microcontrollers. The computing unit 901 performs the sound processing method described above. For example, in an embodiment, the sound processing method may be implemented by a computer software program and may be stored in a machine-readable medium, such as the storage unit 908. In an embodiment, some or the entirety of a computer program may be loaded into and/or installed in the sound processing device 900 by the ROM 902 and/or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one step or a plurality of steps of the sound processing method described above may be performed. In another embodiment, the computing unit 901 is configured to perform the sound processing method according to the embodiment of the present disclosure in any other suitable manners (e.g. firmware).
[0128] In the present disclosure, the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, and devices, or suitable combinations thereof. More specific examples of the machine-readable storage medium may include electrical connection based on one line or a plurality of lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), a erasable programmable read-only memory (EPROM or flash memory), optical fiber, CD-ROM, an optical storage device, a magnetic storage device, or any suitable combinations thereof.
[0129] A sound may be input to the sound processing device 900 through the microphone. The sound input through the microphone may be stored in an electronic form and may then be used. Alternatively, the input sound may be directly provided as an electronic file through the storage unit 908 or may be stored in an electronic form through the communication unit 909 and may then be used.
[0130] In this embodiment, the extracted fundamental frequency may be used to recognize the input sound or to synthesize the sound.
[0131] The sound processing method and the sound processing device according to this embodiment may be applied to an object, such as a musical instrument, as well as the voice of a person. That is, the sound processing method and the sound processing device may be used to recognize and synthesize the sound of any one of various kinds of objects, such as musical instruments, as well as the person.
[0132] Although the present disclosure has been described in detail with reference to exemplary embodiments, the present disclosure is not limited thereto, and various changes and applications can be made without departing from the technical spirit of the present disclosure, which will be obvious to a person skilled in the art. Therefore, the scope of protection for the present disclosure should be determined based on the following claims, and all technical ideas falling within the scope of equivalents thereto should be interpreted as being included in the scope of the present disclosure.