Multi-dimensional input and output music rhythm method and device and lighting system

Through the multi-dimensional input and output method, the audio analysis algorithm is used to accurately identify music features and convert them into light control instructions, which solves the problem of insufficient synchronization and matching between music and light in the existing technology, and achieves a deep fit between lighting rhythm and music emotions, and enhances the user's immersion and atmosphere experience.

CN120434868AInactive Publication Date: 2025-08-05SHENZHEN QICHUANG GREEN TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510430187.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-08-05
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing music and lighting synchronization products have shortcomings in the matching degree of light effects and music, and it is difficult to adapt to multiple music styles. The synchronization between the lighting rhythm and user scenes is poor, which cannot enhance the user's immersion and atmosphere experience.

Method used

Through multi-dimensional input and output methods, including user selection of music rhythm scenes, audio analysis algorithms to extract music features, turn on the rhythm mode lighting effect library and lighting driving circuit, use audio analysis algorithms to accurately identify notes, drum beats, volume, pitch, white noise and music speed and other features, and convert them into lighting control instructions based on intelligent mapping rules, and drive the ambient light for lighting control.

Benefits of technology

It achieves a deep compatibility between lighting rhythm and musical emotions, enhances users' perception and appreciation experience of music, provides a comprehensive sensory feast, and significantly improves the fusion effect of music and light synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120434868A_ABST
    Figure CN120434868A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of music and light synchronization, and particularly discloses a multi-dimensional input and output music rhythm method and device and a light system.The method comprises the following steps that S1, a user selects music rhythm scenes, S2, music features are extracted through an audio analysis algorithm, S3, a rhythm mode light effect library is started, and S4, a light driving circuit is started; music feature extraction is performed on a music signal through an audio analysis algorithm, music feature information is converted into a light control instruction based on the extracted music features and according to a preset intelligent mapping rule, and a light driving circuit of an atmosphere lamp drives a light emitting unit of an atmosphere lamp circuit based on the light control instruction, so that the atmosphere lamp is controlled to emit light. According to the method, an audio analysis algorithm is introduced, seven key audio track elements can be accurately recognized, the capture range and accuracy of music information are greatly expanded, and deep matching of lamplight rhythm and music emotion expression is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of music and lighting synchronization, and in particular to a method, device and lighting system for multi-dimensional input and output of music rhythm. Background Art

[0002] In the current smart lighting field, the development of music and light synchronization technology still faces many challenges, and existing products have obvious shortcomings in the integration of music and light effects.

[0003] Judging from the functions of existing music rhythm products, the match between the product's lighting effects and music is poor, the lighting effects are relatively simple, and it is difficult to adapt to a variety of music styles. Products on the market can only rely on identifying the volume and spectrum of the music to achieve the rhythm of the lighting effects, without in-depth analysis of the relationship between the elements of music, the rhythmic matching of the lighting effects, and the user scenario. For example, when users use the music rhythm function of the products currently on the market, the rhythm of the lighting effects is poorly synchronized with the music, and the lighting effects do not give users a strong perception of the music. It is impossible for users to immerse themselves in the current scene, and the lighting effect atmosphere does not strongly match the current needs, which cannot enhance the user's sense of atmosphere. Summary of the Invention

[0004] In order to overcome the above-mentioned defects of the prior art, embodiments of the present invention provide a method, device and lighting system for multi-dimensional input and output of music rhythm to solve the problems raised in the above-mentioned background technology.

[0005] To achieve the above-mentioned object, the present invention provides the following technical solution: a method for multi-dimensional input and output of music rhythm, comprising the following steps: S1: user selects a music rhythm scene, S2: audio analysis algorithm extracts music features, S3: opens a rhythm mode lighting effect library, and S4: performs a lighting driving circuit;

[0006] S1: User selects a music rhythm scene: After turning on a music playback device and lighting up an ambient light connected to the music playback device, the user enters a music rhythm scene selection mode through a dedicated application interface on the mobile phone to select a music rhythm scene;

[0007] S2: Audio analysis algorithm extracts music features: After the user selects a music scene, the microphone on the ambient light picks up the music sounds in the surrounding environment and obtains the music signal. The audio analysis algorithm then extracts music features from the music signal, including notes, drum beats, volume, duration, pitch, white noise, and music speed.

[0008] S3: Open the rhythm mode lighting effect library: Based on the music features extracted in S2, the music feature information is converted into lighting control instructions according to the preset intelligent mapping rules;

[0009] S4: Execute the light driving circuit: receive the light control instruction in S3, and the light driving circuit of the atmosphere lamp drives the light-emitting unit of the atmosphere lamp circuit based on the light control instruction to perform light control on the atmosphere lamp.

[0010] Preferably, the specific content of extracting music features from the music signal using an audio analysis algorithm is as follows:

[0011] Extract the notes from the music features, specifically as follows:

[0012] Obtain music audio data, process each frame of audio data, extract frequency and amplitude information from the audio signal using discrete Fourier transform, fold the extracted frequency values into an octave, smooth the folded frequency values, and find the frequency peak; process and merge the notes to obtain the note amplitude distribution; traverse all notes and find the note with the largest amplitude;

[0013] Extract the drum beats from the music features, specifically as follows:

[0014] Traverse the window of audio samples and calculate the RMS value of the current window;

[0015] Calculate the difference from the previous window's RMS value;

[0016] Determining whether the RMS value or the difference exceeds a predefined threshold;

[0017] If the RMS value or the difference exceeds a predefined threshold, the corresponding beat intensity count is increased and the current window result is saved;

[0018] Use a sliding window to smooth the beat detection results and output the final beat detection results.

[0019] Preferably, the specific content of extracting music features from the music signal using an audio analysis algorithm is as follows:

[0020] Extract the volume of the music feature, specifically as follows:

[0021] The volume refers to the loudness of the music, which is expressed by the amplitude A of the note, and the volume is measured in decibels (dB).

[0022] Set the window size and step size of the audio sample and calculate the RMS value of the current window;

[0023] Calculate using the volume formula, the specific formula is: Among them, RMS0 represents the preset reference RMS value;

[0024] Output volume calculation results;

[0025] Extract the note length from the music feature, specifically as follows:

[0026] Load the note calculation results and find the note with the largest amplitude;

[0027] Record the onset time of the note with the largest amplitude;

[0028] Determine whether it is the same note as the previous one. If the result is the same note, increase the duration counter, record the note length, and output the note length result;

[0029] Extract the pitch from the music feature, specifically as follows:

[0030] The audio samples are normalized using the following calculation formula:

[0031] Among them, x norm [n] represents the normalized audio sample, x[n] represents the discrete sample of the original time domain signal, and n represents the discrete time index;

[0032] Perform a fast Fourier transform on the audio data to convert from the time domain to the frequency domain as follows:

[0033] Where X[k] is the frequency domain representation, k is the frequency domain index, N is the total number of audio samples, j is the imaginary unit, and n is the discrete time index, ranging from 0 to N-1.

[0034] The fast Fourier transform result is converted into a Mel spectrum as follows:

[0035] Among them, H m,k Represents the elements of the Mel filter matrix, M represents the number of Mel filters, k represents the frequency domain index, and m represents the Mel filter index;

[0036] Perform a nonlinear transformation on the Mel spectrum data, that is, a logarithmic transformation, to obtain the final Mel spectrum, as follows:

[0037] S mel [m] = log(S[m]), where S mel [m] represents the Mel spectrum data obtained after logarithmic transformation, and S[m] represents the Mel spectrum data before logarithmic transformation;

[0038] Apply a Gaussian filter to smooth the Mel-spectrogram data as follows:

[0039] S smooth [m] = S mel [m]*G[m], where Ssmooth [m] represents the Mel spectrum data after smoothing by Gaussian filter, and G[m] represents the Gaussian filter kernel.

[0040] Preferably, the white noise is extracted in the following manner:

[0041] Perform a fast Fourier transform on the audio signal;

[0042] Calculate the geometric mean of the spectrum. The calculation formula is: Among them, X i represents the amplitude of the i-th frequency component of the spectrum, Q represents the number of frequency components, and π represents the product;

[0043] Calculate the arithmetic mean of the spectrum. The calculation formula is:

[0044] Calculate the spectrum flatness SF. The calculation formula is as follows:

[0045] Determine whether the spectrum flatness SF is close to 1. If the spectrum flatness SF is close to 1, it is determined to be white noise. Otherwise, it is determined to be non-white noise and the detection result is output.

[0046] Preferably, the specific content of the method for extracting the music speed is as follows:

[0047] Preprocessing the audio signal, wherein the preprocessing includes denoising and normalization;

[0048] Calculate the energy envelope. The calculation formula is as follows:

[0049] Where E[w] represents the energy envelope result, w represents the window index, L represents the window length, S represents the shift step of the window, and n represents the sample index, traversing the samples in the window;

[0050] Calculate the autocorrelation function of the energy envelope to find the periodicity of the signal. The formula of the autocorrelation function is as follows:

[0051] Where T represents the total length of the audio signal, x[n] represents the discrete samples of the original time domain signal, τ represents the lag, and represents the time offset;

[0052] Detect the peak value in the autocorrelation function and determine whether the peak value is significant. If the peak value is significant, determine the beat period and calculate the music speed feature BPM based on the detected beat period.

[0053] Preferably, the execution method of opening the rhythmic mode lighting effect library is as follows:

[0054] The preset intelligent mapping rules include brightness mapping and speed mapping;

[0055] Luminance Mapping:

[0056] Loading drum beat timestamps and energy;

[0057] Adjust the light brightness based on the energy of the drum beats, perform brightness mapping, and convert it into light brightness control instructions;

[0058] Control light brightness and output lighting effects;

[0059] Speed Mapping:

[0060] Load music speed feature BPM;

[0061] Calculate the speed of light element movement;

[0062] Control the movement of light elements and output lighting effects.

[0063] Preferably, the light brightness is adjusted based on the energy of the drum beats to perform brightness mapping, and the calculation formula is specifically: B = α × E + β, where B represents the adjusted light brightness, E represents the energy of the drum beats, and α and β represent adjustment coefficients respectively;

[0064] The calculation formula for calculating the movement speed of the light element is as follows:

[0065] vl=h×BPM+b, where vl represents the movement speed of the light element, h represents the proportional coefficient, and b represents the offset.

[0066] Technical effects and advantages of the present invention:

[0067] 1. The present invention provides users with a choice of music rhythm scenes. Based on the music rhythm scene selection, the microphone on the atmosphere lamp picks up the music sound in the surrounding environment to obtain a music signal. The music feature of the music signal is extracted through an audio analysis algorithm. Based on the extracted music feature and according to preset intelligent mapping rules, the music feature information is converted into a lighting control instruction. The lighting drive circuit of the atmosphere lamp drives the light-emitting unit of the atmosphere lamp circuit based on the lighting control instruction to control the atmosphere lamp. This deep integration with music rhythm not only enhances the user's perception and appreciation of music, but also brings a full range of sensory feasts to the user. This makes the present invention stand out in the field of music and light synchronization and is significantly superior to products with poor music and light integration in the existing technology.

[0068] 2. This invention utilizes advanced audio analysis algorithms to accurately identify seven key audio track elements: pitch, volume, tempo, note, duration, and white noise. This significantly expands the scope and accuracy of music information capture. This comprehensive and refined recognition capability allows lighting movements to closely align with the diverse dynamics of music, satisfying user needs for ambient lighting. This enhances the depth of musical rhythm and emotional resonance. Through in-depth research into the unique musical characteristics of each scene and algorithmic optimization, the lighting movement is deeply aligned with the emotional expression of the music. To every subtle shift in rhythm and emotional shift, the lighting responds with a perfectly rhythmic movement. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] The present invention is further described with reference to the accompanying drawings. However, the embodiments in the accompanying drawings do not constitute any limitation to the present invention. A person skilled in the art can obtain other drawings based on the following drawings without inventive effort.

[0070] Figure 1 The figure is a flow chart of a method for multi-dimensional input and output of musical rhythm according to the present invention.

[0071] Figure 2 This is a structural diagram of a device for multi-dimensional input and output of musical rhythms according to the present invention.

[0072] Figure 3 This is a structural diagram of a lighting system with multi-dimensional input and output music rhythm according to the present invention. DETAILED DESCRIPTION

[0073] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0074] Example 1

[0075] See also Figure 1 As shown, the present invention provides a method for multi-dimensional input and output of music rhythm, comprising the following steps: S1: user selects a music rhythm scene, S2: audio analysis algorithm extracts music features, S3: opens a rhythm mode lighting effect library, and S4: performs a lighting drive circuit;

[0076] S1: User selects a music rhythm scene: After turning on a music playback device and lighting up an ambient light connected to the music playback device, the user enters a music rhythm scene selection mode through a dedicated application interface on the mobile phone to select a music rhythm scene;

[0077] In this embodiment, it should be specifically explained that the user performs the following execution mode for selecting a music rhythm scene:

[0078] After turning on the music player and lighting the connected ambient light, the user enters the music rhythm scene selection mode through the dedicated application interface on the mobile phone and selects the music rhythm scene. The dedicated application interface is simple and intuitive, presenting scene options in the form of clear icons and text.

[0079] S2: Audio analysis algorithm extracts music features: After the user selects a music scene, the microphone on the ambient light picks up the music sounds in the surrounding environment and obtains the music signal. The audio analysis algorithm then extracts music features from the music signal, including notes, drum beats, volume, duration, pitch, white noise, and music speed.

[0080] In this embodiment, it should be specifically explained that the execution method of the audio analysis algorithm to extract music features is as follows:

[0081] The specific contents of the operation of the microphone on the ambient light to pick up the music sound in the surrounding environment are as follows:

[0082] Once the user completes the scene selection, the ambient light automatically activates its built-in, highly sensitive microphone to accurately capture the surrounding music. The microphone utilizes advanced noise reduction technology and a wide-band response design, effectively filtering out ambient noise interference and accurately capturing the music signal. Furthermore, each scene selection corresponds to its own unique, optimized sound pickup algorithm. During the sound pickup process, the algorithm specific to the currently selected scene efficiently and in real time analyzes and extracts the characteristics of the music being played.

[0083] In this embodiment, it should be specifically explained that the specific content of extracting music features from the music signal using the audio analysis algorithm is as follows:

[0084] S21, extracting the notes in the music features, specifically as follows:

[0085] Music consists of a series of notes, each of which can be represented by a specific frequency f and duration t; the frequency f of a note is usually measured in Hertz (Hz), while the duration t is usually measured in seconds (S);

[0086] Obtain music audio data, process each frame of audio data, extract frequency and amplitude information from the audio signal using discrete Fourier transform (DFT), fold the extracted frequency values into an octave, smooth the folded frequency values, and find the frequency peak; process and merge the notes to obtain the note amplitude distribution; traverse all the notes and find the note with the largest amplitude;

[0087] S22, extracting drum beats from the music features, specifically as follows:

[0088] The drum beat refers to the starting point of a strong note in music, which can be identified by detecting the real change of the amplitude A and frequency f of the note;

[0089] Traverse the window of audio samples and calculate the RMS value of the current window;

[0090] Calculate the difference from the previous window's RMS value;

[0091] Determining whether the RMS value or the difference exceeds a predefined threshold;

[0092] If the RMS value or the difference exceeds a predefined threshold, the corresponding beat intensity count is increased and the current window result is saved;

[0093] Use a sliding window to smooth the beat detection results and output the final beat detection results;

[0094] S23, extracting the volume of the music feature, specifically as follows:

[0095] The volume refers to the loudness of the music, which can be expressed by the amplitude A of the note, and the volume is measured in decibels (dB).

[0096] Set the window size and step size of the audio sample and calculate the RMS value (root mean square value) of the current window;

[0097] Calculate using the volume formula, the specific formula is: Among them, RMS0 represents the preset reference RMS value, which is usually 1;

[0098] Output volume calculation results;

[0099] S24, extracting the note length from the music feature, specifically as follows:

[0100] The note length refers to the duration of the note, expressed as t;

[0101] On the basis of the notes obtained, the duration t of the note with the largest amplitude can be obtained by accumulating the duration of the note;

[0102] Load the note calculation results and find the note with the largest amplitude;

[0103] Record the onset time of the note with the largest amplitude;

[0104] Determine whether it is the same note as the previous one. If the result is the same note, increase the duration counter, record the note length, and output the note length result;

[0105] S25, extracting the pitch in the music feature, specifically as follows:

[0106] The pitch refers to the tone of music, which can be represented by the frequency f of the note, and the pitch is usually measured in Hertz (Hz);

[0107] The audio samples are normalized using the following calculation formula:

[0108] Among them, x norm [n] represents the normalized audio sample, x[n] represents the discrete sample of the original time domain signal, and n represents the discrete time index;

[0109] Perform a Fast Fourier Transform (FFT) on the audio data to convert from the time domain to the frequency domain, as follows:

[0110] Where X[k] is the frequency domain representation, k is the frequency domain index, N is the total number of audio samples, j is the imaginary unit, and n is the discrete time index, ranging from 0 to N-1.

[0111] The fast Fourier transform result is converted into a Mel spectrum as follows:

[0112] Among them, H m,k Represents the elements of the Mel filter matrix, M represents the number of Mel filters, k represents the frequency domain index, and m represents the Mel filter index;

[0113] Perform a nonlinear transformation on the Mel spectrum data, that is, a logarithmic transformation, to obtain the final Mel spectrum, as follows:

[0114] S mel [m] = log(S[m]), where S mel [m] represents the Mel spectrum data obtained after logarithmic transformation, and S[m] represents the Mel spectrum data before logarithmic transformation;

[0115] Apply a Gaussian filter to smooth the Mel-spectrogram data as follows:

[0116] S smooth [m] = S mel [m]*G[m], where S smooth[m] represents the Mel spectrum data after smoothing by Gaussian filter, and G[m] represents the Gaussian filter kernel, which is used to smooth the Mel spectrum data;

[0117] It's important to note that the human ear's perception of different frequencies isn't linear; it's more sensitive to low frequencies and less so to high frequencies. Mel-spectrograms mimic this perceptual characteristic by using the Mel-scale. The Mel-scale is a nonlinear frequency scale that has higher resolution in low-frequency bands and lower resolution in high-frequency bands. This makes the Mel-spectrogram more consistent with human auditory perception.

[0118] S26, extracting white noise from the music features, specifically as follows:

[0119] White noise refers to the sound frequency with consistent power in each frequency band, and its power spectrum density S(f) is constant;

[0120] Perform a Fast Fourier Transform (FFT) on the audio signal;

[0121] Calculate the geometric mean of the spectrum. The calculation formula is: Among them, X i represents the amplitude of the i-th frequency component of the spectrum, Q represents the number of frequency components, and π represents the product;

[0122] Calculate the arithmetic mean of the spectrum. The calculation formula is:

[0123] Calculate the spectrum flatness SF. The calculation formula is as follows:

[0124] Determine whether the spectrum flatness SF is close to 1. If the spectrum flatness SF is close to 1, it is determined to be white noise. Otherwise, it is determined to be non-white noise and the detection result is output;

[0125] S27, extracting the music speed from the music features, specifically as follows:

[0126] The tempo of the music refers to the speed at which the music is played, usually expressed in beats per minute (BPM);

[0127] Preprocessing the audio signal, wherein the preprocessing includes denoising and normalization;

[0128] Calculate the energy envelope. The calculation formula is as follows:

[0129] Where E[w] represents the energy envelope result, w represents the window index, L represents the window length, S represents the shift step of the window, and n represents the sample index, traversing the samples in the window;

[0130] Calculate the autocorrelation function of the energy envelope to find the periodicity of the signal. The formula of the autocorrelation function is as follows:

[0131] Where T represents the total length of the audio signal, x[n] represents the discrete samples of the original time domain signal, τ represents the lag, and represents the time offset;

[0132] Detect the peak value in the autocorrelation function and determine whether the peak value is significant. If the peak value is significant, determine the beat period and calculate the music speed feature BPM based on the detected beat period.

[0133] S3: Open the rhythm mode lighting effect library: Based on the music features extracted in S2, the music feature information is converted into lighting control instructions according to the preset intelligent mapping rules;

[0134] In this embodiment, it should be specifically explained that the execution method of opening the rhythmic mode lighting effect library is as follows:

[0135] The preset intelligent mapping rules include brightness mapping and speed mapping;

[0136] Luminance Mapping:

[0137] Loading drum beat timestamps and energy;

[0138] Adjust the light brightness based on the energy of the drum beats, perform brightness mapping, and convert it into light brightness control instructions;

[0139] Control light brightness and output lighting effects;

[0140] Speed Mapping:

[0141] Load music speed feature BPM;

[0142] Calculate the speed of light element movement;

[0143] Control the movement of lighting elements and output lighting effects;

[0144] It should be noted that the brightness of the light is adjusted based on the energy of the drum beats to perform brightness mapping. The calculation formula is: B = α × E + β, where B represents the adjusted light brightness, E represents the energy of the drum beats, and α and β represent adjustment coefficients respectively.

[0145] It should be noted that the calculation formula for calculating the movement speed of the light element is as follows:

[0146] vl=h×BPM+b, where vl represents the movement speed of the light element, h represents the proportional coefficient used to adjust the speed gain, and b represents the offset used to adjust the speed baseline.

[0147] S4: Execute the light driving circuit: receive the light control instruction in S3, and the light driving circuit of the atmosphere lamp drives the light-emitting unit of the atmosphere lamp circuit based on the light control instruction to perform light control on the atmosphere lamp.

[0148] In this embodiment, it is important to note that the ambient light's lighting driver circuit precisely drives each light-emitting unit according to received instructions. This allows users to fully immerse themselves in the unique atmosphere created by the interweaving of music and lighting, greatly enhancing their perception and enjoyment of the fusion of music and lighting, and achieving deep interaction and synergistic expression between music and lighting.

[0149] Example 2

[0150] According to an exemplary embodiment, a device for multi-dimensional input and output of music rhythm includes: an electronic device and a computer-readable storage medium;

[0151] Figure 2 This is a structural diagram of a device for multi-dimensional input and output of musical rhythm provided in an embodiment of the present application. The device may have relatively large differences due to different configurations or performances, and can include one or more processors (Central Processing Units, CPU) and one or more memories, wherein the memories store at least one computer program, and the at least one computer program is loaded and executed by the processor to implement a method for multi-dimensional input and output of musical rhythm provided in the above-mentioned various method embodiments.

[0152] The electronic device includes a processor, a memory and a communication bus, wherein the memory stores a computer-readable program that can be executed by the processor;

[0153] The communication bus realizes the connection and communication between the processor and the memory;

[0154] The processor implements the above-mentioned method of multi-dimensional input and output music rhythm by calling the computer program stored in the memory and executing the computer readable program;

[0155] The computer-readable storage medium stores one or more programs. When executed on an electronic device, the one or more programs can be executed by one or more processors to provide a user input interface to implement the above-mentioned method of multi-dimensional input and output music rhythm.

[0156] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0157] It should be understood that determining B based on A does not mean determining B based solely on A. B can also be determined based on A and / or other information.

[0158] Example 3

[0159] See also Figure 3 As shown, the present invention provides a multi-dimensional input and output music rhythm lighting system, including: a device microphone pickup module, a device-side audio analysis algorithm module, a rhythm lighting effect mode module and a multi-channel lighting drive circuit module;

[0160] The device microphone pickup module is used to pick up the music sound in the surrounding environment through the microphone on the atmosphere light to obtain the music signal;

[0161] The device-side audio analysis algorithm module is used to extract music features from the music signal acquired by the device microphone pickup module through an audio analysis algorithm, wherein the music features include notes, drum beats, volume, duration, pitch, white noise, and music speed;

[0162] The rhythmic lighting effect mode module converts the music feature information into lighting control instructions based on the music features and according to preset intelligent mapping rules;

[0163] The multi-channel lighting driving circuit module receives the lighting control instruction of the rhythmic lighting effect mode module, and the lighting driving circuit of the atmosphere lamp drives the light-emitting unit of the atmosphere lamp circuit based on the lighting control instruction to control the lighting of the atmosphere lamp.

[0164] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

[0165] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for multi-dimensional input and output of musical rhythm, characterized in that: The following steps are involved: S1: User selects a music rhythm scene: After turning on a music playback device and lighting up an ambient light connected to the music playback device, the user enters a music rhythm scene selection mode through a dedicated application interface on the mobile phone to select a music rhythm scene; S2: Audio analysis algorithm extracts music features: After the user selects a music scene, the microphone on the ambient light picks up the music sounds in the surrounding environment and obtains the music signal. The audio analysis algorithm then extracts music features from the music signal, including notes, drum beats, volume, duration, pitch, white noise, and music speed. S3: Open the rhythm mode lighting effect library: Based on the music features extracted in S2, the music feature information is converted into lighting control instructions according to the preset intelligent mapping rules; S4: Execute the light driving circuit: receive the light control instruction in S3, and the light driving circuit of the atmosphere lamp drives the light-emitting unit of the atmosphere lamp circuit based on the light control instruction to perform light control on the atmosphere lamp.

2. The method for multi-dimensional input and output of music rhythm according to claim 1, characterized in that: The specific content of extracting music features from the music signal using the audio analysis algorithm is as follows: Extract the notes from the music features, specifically as follows: Obtain music audio data, process each frame of audio data, extract frequency and amplitude information from the audio signal using discrete Fourier transform, fold the extracted frequency values into an octave, smooth the folded frequency values, and find the frequency peak; process and merge the notes to obtain the note amplitude distribution; traverse all notes and find the note with the largest amplitude; Extract the drum beats from the music features, specifically as follows: Traverse the window of audio samples and calculate the RMS value of the current window; Calculate the difference from the previous window's RMS value; Determining whether the RMS value or the difference exceeds a predefined threshold; If the RMS value or the difference exceeds a predefined threshold, the corresponding beat intensity count is increased and the current window result is saved; Use a sliding window to smooth the beat detection results and output the final beat detection results.

3. The method of multi-dimensional input and output music rhythm according to claim 1, characterized in that: The specific content of extracting music features from the music signal using the audio analysis algorithm is as follows: Extract the volume of the music feature, specifically as follows: The volume refers to the loudness of the music, which is expressed by the amplitude A of the note, and the volume is measured in decibels (dB). Set the window size and step size of the audio sample and calculate the RMS value of the current window; Calculate using the volume formula, the specific formula is: Among them, RMS0 represents the preset reference RMS value; Output volume calculation results; Extract the note length from the music feature, specifically as follows: Load the note calculation results and find the note with the largest amplitude; Record the onset time of the note with the largest amplitude; Determine whether it is the same note as the previous one. If the result is the same note, increase the duration counter, record the note length, and output the note length result; Extract the pitch from the music feature, specifically as follows: The audio samples are normalized using the following calculation formula: Among them, x norm [n] represents the normalized audio sample, x[n] represents the discrete sample of the original time domain signal, and n represents the discrete time index; Perform a fast Fourier transform on the audio data to convert from the time domain to the frequency domain as follows: Where X[k] is the frequency domain representation, k is the frequency domain index, N is the total number of audio samples, j is the imaginary unit, and n is the discrete time index, ranging from 0 to N-1. The fast Fourier transform result is converted into a Mel spectrum as follows: Among them, H m,k Represents the elements of the Mel filter matrix, M represents the number of Mel filters, k represents the frequency domain index, and m represents the Mel filter index; Perform a nonlinear transformation on the Mel spectrum data, that is, a logarithmic transformation, to obtain the final Mel spectrum, as follows: S mel [m] = log(S[m]), where S mel [m] represents the Mel spectrum data obtained after logarithmic transformation, and S[m] represents the Mel spectrum data before logarithmic transformation; Apply a Gaussian filter to smooth the Mel-spectrogram data as follows: S smooth [m] = S mel [m]*G[m], where S smooth [m] represents the Mel spectrum data after smoothing by Gaussian filter, and G[m] represents the Gaussian filter kernel.

4. The method of multi-dimensional input and output music rhythm according to claim 1, characterized in that: The white noise extraction method is as follows: Perform a fast Fourier transform on the audio signal; Calculate the geometric mean of the spectrum. The calculation formula is: Among them, X i represents the amplitude of the i-th frequency component of the spectrum, Q represents the number of frequency components, and π represents the product; Calculate the arithmetic mean of the spectrum. The calculation formula is: Calculate the spectrum flatness SF. The calculation formula is as follows: Determine whether the spectrum flatness SF is close to 1. If the spectrum flatness SF is close to 1, it is determined to be white noise. Otherwise, it is determined to be non-white noise and the detection result is output.

5. The method for multi-dimensional input and output of music rhythm according to claim 1, characterized in that: The specific content of the method for extracting the music speed is as follows: Preprocessing the audio signal, wherein the preprocessing includes denoising and normalization; Calculate the energy envelope. The calculation formula is as follows: Where E[w] represents the energy envelope result, w represents the window index, L represents the window length, S represents the shift step of the window, and n represents the sample index, traversing the samples in the window; Calculate the autocorrelation function of the energy envelope to find the periodicity of the signal. The formula of the autocorrelation function is as follows: Where T represents the total length of the audio signal, x[n] represents the discrete samples of the original time domain signal, τ represents the lag, and represents the time offset; Detect the peak value in the autocorrelation function and determine whether the peak value is significant. If the peak value is significant, determine the beat period and calculate the music speed feature BPM based on the detected beat period.

6. The method for multi-dimensional input and output of music rhythm according to claim 1, characterized in that: The execution method of opening the rhythm mode lighting effect library is as follows: The preset intelligent mapping rules include brightness mapping and speed mapping; Luminance Mapping: Loading drum beat timestamps and energy; Adjust the light brightness based on the energy of the drum beats, perform brightness mapping, and convert it into light brightness control instructions; Control light brightness and output lighting effects; Speed Mapping: Load music speed feature BPM; Calculate the speed of light element movement; Control the movement of light elements and output lighting effects.

7. The method of multi-dimensional input and output music rhythm according to claim 6, characterized in that: The light brightness is adjusted based on the energy of the drum beats to perform brightness mapping. The calculation formula is: B = α × E + β, where B represents the adjusted light brightness, E represents the energy of the drum beats, and α and β represent adjustment coefficients respectively. The calculation formula for calculating the movement speed of the light element is as follows: vl=h×BPM+b, where vl represents the movement speed of the light element, h represents the proportional coefficient, and b represents the offset.

8. A device for multi-dimensional input and output of musical rhythms, characterized by: It is implemented based on a method for multi-dimensional input and output of music rhythm according to any one of claims 1 to 7, comprising an electronic device and a computer-readable storage medium; The electronic device includes a processor, a memory and a communication bus, wherein the memory stores a computer-readable program that can be executed by the processor; The communication bus realizes the connection and communication between the processor and the memory; When the processor executes the computer-readable program, the steps of the method for multi-dimensional input and output music rhythm according to any one of claims 1 to 7 are implemented; The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the method of multi-dimensional input and output music rhythm as described in any one of claims 1-7.

9. A multi-dimensional input and output music rhythm lighting system, characterized by: It is based on the multi-dimensional input and output music rhythm method according to any one of claims 1 to 7, comprising a device microphone pickup module, a device-side audio analysis algorithm module, a rhythmic lighting effect mode module, and a multi-channel lighting drive circuit module; The device microphone pickup module is used to pick up the music sound in the surrounding environment through the microphone on the atmosphere light to obtain the music signal; The device-side audio analysis algorithm module is used to extract music features from the music signal acquired by the device microphone pickup module through an audio analysis algorithm, wherein the music features include notes, drum beats, volume, duration, pitch, white noise, and music speed; The rhythmic lighting effect mode module converts the music feature information into lighting control instructions based on the music features and according to preset intelligent mapping rules; The multi-channel lighting driving circuit module receives the lighting control instruction of the rhythmic lighting effect mode module, and the lighting driving circuit of the atmosphere lamp drives the light-emitting unit of the atmosphere lamp circuit based on the lighting control instruction to control the lighting of the atmosphere lamp.

Citation Information

Cited By

  • Music rhythm analysis and lamp effect generation method under low-speed bus

    CN120856778A

  • Atmosphere creation audio control system and method

    CN121037753A

  • Atmosphere building audio control system and method

    CN121037753B