Folk music style identification method and system and storage medium
By calculating the transient intensity factor and constructing the state transition matrix to decode the fundamental frequency sequence, the problem of distinguishing between harmonics and noise in folk music was solved, the separation of melody and technique information was achieved, and the accuracy of folk music style identification was improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ANYANG NORMAL UNIV
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-05
AI Technical Summary
Existing technologies cannot effectively distinguish between harmonic stable components and non-harmonic or transient noise components in folk music, leading to errors in fundamental frequency estimation. Furthermore, they cannot separately utilize stylistic information from melodic stable segments and segments rich in performance techniques, affecting the accuracy of music style identification.
By calculating the transient intensity factor to weight the periodic difference function, candidate fundamental frequencies with stable harmonic structures are selected. A state transition matrix is constructed to decode the optimal fundamental frequency sequence, which is then divided into performance technique segments and melodic stable segments. Feature subsets are extracted from each segment to form feature vectors.
It improves the accuracy of folk music style recognition by separating melodic stability information from performance technique information to construct a distinctive feature vector, thereby enhancing the recognition effect.
Smart Images

Figure CN121983084A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of identification, and in particular relates to a method, system and storage medium for identifying folk music styles. Background Technology
[0002] The style of folk music is reflected in its melodic outline, rhythmic patterns, and rich performance techniques. Fundamental frequency estimation algorithms, such as YIN and its probabilistically improved version pYIN, perform well in general music processing. However, when processing folk music, the frequent performance techniques in folk music can cause transient changes in the signal, easily leading to octave frequency hopping errors in fundamental frequency estimation; pYIN also ignores the global tonal structure of the music when decoding the optimal fundamental frequency path. In existing techniques for feature extraction based on fundamental frequency for style recognition, the generation and selection of fundamental frequency candidate points, based on threshold or energy criteria, fails to distinguish between the stable harmonic components and non-harmonic or transient noise components in the signal, resulting in inconsistent quality of the initial candidate set and increasing the difficulty and error rate of decoding. In the feature extraction stage, there is a tendency to perform uniform statistical analysis on the entire fundamental frequency sequence, failing to distinguish and utilize the different stylistic information carried by stable melodic segments and segments rich in performance techniques. Stable melodic segments reflect tonality, while technique segments reflect the performer's expressiveness and regional characteristics. Mixing the two methods to extract features dilutes their respective distinctiveness, thus weakening the feature vector's ability to represent musical style. Therefore, how to improve the fundamental frequency extraction process for the characteristics of folk music and plan a feature extraction strategy are urgent technical problems to be solved in this field. Summary of the Invention
[0003] This invention proposes a method for identifying folk music styles to address the problems of existing technologies failing to distinguish between stable harmonic components and non-harmonic or transient noise components in signals, and failing to differentiate and utilize the different stylistic information carried by stable melodic segments and segments rich in performance techniques. The method includes: Acquire folk music audio signals, calculate transient intensity factors for each analysis window based on the short-time energy envelope change rate of the signals; use the transient intensity factors to weight the periodic difference function to obtain the modified difference function; The modified difference function is subjected to cumulative mean normalization, and the harmonic structure stability of each analysis window is calculated; based on the harmonic structure stability, a set of fundamental frequency candidate points is selected for each analysis window, wherein the harmonic structure stability is negatively correlated with the size of the set of fundamental frequency candidate points; The global tonality probability distribution is calculated based on the set of fundamental frequency candidate points from all analysis windows; a state transition matrix is constructed, the state transition cost of which is determined by the frequency difference between adjacent fundamental frequencies and the concordance between the current fundamental frequency and the global tonality probability distribution; the optimal fundamental frequency sequence is decoded using the state transition matrix. Based on the transient intensity factor corresponding to each fundamental frequency in the optimal fundamental frequency sequence, the sequence is divided into performance technique segments and melodic stability segments; feature subsets are extracted from the two types of segments and concatenated to form feature vectors; the feature vectors are input into a preset classification model to output style recognition results.
[0004] Furthermore, the present invention also relates to a folk music style identification system, comprising the following modules: The weighting module is used to acquire folk music audio signals, calculate the transient intensity factor of each analysis window based on the short-time energy envelope change rate of the signal, and use the transient intensity factor to weight the periodic difference function to obtain the modified difference function. The filtering module is used to perform cumulative mean normalization on the modified difference function and calculate the harmonic structure stability of each analysis window; based on the harmonic structure stability, a set of fundamental frequency candidate points is selected for each analysis window, wherein the harmonic structure stability is negatively correlated with the size of the set of fundamental frequency candidate points; The decoding module is used to calculate the global tonality probability distribution based on the set of fundamental frequency candidate points of all analysis windows; construct a state transition matrix, the state transition cost of which is determined by the frequency difference between adjacent fundamental frequencies and the concordance degree between the current fundamental frequency and the global tonality probability distribution; and decode the optimal fundamental frequency sequence using the state transition matrix. The output module is used to divide the sequence into performance technique segments and melodic stability segments according to the transient intensity factors corresponding to each fundamental frequency in the optimal fundamental frequency sequence; extract feature subsets from the two types of segments respectively and concatenate them to form feature vectors; input the feature vectors into a preset classification model and output the style recognition result.
[0005] This invention uses a transient intensity factor to weight the periodic difference function, which can suppress the interference of transient changes caused by performance techniques in folk music on the fundamental frequency extraction process. When decoding the optimal fundamental frequency path, global tonality information is used in the calculation of state transition costs, making the resulting fundamental frequency sequence physically smooth and conforming to the inherent laws of music theory. Based on transient intensity, the fundamental frequency sequence is divided into melodic stable segments and performance technique segments, and features are extracted from each. This differentiated processing method can separate and retain stable melodic information reflecting modal structure from technical information reflecting expressiveness, thereby constructing a discriminative feature vector and improving the accuracy of folk music style recognition. Attached Figure Description
[0006] Figure 1 A flowchart of the first embodiment; Figure 2 This is a schematic diagram of the weighting function; Figure 3This is a schematic diagram of the optimal baseband path search based on Viterbi decoding; Figure 4 This is a schematic diagram of the feature extraction and connection process. Detailed Implementation
[0007] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0008] The term "multiple" in this application refers to two or more. Furthermore, it should be understood that the terms "first," "second," etc., used in the description of this application are used only for descriptive purposes and should not be construed as indicating or implying relative importance, nor as indicating or implying order.
[0009] Figure 1 A flowchart of a folk music style identification method proposed in the first embodiment includes: S1, acquire folk music audio signals, calculate transient intensity factors for each analysis window based on the short-time energy envelope change rate of the signals; use the transient intensity factors to weight the periodic difference function to obtain a modified difference function, wherein the value of the transient intensity factors is positively correlated with the suppression effect produced by the weighting; The input folk music audio signal is preprocessed, including resampling to a uniform sampling rate such as 22050Hz and performing frame segmentation, for example, each frame contains 4096 sampling points, with a frame shift of 1024 sampling points. For the t-th analysis window, the short-time energy of the analysis window is calculated. This is the sum of squares of the amplitudes of all signal sampling points within the window. The first-order difference of the short-time energy envelope in the logarithmic domain is calculated to obtain the transient intensity factor of the t-th analysis window. ,Right now In the pYIN algorithm for calculating the periodic difference function Based on this, a weighting function based on transient intensity factors is used. For example, Gaussian function Where α is a control parameter. Multiplying the original difference function by this weighting function yields the modified difference function. When the transient intensity factor A large value indicates a drastic change in the signal, at which point the weighting function... The value of approaches 0, thus exerting a strong inhibitory effect on the difference function, such as Figure 2 .
[0010] In an optional embodiment, calculating the transient intensity factor for each analysis window based on the short-time energy envelope change rate of the signal includes: The audio signal is divided into frames, and the short-time energy of each frame is calculated. The short-time energy sequences of adjacent frames are first-order differencing, and the difference results are processed by half-wave rectification. The results after half-wave rectification are normalized to the [0,1] interval by the maximum value to obtain the transient intensity factor of each analysis window.
[0011] Specifically, assuming an audio sampling rate of 44100Hz, this sampling rate is divided into continuous analysis windows or frames, each with a length of 2048 sampling points, and adjacent frames are overlapped by 1024 sampling points. For each frame m, the short-time energy of the frame is calculated. This is the sum of the squares of the amplitudes of all sampling points within the frame. For example, the short-time energy calculation result for frame 10 is 15.6, for frame 11 it is 12.1, and for frame 12 it is 19.5, thus obtaining a short-time energy sequence that varies over time.
[0012] The short-time energy sequence obtained above is subjected to first-order differencing to calculate the energy increment between adjacent frames. For example, the difference between frame 11 and frame 10 is -3.5, and the difference between frame 12 and frame 11 is 7.4. To focus only on the energy increase, i.e., the beginning of the musical tone, the difference results are subjected to half-wave rectification, setting all negative values to zero. Half-wave rectification, when processing a signal with both positive and negative values, retains the signal in one direction (e.g., all positive values) while setting the signal in the other direction (e.g., all negative values) to zero or filtering it out completely. After processing, the difference sequence becomes 0 and 7.4. To ensure a uniform scale for this index, the maximum value of the difference after half-wave rectification is found in all analysis windows of the entire audio segment, assumed to be 10.0. This value is then normalized by dividing the value of all frames by this maximum value. The transient intensity factor of frame 12 is 0.74, while that of frame 11 is 0. The values between 0 and 1 represent the probability and intensity of the onset of a musical sound in each analysis window.
[0013] To reduce interference from unstable regions in the audio signal on fundamental frequency extraction, in an optional embodiment, the step of weighting the periodic difference function using the transient intensity factor to obtain a modified difference function includes: Let the transient intensity factor of the current analysis window be TSF(t), the original period difference function be d(t), and the weighting coefficient w(t) = 1 - TSF(t). Multiply the original period difference function d(t) and the corresponding weighting coefficient w(t) element-wise to obtain the modified difference function. .
[0014] For a specific analysis window t, the transient intensity factor TSF(t) and the original period difference function d(t) for fundamental frequency extraction have been calculated. The period difference function is a vector, where each element represents the similarity of the signal at different delay periods, and the peak position corresponds to a possible fundamental frequency period. Suppose that in the analysis window t at the beginning of a musical note, the calculated transient intensity factor TSF(t) is a high value, such as 0.9, indicating that the signal changes drastically within this window, and the fundamental frequency information is unreliable.
[0015] The weighting coefficient w(t) is calculated and set to 0.1. This scalar weighting coefficient is then multiplied by each element of the original periodic difference function vector d(t). If d(t) is a vector [0.2, 0.8, 0.5, ...], the corrected difference function d'(t) becomes [0.02, 0.08, 0.05, ...]. All peaks in the original difference function are weakened. Conversely, if the TSF(t) value is low, such as 0.05, in a melodicly stable analysis window, the weighting coefficient w(t) is 0.95, and the corrected difference function will remain essentially unchanged. The weighting process utilizes the transient intensity factor as a reliability measure to suppress or preserve the fundamental frequency information for each analysis window.
[0016] S2, perform cumulative mean normalization on the modified difference function and calculate the harmonic structure stability of each analysis window; based on the harmonic structure stability, select a set of fundamental frequency candidate points for each analysis window, wherein the harmonic structure stability is negatively correlated with the size of the set of fundamental frequency candidate points; The cumulative mean normalization process is consistent with the standard YIN algorithm, and it modifies the difference function. Each delay in The difference function is obtained by normalizing the cumulative mean of all the previous differences. Harmonic structure stability Defined as the minimum value that the normalized difference function can achieve within the fundamental frequency period, i.e. The closer this value is to 1, the more stable and clear the harmonic structure. The fundamental frequency candidate point is the normalized difference function. The frequencies corresponding to all local minima less than a certain absolute threshold, such as 0.1, are used to filter candidate fundamental frequencies for each analysis window. A threshold related to harmonic structure stability is set. The upper limit of the number of relevant candidate points ,For example Where C is a constant. When the harmonic structure stability High time, When the value is small, only a few candidate points with the highest confidence are retained; conversely, when... When low, A larger value allows for more possible decoding possibilities.
[0017] To evaluate the clarity and reliability of the fundamental frequency information within the current analysis window, in an optional embodiment, the calculation of the harmonic structure stability of each analysis window includes: In the modified difference function after cumulative mean normalization, the peak values corresponding to the first 10 harmonic positions are extracted based on the period corresponding to the global maximum point; the coefficient of variation of the 10 harmonic peak values is calculated, and the reciprocal of the coefficient of variation is used as the representation value of the harmonic structure stability of the analysis window.
[0018] Specifically, for a given analysis window, the global maximum point is found in the modified difference function d'(t) of the analysis window. The period corresponding to this point is... This is considered a preliminary estimate of the fundamental frequency period. For example, if the maximum value occurs at a delay of 200 sampling points, then... A musical tone with a stable harmonic structure should have a peak in its difference function not only at the fundamental frequency period, but also at integer parts of the period, i.e., at the period positions corresponding to the harmonic frequencies, with a series of peaks.
[0019] based on Calculate the theoretical positions of the first 10 harmonic cycles, i.e. In the modified difference function, the actual peak amplitude is searched and extracted within a small neighborhood of the theoretical position. For example, in A peak value of 0.85 was found nearby. A peak value of 0.82 was found nearby, and so on, resulting in an amplitude list containing 10 harmonic peak values, such as [0.85, 0.82, 0.79, ...]. The statistical properties of this list, namely the mean and standard deviation, were calculated, and the coefficient of variation (CV) was determined using the formula: CV = standard deviation / mean. The reciprocal of this coefficient of variation, 1 / CV, was used as an indicator of the stability of the harmonic structure. A stable and clear harmonic structure should have a relatively regular distribution of harmonic peak values, resulting in a smaller coefficient of variation and a larger reciprocal value, and vice versa.
[0020] In order to adjust the search space of the fundamental frequency tracking algorithm according to signal quality, in an optional embodiment, the step of selecting a set of candidate fundamental frequencies for each analysis window based on the harmonic structure stability includes: If the harmonic structure stability of the current analysis window is greater than the harmonic structure stability threshold, then the global maximum point in the modified difference function is selected as the only fundamental frequency candidate point; if it is less than or equal to the harmonic structure stability threshold, then the N peak points with the highest amplitude in the modified difference function are selected to form the fundamental frequency candidate point set, where N is a positive integer.
[0021] A decision process is set for each analysis window, using a preset harmonic structure stability threshold. The value is set to 0.8, and the number of candidate points N to be selected in low stability cases is set to 5. For the currently processed analysis window, the calculated harmonic structure stability representation value is extracted and compared with the threshold. Compare them.
[0022] There are two scenarios. First, if the stability index is greater than 0.8 (e.g., a calculated value of 1.2), it indicates that the harmonic structure of the analysis window is clear and reliable, and the global maximum point in the modified difference function may correspond to the true fundamental frequency. Therefore, only the frequency corresponding to this single global maximum point is selected as the sole candidate fundamental frequency point. Second, if the stability index is less than or equal to 0.8 (e.g., a calculated value of 0.5), it indicates that the signal may have noise, polyphony, or octave error issues, reducing the reliability of the global maximum point. In this case, to avoid prematurely eliminating the correct answer, a conservative strategy is adopted: the top five amplitude peaks in the modified difference function are identified, and the frequencies corresponding to these five peaks constitute the candidate fundamental frequency point set for the analysis window. This candidate point selection mechanism makes the algorithm efficient when the signal is clear and robust when the signal is ambiguous.
[0023] S3, Calculate the global tonality probability distribution based on the set of fundamental frequency candidate points for all analysis windows; construct a state transition matrix, the state transition cost of which is determined by the frequency difference between adjacent fundamental frequencies and the concordance between the current fundamental frequency and the global tonality probability distribution; decode the optimal fundamental frequency sequence using the state transition matrix; All fundamental frequency candidate points in all analysis windows are mapped to 12 semitone levels, and the frequency of each level is counted to form a 12-dimensional chromaticity histogram. This histogram is then normalized to obtain the global tonality probability distribution. In another embodiment, each frequency value in the set of fundamental frequency candidate points in all analysis windows is mapped to 12 semitone pitch levels through logarithmic and modulo operations. Then, similarly, a 12-dimensional histogram is constructed, and all candidate points are traversed. Each candidate point is accumulated in the statistical bin of its corresponding pitch level. During accumulation, the peak amplitude in the modified difference function is preferably used as the weight, as more significant fundamental frequency candidate points contribute more to the final tonality distribution. After traversing all candidate points in all analysis windows, the 12-dimensional accumulated histogram is normalized so that the sum of all its elements is 1, resulting in a global tonality probability distribution that reflects the pitch usage tendency of the entire piece of music.
[0024] When constructing the state transition matrix for Viterbi decoding, the fundamental frequency candidate points from frame t-1 are... Candidate points of the fundamental frequency transferred to frame t The cost C(i,j) consists of two parts. The first part is the frequency smoothing cost, which is the square of the difference between the two fundamental frequencies on the logarithmic frequency scale. The second part is the tone concordance cost, which is the cost of adjusting the current fundamental frequency. Mapping to the corresponding pitch C, find the probability value of that pitch from the global tonality probability distribution. The concordance cost is calculated as a negative logarithmic probability. The total transfer cost is the weighted sum of the costs from the two components. Using the Viterbi algorithm, a path with the minimum cumulative cost from the start frame to the end frame is found in the lattice network composed of all frames. The fundamental frequency sequence along this path is the optimal fundamental frequency sequence, such as... Figure 3 .
[0025] To use the Viterbi algorithm to find the optimal fundamental frequency path and define the transition cost between states, in an optional embodiment, the state transition matrix is constructed. The state transition cost of this matrix is determined by the frequency difference between adjacent fundamental frequencies and the concordance between the current fundamental frequency and the global tonality probability distribution, including: Let the fundamental frequency of the previous analysis window be... The fundamental frequency of the current analysis window is The corresponding pitch level is If the global tonality probability distribution is P(k), then from Transferred to State transition cost The calculation formula is: k1 is a coefficient.
[0026] Specifically, the state refers to the fundamental frequency candidate point for each analysis window, which requires calculating a fundamental frequency candidate point from the previous analysis window. Move to a candidate fundamental frequency point in the current analysis window. The cost is comprised of two weighted components with weighting coefficients of 0.6 and 0.4. The first component is the melody smoothness cost, using logarithmic frequency differences, such that the cost is proportional to the musical interval size. For example, the cost of shifting from 220Hz to 221Hz is less than the cost of jumping an octave from 220Hz to 440Hz. The second component is the tonality consonance cost, which requires a pre-calculated global tonality probability distribution P(k), a vector containing 12 values representing the probability of each of the 12 pitches from C to B appearing in the entire piece of music. The current candidate fundamental frequency is then... Convert to the corresponding pitch level For example, 261.6Hz corresponds to the pitch C. The probability of this pitch is found in P(k), e.g., P(C) = 0.3. The negative logarithm is then multiplied by a weight of 0.4 to obtain the tonality cost. A note that matches the tonality of the music has a higher probability of occurrence and a lower cost. The melody smoothness cost and the tonality consonance cost are added together to obtain the total transition cost C(i,j). This calculation is repeated for all possible transition combinations to construct the complete cost matrix.
[0027] S4. Based on the transient intensity factor corresponding to each fundamental frequency in the optimal fundamental frequency sequence, the sequence is divided into performance technique segments and melodic stability segments; feature subsets are extracted from the two types of segments and concatenated to form feature vectors; the feature vectors are input into a preset classification model to output style recognition results.
[0028] Set a transient intensity threshold Th. Iterate through each fundamental frequency point in the optimal fundamental frequency sequence. Query the transient intensity factor of the corresponding analysis window .like If the value is greater than Th, then the frame and its corresponding fundamental frequency point will be... Classified as performance technique segments; if If the frequency is not greater than Th, it is classified as a melodic stable segment. For all fundamental frequency points classified as melodic stable segments, their pitch histogram, interval histogram, average pitch, and pitch standard deviation statistical characteristics are calculated to form a melodic feature subset. For all fundamental frequency points classified as performance technique segments, the mean and variance of their fundamental frequency change rate and the mean and variance of their transient intensity factor are calculated to represent the technique characteristics, forming a technique feature subset. The melodic feature subset and the technique feature subset are concatenated end-to-end to form a high-dimensional feature vector, such as... Figure 4 This vector is input into a support vector machine or deep neural network classifier that has been pre-trained with folk music samples. The classifier then outputs the most likely style category of the music, such as Jiangnan style or Northwest style.
[0029] To semantically segment the optimal fundamental frequency sequence after obtaining it, in an optional embodiment, the step of dividing the sequence into performance technique segments and melodic stability segments based on the transient intensity factor corresponding to each fundamental frequency in the optimal fundamental frequency sequence includes: traversing each frame in the optimal fundamental frequency sequence; if the transient intensity factor corresponding to the frame is greater than a transient intensity factor threshold... If the frame is valid, it is marked as a performance technique frame; otherwise, it is marked as a melody stability frame. Consecutive marked frames of the same type with a length greater than 5 frames are merged to form performance technique segments and melody stability segments.
[0030] Using the previously calculated transient intensity factor (TSF) sequence, which corresponds one-to-one with the fundamental frequency sequence in time, a transient intensity threshold is set. The value is 0.7. The optimal fundamental frequency sequence is checked frame by frame. For frame t, the transient intensity factor (TSF(t)) is checked. If TSF(t) is greater than 0.7, the frame is likely the start of a note or a dramatic performance action; this frame is labeled a performance technique frame. If TSF(t) is not greater than 0.7, it indicates a sustain or stable portion of a note; this frame is labeled a melodic stability frame.
[0031] After frame-by-frame labeling, a label sequence is obtained, such as [melody stability, melody stability, performance technique, performance technique, ...]. The process involves finding consecutive label frames of the same type within the sequence. If the length of a consecutive segment of the same type of label frames exceeds a preset length threshold of 5 frames, that frame is considered a meaningful segment. For example, 8 consecutive frames of performance technique labels will be merged into a performance technique segment, and 20 consecutive frames of melody stability labels will be merged into a melody stability segment. A consecutive label segment of only 3 frames may be ignored or merged with adjacent segments. Through this process, the original continuous fundamental frequency sequence is segmented into two macroscopic segments with different musical attributes.
[0032] In an optional embodiment, the step of extracting feature subsets from the two types of segments and concatenating them to form a feature vector includes: The first feature subset consists of three dimensions: the mean of the first-order difference of the fundamental frequency, the fundamental frequency jitter, and the amplitude jitter, calculated from each performance technique segment. The second feature subset consists of 27 dimensions: the one-dimensional statistical features derived from the fundamental frequency histogram and the mean and standard deviation of the first 13 dimensions of Mel frequency cepstral coefficients, calculated from each stable melody segment. The first and second feature subsets are then concatenated sequentially to form a 30-dimensional feature vector.
[0033] Specifically, all data labeled as performance technique segments are processed, and the fundamental frequency sequence and amplitude sequence corresponding to the segments are aggregated to calculate three-dimensional features: the mean of the first-order difference of the fundamental frequency, which reflects the average rate of pitch change; fundamental frequency jitter, which represents small, rapid fluctuations in the fundamental frequency; and amplitude jitter, which represents small, rapid fluctuations in the signal amplitude. These three values constitute the first feature subset.
[0034] All data marked as melodically stable segments are processed. For the fundamental frequency values within these segments, a fundamental frequency histogram representing the semitones is constructed, and a statistical feature, such as information entropy or peak-to-peak ratio, is calculated from this histogram to represent the stability and distribution of tonality; this constitutes a one-dimensional feature. Simultaneously, the first 13 dimensions of the audio signal corresponding to the segment, namely the Mel-frequency cepstral coefficients (MFCCs), are extracted. The mean and standard deviation of these 13 coefficients over time are calculated, yielding 26 features. These 26 MFCC statistical features are combined with the one-dimensional fundamental frequency histogram features to form a 27-dimensional second feature subset representing the timbre and tonality stability of the music. The three dimensions of the first feature subset are sequentially concatenated with the 27 dimensions of the second feature subset to form a 30-dimensional feature vector, which summarizes the performance techniques and melodic timbre information of the entire musical piece.
[0035] In the second embodiment, the present invention proposes a folk music style identification system, comprising the following modules: The weighting module is used to acquire folk music audio signals, calculate the transient intensity factor of each analysis window based on the short-time energy envelope change rate of the signal, and use the transient intensity factor to weight the periodic difference function to obtain the modified difference function, wherein the value of the transient intensity factor is positively correlated with the suppression effect produced by the weighting. The filtering module is used to perform cumulative mean normalization on the modified difference function and calculate the harmonic structure stability of each analysis window; based on the harmonic structure stability, a set of fundamental frequency candidate points is selected for each analysis window, wherein the harmonic structure stability is negatively correlated with the size of the set of fundamental frequency candidate points; The decoding module is used to calculate the global tonality probability distribution based on the set of fundamental frequency candidate points of all analysis windows; construct a state transition matrix, the state transition cost of which is determined by the frequency difference between adjacent fundamental frequencies and the concordance degree between the current fundamental frequency and the global tonality probability distribution; and decode the optimal fundamental frequency sequence using the state transition matrix. The output module is used to divide the sequence into performance technique segments and melodic stability segments according to the transient intensity factors corresponding to each fundamental frequency in the optimal fundamental frequency sequence; extract feature subsets from the two types of segments respectively and concatenate them to form feature vectors; input the feature vectors into a preset classification model and output the style recognition result.
[0036] In an optional embodiment, calculating the transient intensity factor for each analysis window based on the short-time energy envelope change rate of the signal includes: The audio signal is divided into frames, and the short-time energy of each frame is calculated. The short-time energy sequences of adjacent frames are first-order differencing, and the difference results are processed by half-wave rectification. The results after half-wave rectification are normalized to the [0,1] interval by the maximum value to obtain the transient intensity factor of each analysis window.
[0037] In an optional embodiment, the step of weighting the periodic difference function using the transient intensity factor to obtain the modified difference function includes: Let the transient intensity factor of the current analysis window be TSF(t), the original period difference function be d(t), and the weighting coefficient w(t) = 1 - TSF(t). Multiply the original period difference function d(t) and the corresponding weighting coefficient w(t) element-wise to obtain the modified difference function. .
[0038] In an optional embodiment, calculating the harmonic structure stability of each analysis window includes: In the modified difference function after cumulative mean normalization, the peak values corresponding to the first 10 harmonic positions are extracted based on the period corresponding to the global maximum point; the coefficient of variation of the 10 harmonic peak values is calculated, and the reciprocal of the coefficient of variation is used as the representation value of the harmonic structure stability of the analysis window.
[0039] In an optional embodiment, the step of selecting a set of fundamental frequency candidate points for each analysis window based on the harmonic structure stability includes: If the harmonic structure stability of the current analysis window is greater than the harmonic structure stability threshold, then the global maximum point in the modified difference function is selected as the only fundamental frequency candidate point; if it is less than or equal to the harmonic structure stability threshold, then the N peak points with the highest amplitude in the modified difference function are selected to form the fundamental frequency candidate point set, where N is a positive integer.
[0040] In an optional embodiment, the construction of the state transition matrix, wherein the state transition cost of the matrix is determined by the frequency difference between adjacent fundamental frequencies and the concordance degree between the current fundamental frequency and the global tonality probability distribution, includes: Let the fundamental frequency of the previous analysis window be... The fundamental frequency of the current analysis window is The corresponding pitch level is If the global tonality probability distribution is P(k), then from Transferred to State transition cost The calculation formula is: k1 is a coefficient.
[0041] In an optional embodiment, dividing the sequence into performance technique segments and melodic stability segments based on the transient intensity factors corresponding to each fundamental frequency in the optimal fundamental frequency sequence includes: Traverse each frame in the optimal fundamental frequency sequence. If the transient intensity factor corresponding to the frame is greater than the transient intensity factor threshold... If the frame is valid, it is marked as a performance technique frame; otherwise, it is marked as a melody stability frame. Consecutive marked frames of the same type with a length greater than 5 frames are merged to form performance technique segments and melody stability segments.
[0042] In an optional embodiment, the step of extracting feature subsets from the two types of segments and concatenating them to form a feature vector includes: The first feature subset consists of three dimensions: the mean of the first-order difference of the fundamental frequency, the fundamental frequency jitter, and the amplitude jitter, calculated from each performance technique segment. The second feature subset consists of 27 dimensions: the one-dimensional statistical features derived from the fundamental frequency histogram and the mean and standard deviation of the first 13 dimensions of Mel frequency cepstral coefficients, calculated from each stable melody segment. The first and second feature subsets are then concatenated sequentially to form a 30-dimensional feature vector.
[0043] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0044] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0045] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A method for identifying folk music styles, characterized in that, Includes the following steps: Acquire folk music audio signals, calculate transient intensity factors for each analysis window based on the short-time energy envelope change rate of the signals; use the transient intensity factors to weight the periodic difference function to obtain the modified difference function; The modified difference function is subjected to cumulative mean normalization, and the harmonic structure stability of each analysis window is calculated. Based on the harmonic structure stability, a set of fundamental frequency candidate points is selected for each analysis window, wherein the harmonic structure stability is negatively correlated with the size of the set of fundamental frequency candidate points; The global tonality probability distribution is calculated based on the set of fundamental frequency candidate points from all analysis windows; a state transition matrix is constructed, the state transition cost of which is determined by the frequency difference between adjacent fundamental frequencies and the concordance between the current fundamental frequency and the global tonality probability distribution; the optimal fundamental frequency sequence is decoded using the state transition matrix. Based on the transient intensity factor corresponding to each fundamental frequency in the optimal fundamental frequency sequence, the sequence is divided into performance technique segments and melodic stability segments; feature subsets are extracted from the two types of segments and concatenated to form feature vectors; the feature vectors are input into a preset classification model to output style recognition results.
2. The method according to claim 1, characterized in that, The calculation of the transient intensity factor for each analysis window based on the short-time energy envelope change rate of the signal includes: The audio signal is divided into frames, and the short-time energy of each frame is calculated. The short-time energy sequences of adjacent frames are first-order differencing, and the difference results are processed by half-wave rectification. The results after half-wave rectification are normalized to the [0,1] interval by the maximum value to obtain the transient intensity factor of each analysis window.
3. The method according to claim 1, characterized in that, The step of weighting the periodic difference function using the transient intensity factor to obtain the modified difference function includes: Let the transient intensity factor of the current analysis window be TSF(t), the original period difference function be d(t), and the weighting coefficient w(t) = 1 - TSF(t). Multiply the original period difference function d(t) and the corresponding weighting coefficient w(t) element-wise to obtain the modified difference function. .
4. The method according to claim 1, characterized in that, The calculation of the harmonic structure stability of each analysis window includes: In the modified difference function after cumulative mean normalization, the peak values corresponding to the first 10 harmonic positions are extracted based on the period corresponding to the global maximum point; the coefficient of variation of the 10 harmonic peak values is calculated, and the reciprocal of the coefficient of variation is used as the representation value of the harmonic structure stability of the analysis window.
5. The method according to claim 1, characterized in that, The step of selecting a set of candidate fundamental frequencies for each analysis window based on the harmonic structure stability includes: If the harmonic structure stability of the current analysis window is greater than the harmonic structure stability threshold, then the global maximum point in the modified difference function is selected as the only fundamental frequency candidate point; if it is less than or equal to the harmonic structure stability threshold, then the N peak points with the highest amplitude in the modified difference function are selected to form the fundamental frequency candidate point set, where N is a positive integer.
6. The method according to claim 1, characterized in that, The state transition matrix is constructed, and the state transition cost of the matrix is determined by the frequency difference between adjacent fundamental frequencies and the concordance degree between the current fundamental frequency and the global tonality probability distribution, including: Let the fundamental frequency of the previous analysis window be... The fundamental frequency of the current analysis window is The corresponding pitch level is If the global tonality probability distribution is P(k), then from Transferred to State transition cost The calculation formula is: k1 is a coefficient.
7. The method according to claim 1, characterized in that, The step of dividing the sequence into performance technique segments and melodic stability segments based on the transient intensity factors corresponding to each fundamental frequency in the optimal fundamental frequency sequence includes: Traverse each frame in the optimal fundamental frequency sequence. If the transient intensity factor corresponding to the frame is greater than the transient intensity factor threshold... If the frame is valid, it is marked as a performance technique frame; otherwise, it is marked as a melody stability frame. Consecutive marked frames of the same type with a length greater than 5 frames are merged to obtain performance technique segments and melody stability segments.
8. The method according to claim 1, characterized in that, The step of extracting feature subsets from the two types of segments and concatenating them to form a feature vector includes: The first feature subset consists of three dimensions: the mean of the first-order difference of the fundamental frequency, the fundamental frequency jitter, and the amplitude jitter, calculated from each performance technique segment. The second feature subset consists of 27 dimensions: the one-dimensional statistical features derived from the fundamental frequency histogram and the mean and standard deviation of the first 13 dimensions of Mel frequency cepstral coefficients, calculated from each stable melody segment. The first and second feature subsets are then concatenated sequentially to form a 30-dimensional feature vector.
9. A folk music style identification system, characterized in that, Includes the following modules: The weighting module is used to acquire folk music audio signals, calculate the transient intensity factor of each analysis window based on the short-time energy envelope change rate of the signal, and use the transient intensity factor to weight the periodic difference function to obtain the modified difference function. The filtering module is used to perform cumulative mean normalization on the modified difference function and calculate the harmonic structure stability of each analysis window. Based on the harmonic structure stability, a set of fundamental frequency candidate points is selected for each analysis window, wherein the harmonic structure stability is negatively correlated with the size of the set of fundamental frequency candidate points; The decoding module is used to calculate the global tonality probability distribution based on the set of fundamental frequency candidate points of all analysis windows; construct a state transition matrix, the state transition cost of which is determined by the frequency difference between adjacent fundamental frequencies and the concordance degree between the current fundamental frequency and the global tonality probability distribution; and decode the optimal fundamental frequency sequence using the state transition matrix. The output module is used to divide the sequence into performance technique segments and melodic stability segments according to the transient intensity factors corresponding to each fundamental frequency in the optimal fundamental frequency sequence; extract feature subsets from the two types of segments respectively and concatenate them to form feature vectors; input the feature vectors into a preset classification model and output the style recognition result.
10. A computer-readable storage medium storing a computer program thereon, characterized in that, The computer program, when executed by a processor, implements the method as described in any one of claims 1-8.