A music rhythm analysis method based on m frequency points
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2026-08-11
AI Technical Summary
[0002]在汽车行业中,音乐律动通常由车载信息娱乐系统(简称车机)负责计算和控制,然后采用LIN等低速总线下发控制数据到灯头,该数据下发过程会比较长,且延迟较高;特别是在控制灯珠较多时,尤为明显
[0049]本发明的有益效果是:在车机中,频率简化模块通过将数据量庞大的原始频谱数据,转换为对总线压力极小的m个伪频率点数据,在极大的保留音乐的节拍数据的同时,有效降低了对总线的消耗和延迟,提高总线数据下发效率,减小总线负载。每个灯具都能够独立运行,能够在不影响其他模块链路的情况下,灵活增减灯具节点数量。
Smart Images

Figure CN121191535B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive ambient lighting technology, and in particular to a method for analyzing musical rhythm based on the m-frequency point. Background Technology
[0002] In the automotive industry, music and rhythm control is typically handled by the in-vehicle infotainment system (IVS), which then sends control data to the headlights via low-speed buses such as LIN. This data transmission process is relatively long and has significant latency, especially when controlling a large number of LEDs. Furthermore, in today's cost-driven business environment, the use of low-speed buses like LIN is increasingly common for lighting fixtures. This means that if there are too many lights on the bus, and the central controller directly controls the color and brightness effects, the bus load will be very high. In addition, adding or deleting light nodes requires adjustments to the data links of the central controller and gateways, increasing the workload.
[0003] Disadvantages of existing technology: Current solutions that directly control the lighting effects of lights to change with the rhythm of music through the vehicle's infotainment system often suffer from high delays in control data transmission, high bus load, and inability to flexibly add or remove lighting nodes. Summary of the Invention
[0004] The present invention provides a music rhythm analysis method based on m-frequency points, which can not only improve the efficiency of bus data transmission and reduce bus load, but also flexibly increase or decrease the number of lamp nodes without affecting other module links.
[0005] To achieve the above objectives, this invention provides a method for analyzing music rhythm based on the m-frequency point, which, in particular, includes the following steps:
[0006] Step 1: Construct an m-frequency point music rhythm analysis system. This m-frequency point music rhythm analysis system is installed in the vehicle's infotainment system, which is connected to at least one light head via a gateway / domain controller.
[0007] The vehicle infotainment system is equipped with a player and a frequency simplification module, while the headlight is equipped with a music analysis module and a lighting effect generation module.
[0008] The music analysis module integrates a filtering unit, a normalization unit, a frequency selection unit, and a data fusion unit connected in sequence.
[0009] Step 2: The frequency simplification module in the vehicle system obtains the complete spectrum data for the current time period from the player in real time, and extracts pseudo frequencies from the complete spectrum data using the Mel spectrum frequency feature extraction method. The pseudo frequencies contain m pseudo frequency points. The frequency simplification module sends the pseudo frequencies to each of the lamp heads through the gateway.
[0010] Step 3: The filtering unit in the music analysis module performs filtering on the pseudo-frequency; the normalization unit normalizes the filtered pseudo-frequency; the frequency selection unit selects k pseudo-frequency points from the normalized pseudo-frequency for beat tracking; the data fusion unit performs data fusion on the selected k pseudo-frequency points to obtain a set number of beat data, and transmits it to the lighting effect generation module.
[0011] Step 4: The lighting effect generation module generates corresponding lighting effects based on the beat data or pseudo-frequency.
[0012] Through the above design, the vehicle-mounted system, domain controllers, and other controllers do not participate in the calculation of the music rhythm effect, but only perform spectrum data forwarding. In the vehicle-mounted system, the frequency simplification module converts the massive amount of original spectrum data into m pseudo-frequency point data with minimal bus pressure, effectively reducing bus consumption and latency while preserving the music's beat data to a great extent.
[0013] Furthermore, by independently setting a music analysis module in each lamp head, this invention enables each lamp head to independently perform music beat analysis based on m pseudo-frequency points and generate lighting effects according to the set effect mode. Since each lamp in this invention can operate independently, the operation of other nodes is not affected when adding or deleting lamp nodes, and the number of lamp nodes can be set more flexibly.
[0014] The gateway uses buses such as CAN, CANFD, and LIN.
[0015] Preferably, in step 2, the frequency simplification module uses the Mel spectrum frequency feature extraction method to extract the pseudo frequency from the complete spectrum data.
[0016] Compared to traditional methods that segment frequencies only according to low, mid, and high frequencies, this invention uses the Mel spectrum frequency feature extraction method for frequency segmentation and extraction, which can obtain richer and more easily perceived music frequencies.
[0017] The frequency simplification module uses the Mel spectrum frequency feature extraction method to convert the complete spectrum data into Mel values. The conversion expression is as follows:
[0018] ;
[0019] in, This represents iHz, where i represents the frequency value. This represents the Mel frequency corresponding to iHz;
[0020] Secondly, the frequency simplification module draws a frequency value-Mel value correspondence curve based on the correspondence between frequency values and Mel values. The frequency simplification module uses zero as the lower limit of frequency selection and frequency point n as the upper limit of frequency selection in the frequency value-Mel value correspondence curve to obtain the frequency selection range [0, n]. Then, the Mel value range corresponding to this frequency selection range [0, n] is evenly divided into m Mel frequency bands, which correspond to m frequency segments. In each frequency segment, the average value of all frequency values within that segment is selected as the extracted pseudo-frequency point. Thus, m pseudo-frequency points are extracted for each of the m frequency segments.
[0021] Based on the characteristic that the human ear is more sensitive to low-frequency sounds and less sensitive to high-frequency sounds, the Mel-spectrum frequency feature extraction method is used. By mapping linear frequencies to logarithmic space, it simulates the perceptual characteristics of the human ear. The Mel spectrum uses a Mel scale on the frequency axis, which more closely approximates the perceptual characteristics of the human ear. The main information of speech signals is concentrated in the low-frequency region. The Mel spectrum provides higher resolution in the low frequencies through logarithmic compression, while suppressing high-frequency noise, thus enabling better extraction of speech features.
[0022] Preferably, the filtering unit uses a fast-charging slow-descent filter to filter the pseudo-frequency, and the filtering process is as follows:
[0023] The filtering unit will use the value of the j-th pseudo-frequency point in the current time period. The value of the j-th pseudo-frequency point in the previous time period Compare, j∈[1,m];
[0024] when At that time, the filtered value ;
[0025] when At that time, the filtered value ;
[0026] in, Indicates filter parameters.
[0027] Preferably, the normalization unit is based on the value of the pseudo-frequency point in the current time period. With filter value Update the maximum frequency value required for normalization processing in real time for the current time period. and minimum frequency value The process is as follows:
[0028] The normalization unit will filter the values for the current time period. Compared with the maximum frequency value of the previous time period and minimum frequency value Compare;
[0029] when hour, ;
[0030] when At that time, if ,but ;otherwise, ;
[0031] when hour, ;
[0032] when At that time, if ,but ;otherwise, ;
[0033] in, The parameter representing the maximum frequency contraction. The contraction parameter represents the minimum frequency.
[0034] The normalization unit normalizes the filtered values of the pseudo-frequency, as shown in the following expression:
[0035] ;
[0036] in, This represents the normalized value of the j-th pseudo-frequency point.
[0037] Preferably, the frequency selection unit selects the frequency based on the normalized value of the pseudo-frequency, as follows:
[0038] The frequency selection unit sorts the normalized values of the pseudo frequencies in ascending order, and then selects the k pseudo-frequency points with the largest normalized values for beat tracking.
[0039] In a piece of music, beats with varying intensity repeat at regular intervals. The pattern of these beats directly influences the brain's allocation of attention to the music. In music data, the frequency of beat occurrences increases. By sorting the data, it can be assumed that the K highest frequencies within the current time period have the highest probability of producing a beat. Their normalized data best reflects the beat and is therefore easier for the human body to perceive and remember. Therefore, selecting pseudo-frequency points with higher frequencies for beat tracking allows ambient lighting to dynamically change with the music's beat, synchronizing visual and auditory perception of the beat and enhancing the overall user experience.
[0040] As a preferred embodiment, the frequency selection unit is equipped with a beat tracker, which includes m beat tracking points, each of which corresponds to one of the m pseudo-frequency points, and each beat tracking point is equipped with a corresponding counter.
[0041] The initial state of each of the aforementioned beat tracking points is a candidate state, and the initial state value of each of the aforementioned counters is zero;
[0042] When the beat tracker receives k pseudo-frequency points in the first time period, the beat tracker inputs the normalized values of the k pseudo-frequency points into the corresponding k beat tracking points as the tracking values of the corresponding beat tracking points, and updates the counter status values corresponding to these k beat tracking points to the set value T; at this time, the state of the beat tracking points with input normalized values is converted to the selected state.
[0043] During the current time period, if a beat tracking point in the candidate state receives the corresponding pseudo-frequency point, the state update of the beat tracking point is completed, that is, it changes from the candidate state to the selected state, and the normalized value of the corresponding pseudo-frequency point is input as the tracking value of the beat tracking point. At the same time, the state value of the corresponding counter is updated to the set value T. If a beat tracking point in the candidate state does not receive the corresponding pseudo-frequency point, it remains in the candidate state, the tracking value is empty, and the state value of the corresponding counter remains zero.
[0044] During the current time period, if a selected beat tracking point receives the corresponding pseudo-frequency point, the counter status value corresponding to that beat tracking point is updated to the set value T, and the tracking value in that beat tracking point is updated to the normalized value of the corresponding pseudo-frequency point in the current time period. If a selected beat tracking point does not receive the corresponding pseudo-frequency point, the counter status value corresponding to that beat tracking point is decremented by one. When the counter status value of that beat tracking point reaches zero, the beat tracking point is updated to the pending state, and the tracking value is updated to empty.
[0045] Preferably, the data fusion unit performs a data fusion operation on the tracking values within the beat tracking points corresponding to the selected k pseudo-frequency points, as follows:
[0046] The data fusion unit performs beat fusion on the tracking values corresponding to every two pseudo-frequency points out of the k pseudo-frequency points, and the fusion rules are as follows:
[0047] Select any two tracking values , To blend the beats, if rhythm Otherwise, the rhythm ;
[0048] Repeat the above steps to finally obtain the set number of beats.
[0049] The beneficial effects of this invention are as follows: In the vehicle infotainment system, the frequency simplification module converts the massive amount of original spectrum data into m pseudo-frequency point data points that put minimal pressure on the bus. This significantly preserves the beat data of the music while effectively reducing bus consumption and latency, improving bus data transmission efficiency, and decreasing bus load. Each light fixture can operate independently, allowing for flexible addition or removal of light fixture nodes without affecting other module links. Attached Figure Description
[0050] Figure 1 This is a block diagram of the m-frequency point music rhythm analysis system in the embodiment;
[0051] Figure 2 This is a graph showing the relationship between frequency value and Mel value in the example. Detailed Implementation
[0052] The present invention will be further described in detail below with reference to the accompanying drawings and specific examples. The following embodiments or drawings are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0053] A method for analyzing musical rhythm based on the m-frequency point includes the following steps:
[0054] Step 1: Construct an m-frequency music rhythm analysis system. This system is installed in the vehicle's infotainment system, which is connected to at least one light fixture via a gateway / domain controller. Figure 1 As shown;
[0055] The vehicle infotainment system is equipped with a player and a frequency simplification module, while the headlight is equipped with a music analysis module and a lighting effect generation module.
[0056] Step 2: The frequency simplification module in the vehicle system obtains the complete spectrum data for the current time period from the player in real time, and converts the complete spectrum data into pseudo frequencies, which contain m pseudo frequency points; the frequency simplification module sends the pseudo frequencies to each of the lamp heads through the gateway;
[0057] Step 3: The music analysis module inside the lamp head performs data filtering, normalization, frequency selection, and data fusion operations on the pseudo-frequency in sequence to obtain a set number of beat data, and then transmits them to the lighting effect generation module;
[0058] Step 4: The lighting effect generation module generates corresponding lighting effects based on the beat data or pseudo-frequency.
[0059] Through the above design, the vehicle-mounted system, domain controllers, and other controllers do not participate in the calculation of the music rhythm effect, but only perform spectrum data forwarding. In the vehicle-mounted system, the frequency simplification module converts the massive amount of original spectrum data into m pseudo-frequency point data with minimal bus pressure, effectively reducing bus consumption and latency while preserving the music's beat data to a great extent.
[0060] To reduce the computational load on the vehicle's infotainment system / domain controller, this invention compresses the entire frequency data, extracting only the key frequency data and sending it to the bus. This means the infotainment system / domain controller only needs to repeatedly send the compressed data, reducing data processing steps and software development complexity compared to traditional solutions. Furthermore, this function can be retained even with vehicle model upgrades, requiring no replacement.
[0061] Furthermore, by independently setting a music analysis module in each lamp head, this invention enables each lamp head to independently perform music beat analysis based on m pseudo-frequency points and generate lighting effects according to the set effect mode. Since each lamp in this invention can operate independently, the operation of other nodes is not affected when adding or deleting lamp nodes, and the number of lamp nodes can be set more flexibly.
[0062] In step 2, the frequency simplification module uses the Mel spectrum frequency feature extraction method to extract the pseudo frequency from the complete spectrum data.
[0063] The frequency simplification module uses the Mel spectrum frequency feature extraction method to convert the complete spectrum data into Mel values. The conversion expression is as follows:
[0064] ;
[0065] in, This represents iHz, where i represents the frequency value and Hz is the unit of frequency. This represents the Mel frequency corresponding to iHz;
[0066] The frequency simplification module plots a frequency-Mel value correspondence curve based on the relationship between frequency values and Mel values, such as... Figure 2 As shown, the frequency simplification module uses the zero point as the lower limit of frequency selection and the frequency point n as the upper limit of frequency selection in the frequency value-Mel value correspondence curve to obtain the frequency selection range [0,n]. Then, the Mel value range corresponding to the frequency selection range [0,n] is evenly divided into m Mel frequency bands, and the m Mel frequency bands correspond to m frequency segments. In each frequency segment, the average value of all frequency values in the frequency segment is selected as the extracted pseudo frequency point. The m frequency segments correspond to the extraction of m pseudo frequency points.
[0067] In this embodiment, the selected frequency range is [0, 2000] Hz, and the number of selected frequency points m is 12. The Mel value corresponding to a 0 Hz frequency is 0 mel, and the Mel value corresponding to a 2000 Hz frequency is 1521.36 mel. Therefore, the Mel value selection interval is 1521.36 / 12 = 126.78 mel. The upper limits of the 12 Mel frequency bands and their corresponding upper limits are as follows:
[0068] Serial Number 1 2 3 4 5 6 MEL 126.78 253.5599 380.3399 507.1199 633.8998 760.6798 HZ 83.3458 176.6152 280.9898 397.7917 528.5007 674.7727
[0069] Serial Number 7 8 9 10 11 12 MEL 887.4597 1014.24 1141.02 1267.8 1394.58 1521.36 HZ 838.4606 1021.638 1226.626 1456.02 1712.728 2000
[0070] The music analysis module integrates a filtering unit, a normalization unit, a frequency selection unit, and a data fusion unit connected in sequence.
[0071] The filtering unit is used to perform filtering operations on the pseudo-frequency.
[0072] The normalization unit is used to normalize the filtered pseudo-frequency.
[0073] The frequency selection unit is used to select k pseudo-frequency points from the normalized pseudo-frequency for beat tracking. <k<m;
[0074] The data fusion unit is used to perform data fusion on the selected k pseudo-frequency points.
[0075] The filtering unit uses a fast-charging slow-fall filter to filter the pseudo-frequency. The filtering process is as follows:
[0076] The filtering unit will use the value of the j-th pseudo-frequency point in the current time period. The value of the j-th pseudo-frequency point in the previous time period Compare, j∈[1,m];
[0077] when At that time, the filtered value ;
[0078] when At that time, the filtered value ;
[0079] in, This represents the filter parameter, with a typical value of 0.95 and a settable range of 0.5-0.995.
[0080] The normalization unit is based on the value of the pseudo-frequency point in the current time period. With filter value Update the maximum frequency value required for normalization processing in real time for the current time period. and minimum frequency value The process is as follows:
[0081] The normalization unit will filter the values for the current time period. Compared with the maximum frequency value of the previous time period and minimum frequency value Compare;
[0082] when hour, ;
[0083] when At that time, if ,but ;otherwise, ;
[0084] when hour, ;
[0085] when At that time, if ,but ;otherwise, ;
[0086] in, This represents the maximum frequency contraction parameter, with a typical value of 40 and a settable range of 10-100. This represents the minimum frequency contraction parameter, with a typical value of 10 and a settable range of 10-100.
[0087] The normalization unit normalizes the filtered values of the pseudo-frequency, as shown in the following expression:
[0088] ;
[0089] in, This represents the normalized value of the j-th pseudo-frequency point.
[0090] The frequency selection unit selects the frequency based on the normalized value of the pseudo-frequency, as follows:
[0091] The frequency selection unit sorts the normalized values of the pseudo frequencies in ascending order, and then selects the k pseudo-frequency points with the largest normalized values for beat tracking.
[0092] The frequency selection unit is equipped with a beat tracker, which contains m beat tracking points. The m beat tracking points correspond one-to-one with m pseudo-frequency points, and each beat tracking point is equipped with a corresponding counter.
[0093] The initial state of each of the aforementioned beat tracking points is a candidate state, and the initial state value of each of the aforementioned counters is zero;
[0094] When the beat tracker receives k pseudo-frequency points in the first time period, the beat tracker inputs the normalized values of the k pseudo-frequency points into the corresponding k beat tracking points as the tracking values of the corresponding beat tracking points, and updates the counter status values corresponding to these k beat tracking points to the set value T; at this time, the state of the beat tracking points with input normalized values is converted to the selected state.
[0095] During the current time period, if a beat tracking point in the candidate state receives the corresponding pseudo-frequency point, the state update of the beat tracking point is completed, that is, it changes from the candidate state to the selected state, and the normalized value of the corresponding pseudo-frequency point is input as the tracking value of the beat tracking point. At the same time, the state value of the corresponding counter is updated to the set value T. If a beat tracking point in the candidate state does not receive the corresponding pseudo-frequency point, it remains in the candidate state, the tracking value is empty, and the state value of the corresponding counter remains zero.
[0096] During the current time period, if a selected beat tracking point receives the corresponding pseudo-frequency point, the counter status value corresponding to that beat tracking point is updated to the set value T, and the tracking value in that beat tracking point is updated to the normalized value of the corresponding pseudo-frequency point in the current time period. If a selected beat tracking point does not receive the corresponding pseudo-frequency point, the counter status value corresponding to that beat tracking point is decremented by one. When the counter status value of that beat tracking point reaches zero, the beat tracking point is updated to the pending state, and the tracking value is updated to empty.
[0097] The data fusion unit performs a data fusion operation on the tracking values within the beat tracking points corresponding to the selected k pseudo-frequency points, as follows:
[0098] The data fusion unit performs beat fusion on the tracking values corresponding to every two pseudo-frequency points out of the k pseudo-frequency points, and the fusion rules are as follows:
[0099] Select any two tracking values , To blend the beats, if rhythm Otherwise, the rhythm ;
[0100] Repeat the above steps to finally obtain the set number of beats.
[0101] While the vehicle-mounted system sends m pseudo-frequency points to the light head through the gateway, it also simultaneously sends a sequence of data containing lighting effect mode logic values, lighting effect color logic values, and synchronization signals to the light head.
[0102] Each lamp head is independently configured with lighting effect generation logic. Any two lamp heads with the same lighting effect generation logic will generate the same lighting effect, and any two lamp heads with different lighting effect generation logic will generate different lighting effects.
[0103] The lighting effect generation logic includes music analysis logic and lighting display logic. The music analysis logic includes: filter parameters. Normalized parameters The configuration includes the selection of the number of frequency points k for beat tracking, the beat fusion status, and the final number of beats; the lighting display logic includes: the configuration of the lighting effect mode corresponding to each lighting effect mode logic value, the configuration of the lighting effect color corresponding to each lighting effect color logic value, and the configuration of the LED beads corresponding to the normalized value of each beat or pseudo-frequency.
[0104] For example: the logic value for the lighting effect mode is 1, 2, 3...; the logic value for the lighting effect color is 1, 2, 3...;
[0105] In the lighting display logic of the i-th lamp head, the lighting effect mode corresponding to the lighting effect mode 1 is breathing, the lighting effect mode corresponding to the lighting effect mode 2 is flowing water, and the lighting effect mode corresponding to the lighting effect mode 3 is gradient; the lighting effect color corresponding to the lighting effect mode 1 is red, the lighting effect color corresponding to the lighting effect mode 2 is green, and the lighting effect color corresponding to the lighting effect mode 3 is blue.
[0106] In the lighting display logic of the j-th lamp head, the lighting effect mode corresponding to the lighting effect mode of the lighting effect mode logic value 1 is flowing water, the lighting effect mode corresponding to the lighting effect mode of the lighting effect mode logic value 2 is gradient, and the lighting effect mode corresponding to the lighting effect mode of the lighting effect mode logic value 3 is breathing; the lighting effect color corresponding to the lighting effect color of the lighting effect mode logic value 1 is blue, the lighting effect color logic value 2 corresponds to red, and the lighting effect color logic value 3 corresponds to green.
[0107] Since the system contains multiple lamp heads that operate independently, their operating steps may change after a period of time, leading to inconsistent results. Therefore, when the vehicle's infotainment system sends m frequency data to the lamp heads, it simultaneously sends a synchronization signal. This synchronization signal consists of at least one byte, and its value increments by 1 with each transmission. When a lamp head receives the synchronization signal for the current time period, it compares the signal with the value of the synchronization signal received in the previous time period to determine if its operation has deviated and to make corrections.
[0108] The lighting effect generation module generates a corresponding lighting effect driving sequence signal based on the beat data of a continuous time period, the lighting effect mode logic value, and the lighting effect color logic value. Then, it drives each LED in the current lamp head to complete the display of continuous lighting effects that change with the rhythm of the music through the lighting effect driving sequence signal.
[0109] Each lamp head is an independent unit, and each lamp head independently analyzes the compression frequency and moves in rhythm with the music according to the preset effect. This allows each lamp head to display independently in rhythm with the music, or to cooperate with other lamp heads to achieve richer visual effects.
[0110] The normalized value of the beat data or pseudo-frequency is used as the rhythm data beat. The lighting effect generation module performs logical calculations on the color and brightness of the lights based on the rhythm data beat of the current time period.
[0111] For example: when the lamp head's lighting effect mode is breathing mode, if the maximum brightness of the LED beads is 100%, then the actual output brightness of the LED beads during the current time period is beat × 100%;
[0112] When the light effect color of the lamp head is red, if the maximum saturation of the red color of the lamp bead is 90%, then the actual red color saturation output by the lamp bead in the current time period is beat×90%.
[0113] If the system has m lamp heads, each lamp head uses the normalized value of a frequency point as the rhythm data beat of the current lamp head. The normalized values of the corresponding pseudo frequencies of the m lamp heads are presented visually, so that each lamp can be presented as an independent response, but the changes in music frequency can be reflected. At the same time, the color of the lamp head can also be customized or changed according to the frequency intensity as needed.
[0114] In particular, some lighting fixtures have special optical effects, which, when combined with this distributed rhythmic architecture, can achieve optical effects of points, lines, and planes, and can be designed according to artistic effects.
[0115] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for analyzing musical rhythm based on the m-frequency point, characterized in that, Includes the following steps: Step 1: Construct an m-frequency point music rhythm analysis system. This m-frequency point music rhythm analysis system is installed in the vehicle's infotainment system, which is connected to at least one light head via a gateway / domain controller. The vehicle infotainment system is equipped with a player and a frequency simplification module, while the headlight is equipped with a music analysis module and a lighting effect generation module. The music analysis module integrates a filtering unit, a normalization unit, a frequency selection unit, and a data fusion unit connected in sequence. Step 2: The frequency simplification module in the vehicle system obtains the complete spectrum data for the current time period from the player in real time, and extracts pseudo frequencies from the complete spectrum data using the Mel spectrum frequency feature extraction method. The pseudo frequencies contain m pseudo frequency points. The frequency simplification module sends the pseudo frequencies to each of the lamp heads through the gateway. Step 3: The filtering unit in the music analysis module performs filtering on the pseudo-frequency; the normalization unit normalizes the filtered pseudo-frequency; the frequency selection unit selects k pseudo-frequency points from the normalized pseudo-frequency for beat tracking; the data fusion unit performs data fusion on the selected k pseudo-frequency points to obtain a set number of beat data, and transmits it to the lighting effect generation module. Step 4: The lighting effect generation module generates corresponding lighting effects based on the beat data or pseudo-frequency.
2. The method for analyzing musical rhythm based on the m-frequency point according to claim 1, characterized in that: In step 2, the frequency simplification module extracts pseudo frequencies from the complete spectrum data as follows: First, the frequency simplification module uses the Mel spectrum frequency feature extraction method to convert the complete spectrum data into Mel values. The conversion expression is as follows: ; in, This represents iHz, where i represents the frequency value. This represents the Mel frequency corresponding to iHz; Secondly, the frequency simplification module draws a frequency value-Mel value correspondence curve based on the correspondence between frequency values and Mel values. The frequency simplification module uses zero as the lower limit of frequency selection and frequency point n as the upper limit of frequency selection in the frequency value-Mel value correspondence curve to obtain the frequency selection range [0, n]. Then, the Mel value range corresponding to this frequency selection range [0, n] is evenly divided into m Mel frequency bands, which correspond to m frequency segments. In each frequency segment, the average value of all frequency values within that segment is selected as the extracted pseudo-frequency point. Thus, m pseudo-frequency points are extracted for each of the m frequency segments.
3. The method for analyzing musical rhythm based on the m-frequency point according to claim 1, characterized in that: The filtering unit uses a fast-charging slow-fall filter to filter the pseudo-frequency. The filtering process is as follows: The filtering unit will use the value of the j-th pseudo-frequency point in the current time period. The value of the j-th pseudo-frequency point in the previous time period Compare, j∈[1,m]; when At that time, the filtered value ; when At that time, the filtered value ; in, Indicates filter parameters.
4. The method for analyzing musical rhythm based on the m-frequency point according to claim 3, characterized in that: The normalization unit is based on the value of the pseudo-frequency point in the current time period. With filter value Update the maximum frequency value required for normalization processing in real time for the current time period. and minimum frequency value The process is as follows: The normalization unit will filter the values for the current time period. Compared with the maximum frequency value of the previous time period and minimum frequency value Compare; when hour, ; when At that time, if ,but ; otherwise, ; when hour, ; when At that time, if ,but ;otherwise, ; in, The parameter representing the maximum frequency contraction. The contraction parameter represents the minimum frequency. The normalization unit normalizes the filtered values of the pseudo-frequency, as shown in the following expression: ; in, This represents the normalized value of the j-th pseudo-frequency point.
5. The method for analyzing musical rhythm based on the m-frequency point according to claim 1, characterized in that: The frequency selection unit selects the frequency based on the normalized value of the pseudo-frequency, as follows: The frequency selection unit sorts the normalized values of the pseudo frequencies in ascending order, and then selects the k pseudo-frequency points with the largest normalized values for beat tracking.
6. The method for analyzing musical rhythm based on the m-frequency point according to claim 5, characterized in that: The frequency selection unit is equipped with a beat tracker, which contains m beat tracking points. The m beat tracking points correspond one-to-one with m pseudo-frequency points, and each beat tracking point is equipped with a corresponding counter. The initial state of each of the aforementioned beat tracking points is a candidate state, and the initial state value of each of the aforementioned counters is zero; When the beat tracker receives k pseudo-frequency points in the first time period, the beat tracker inputs the normalized values of the k pseudo-frequency points into the corresponding k beat tracking points as the tracking values of the corresponding beat tracking points, and updates the counter status values corresponding to these k beat tracking points to the set value T; at this time, the state of the beat tracking points with input normalized values is converted to the selected state. During the current time period, if a beat tracking point in the candidate state receives the corresponding pseudo-frequency point selected, the state update of the beat tracking point is completed, that is, it changes from the candidate state to the selected state, and the normalized value of the corresponding pseudo-frequency point is input as the tracking value of the beat tracking point. At the same time, the state value of the corresponding counter is updated to the set value T. If a tick tracking point in the candidate state does not receive the corresponding pseudo-frequency point, it remains in the candidate state, the tracking value is empty, and the state value of the corresponding counter remains zero. If a selected beat tracking point receives the corresponding pseudo-frequency point during the current time period, the counter status value corresponding to the beat tracking point is updated to the set value T, and the tracking value in the beat tracking point is updated to the normalized value of the corresponding pseudo-frequency point during the current time period. If a selected beat tracking point does not receive the corresponding pseudo-frequency point, the counter status value of the selected beat tracking point is decremented by one. When the counter status value of the selected beat tracking point reaches zero, the selected beat tracking point is updated to the candidate state, and the tracking value is updated to empty.
7. The method for analyzing musical rhythm based on the m-frequency point according to claim 6, characterized in that: The data fusion unit performs a data fusion operation on the tracking values within the beat tracking points corresponding to the selected k pseudo-frequency points, as follows: The data fusion unit performs beat fusion on the tracking values corresponding to every two pseudo-frequency points out of the k pseudo-frequency points, and the fusion rules are as follows: Select any two tracking values , To blend the beats, if rhythm Otherwise, the rhythm ; Repeat the above steps to finally obtain the set number of beats.
Citation Information
Patent Citations
Vehicle music data transmission method, vehicle lamp effect control method and electronic equipment
CN115123072A
Method for extracting music rhythm information
CN117809604A