Lighting information control method, device, storage medium and equipment
By identifying the music beats in the audio signal and generating corresponding lighting control strategies, the problem of low fit between the lighting response and music beats in the prior art is solved, and a more efficient and economical lighting control effect is achieved, which is suitable for a variety of music styles.
Patent Information
- Application Number
- CN202211377986.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-04
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-11-04
AI Technical Summary
In the existing lighting information control methods, the light response and music beat fit are not high, and the hardware requirements are high, which increases product costs and can only be adapted to music of a specific style.
By identifying the music beats in the audio signal, a light control strategy for the music beats is generated, including controls of brightness and color, ensuring that the corresponding melody switches of the lights with the music.
Improves the fit between the light and the music beat, makes the light response more obvious and synchronous, reduces hardware requirements and product costs, and is suitable for a variety of music styles.
Smart Images

Figure CN115520090B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a method and device for controlling lighting information. Background Art
[0002] With the improvement of living standards, people have higher and higher requirements for the riding experience. The lighting atmosphere with fixed rhythm changes such as simple breathing or flowing water can no longer meet the market demand. The atmosphere light that changes with the rhythm of music has become a product that better meets people's needs.
[0003] The control methods for ambient light information are mainly brightness and color. The degree of fit between the brightness and color response of the ambient light and the music beat is an important criterion for judging the music rhythm ambient light. At present, there are some music rhythm ambient light products on the market, which mainly control the light information by performing spectrum analysis on the audio signal, such as short-time Fourier transform, and setting the mapping relationship between the ambient light and the spectrum. However, this method has high hardware requirements and increases the product cost. Some music rhythm ambient light products have high requirements for the sound source and can only adapt to music of a specific style, which makes the response rhythm of the light to the music not obvious enough, resulting in a low fit between the light response and the music beat. Summary of the invention
[0004] The present invention provides a method and device for controlling lighting information, which recognizes the music beat in the audio signal and sets the lighting information according to the music beat, so that the light can switch the color and brightness according to the corresponding melody of the music, thereby solving the problem that the light response and the music beat are not well matched in the existing lighting information control process. The specific technical solution is as follows:
[0005] In a first aspect, an embodiment of the present invention provides a method for controlling lighting information, the method comprising:
[0006] Obtaining a target audio signal with beat characteristics obtained by processing the original audio signal;
[0007] Using a preset determination condition to identify the music beat contained in the target audio signal, and dividing the target audio signal into a plurality of audio beat signals according to the identified music beat;
[0008] Generate a lighting control strategy suitable for the target audio signal according to the change of the energy value corresponding to each audio beat signal and the marked position of the energy value in each audio beat signal, wherein the lighting control strategy includes a lighting brightness control strategy and a lighting color control strategy;
[0009] In response to the lighting control instruction, the lighting brightness is controlled according to the lighting brightness control strategy to change along with the change of the energy value corresponding to each audio beat signal, and the lighting color is controlled according to the lighting color control strategy to switch at the marked position of the energy value in each audio beat signal.
[0010] In one implementation, the step of obtaining a target audio signal having a beat characteristic obtained by processing an original audio signal includes:
[0011] The waveform feature points in the original audio signal are amplified by using a segmented continuous amplification method to enhance the original audio signal;
[0012] The original audio signal after amplification is frequency segmented to obtain a target audio signal with beat characteristics.
[0013] In one implementation, the step of amplifying the waveform feature points in the original audio signal by using a segmented continuous amplification method to enhance the original audio signal includes:
[0014] Determine an amplitude interval corresponding to the original audio signal, and divide the amplitude interval into a plurality of amplitude level intervals in order of amplitude magnitude, wherein the higher the amplitude level, the larger the amplitude corresponding to the waveform feature point in the original audio signal within the amplitude level interval;
[0015] An amplitude amplification coefficient is set for waveform feature points in the original audio signal within different amplitude level intervals, and the waveform feature points in the original audio signal are amplified using the amplitude amplification coefficient to enhance the amplitude of the original audio signal. The higher the amplitude level interval, the smaller the amplitude amplification coefficient.
[0016] In one embodiment, the determination condition includes an energy determination condition and a time determination condition, and the using of the preset determination condition to identify the music beat contained in the target audio signal, and dividing the target audio signal into multiple audio beat signals according to the identified music beat, includes:
[0017] Taking the time corresponding to the marked position of the energy value in the target audio signal as the starting time, using the energy determination condition to determine whether the signal energy accumulated within a preset sampling period reaches a set energy threshold, the preset sampling period being a set number of sampling periods selected after the starting time;
[0018] When the signal energy accumulated within the preset sampling period reaches the set energy threshold, a time determination condition is used to determine whether the time interval is greater than the set time threshold, where the time interval is the time difference between the start time and the current time;
[0019] When the time interval is greater than the set time threshold, an audio signal corresponding to a starting time and a current time is intercepted from the target audio signal as a music beat contained in the target audio signal, and the target audio signal is divided into a plurality of audio beat signals according to the music beat.
[0020] In one embodiment, before taking the time corresponding to the marked position of the energy value in the target audio signal as the starting time and using the energy determination condition to determine whether the signal energy accumulated within the preset sampling period reaches the set energy threshold, the method further includes:
[0021] According to the amplitude change in adjacent sampling periods of the target audio signal, the peak position and the trough position in the target audio signal are determined, and the trough position is used as the marking position of the energy value in the target audio signal.
[0022] In one embodiment, generating a lighting control strategy suitable for the target audio signal according to the change of the energy value corresponding to each audio beat signal and the marked position of the energy value in each audio beat signal includes:
[0023] According to the change of the energy value corresponding to each audio beat signal, a nonlinear correspondence between the audio beat signal and the light brightness value is set, and a light brightness control strategy suitable for the target audio signal is generated according to the nonlinear correspondence;
[0024] When the target audio signal executes to the marked position of the energy value in each audio beat signal, a color value is randomly selected from the light color table as the light color corresponding to the output of each music beat signal, and a light color control strategy suitable for the target audio signal is generated according to the light color corresponding to the output of each music beat signal.
[0025] In one embodiment, the nonlinear correspondence between the audio beat signal and the light brightness value is set according to the change of the energy value corresponding to each audio beat signal, and the light brightness control strategy suitable for the target audio signal is generated according to the nonlinear correspondence, including:
[0026] Divide multiple energy value intervals according to the change of the energy value corresponding to each audio beat signal;
[0027] An upper limit of brightness is set for each energy value interval, and the upper limit of brightness is used as a mapping boundary to perform light brightness mapping for each energy value interval, so as to obtain a nonlinear correspondence between each audio beat signal and light brightness value;
[0028] The nonlinear correspondence between each audio beat signal and the light brightness value is converted into a light brightness curve corresponding to each audio beat signal, and a light brightness control strategy suitable for the target audio signal is generated in combination with the light brightness curve corresponding to each audio signal.
[0029] In a second aspect, an embodiment of the present invention provides a device for controlling lighting information, the device comprising:
[0030] An acquisition unit, used for acquiring a target audio signal with beat characteristics obtained by processing the original audio signal;
[0031] A division unit, configured to identify the music beat contained in the target audio signal using a preset determination condition, and divide the target audio signal into a plurality of audio beat signals according to the identified music beat;
[0032] A generating unit, configured to generate a lighting control strategy suitable for the target audio signal according to a change in an energy value corresponding to each audio beat signal and a marked position of an energy value in each audio beat signal, wherein the lighting control strategy includes a lighting brightness control strategy and a lighting color control strategy;
[0033] A control unit is used to respond to the light control instruction, control the light brightness to change along with the change of the energy value corresponding to each audio beat signal according to the light brightness control strategy, and control the light color to switch at the marked position of the energy value in each audio beat signal according to the light color control strategy.
[0034] In one embodiment, the acquisition unit includes:
[0035] A processing module, used for amplifying the waveform feature points in the original audio signal by using a segmented continuous amplification method to enhance the original audio signal;
[0036] The segmentation module is used to perform frequency segmentation on the original audio signal after amplification processing to obtain a target audio signal with beat characteristics.
[0037] In one embodiment, the processing module is specifically used to determine the amplitude interval corresponding to the original audio signal, and divide the amplitude interval into a plurality of amplitude level intervals in order of amplitude size, wherein the higher the amplitude level, the larger the amplitude corresponding to the waveform feature point in the original audio signal within the amplitude level interval;
[0038] The processing module is specifically used to set an amplitude amplification coefficient for waveform feature points in the original audio signal within different amplitude level intervals, and use the amplitude amplification coefficient to amplify the waveform feature points in the original audio signal to enhance the amplitude of the original audio signal. The higher the amplitude level interval, the smaller the amplitude amplification coefficient.
[0039] In one implementation, the determination condition includes an energy determination condition and a time determination condition, and the division unit includes:
[0040] A first judgment module is used to use the time corresponding to the marked position of the energy value in the target audio signal as the starting time, and use the energy judgment condition to judge whether the signal energy accumulated within a preset sampling period reaches a set energy threshold, wherein the preset sampling period is a set number of sampling periods selected after the starting time;
[0041] A second judgment module is used to use a time judgment condition to judge whether a time interval is greater than a set time threshold when the signal energy accumulated within the preset sampling period reaches the set energy threshold, wherein the time interval is a time difference between a start time and a current time;
[0042] The division module is used to intercept the audio signal corresponding to the starting time and the current time from the target audio signal as the music beat contained in the target audio signal when the time interval is greater than the set time threshold, and divide the target audio signal into multiple audio beat signals according to the music beat.
[0043] In one embodiment, the dividing unit further includes:
[0044] A determination module is used to determine the peak position and trough position of the target audio signal according to the amplitude change in adjacent sampling periods of the target audio signal before using the energy judgment condition to determine whether the signal energy accumulated within a preset sampling period reaches a set energy threshold, taking the moment corresponding to the marked position of the energy value in the target audio signal as the starting moment, and using the trough position as the marked position of the energy value in the target audio signal.
[0045] In one embodiment, the generating unit comprises:
[0046] A setting module, used to set a nonlinear correspondence between the audio beat signal and the light brightness value according to the change of the energy value corresponding to each audio beat signal, and generate a light brightness control strategy suitable for the target audio signal according to the nonlinear correspondence;
[0047] The selection module is used to randomly select a color value from the light color table as the light color corresponding to each music beat signal when the target audio signal executes to the marked position of the energy value in each audio beat signal, and generate a light color control strategy suitable for the target audio signal according to the light color corresponding to each music beat signal. In one embodiment, the setting module is specifically used to divide a plurality of energy value intervals according to the change of the energy value corresponding to each audio beat signal;
[0048] The setting module is further used to set an upper limit of brightness for each energy value interval, and use the upper limit of brightness as a mapping boundary to perform light brightness mapping on each energy value interval, so as to obtain a nonlinear correspondence between each audio beat signal and light brightness value;
[0049] The setting module is specifically used to convert the nonlinear correspondence between each audio beat signal and the light brightness value into a light brightness curve corresponding to each audio beat signal, and generate a light brightness control strategy suitable for the target audio signal in combination with the light brightness curve corresponding to each audio signal.
[0050] In a third aspect, an embodiment of the present invention provides a storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method described in the first aspect.
[0051] In a fourth aspect, an embodiment of the present invention provides a lighting information control device, including:
[0052] one or more processors;
[0053] a storage device for storing one or more programs,
[0054] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in the first aspect.
[0055] It can be seen from the above content that the control method and device of lighting information provided by the embodiment of the present invention, after obtaining the target audio signal with beat characteristics obtained after processing the original audio signal, use the preset judgment conditions to identify the music beat contained in the target audio signal, and divide the target audio signal into multiple audio beat signals according to the identified music beat, and further generate a lighting control strategy suitable for the target audio signal according to the change of the energy value corresponding to each audio beat signal and the marked position of the energy value in each audio beat signal. The lighting strategy includes a lighting brightness control strategy and a lighting color control strategy. In response to the lighting control instruction, the lighting brightness is controlled to change according to the lighting brightness control strategy along with the change of the energy value corresponding to each audio beat signal, and the lighting color is controlled to switch at the marked position of the energy value in each audio beat signal according to the lighting color control strategy. It can be seen that compared with the existing method of using spectrum analysis of audio signals to control lighting information, the embodiment of the present invention recognizes the music beat in the audio signal and sets the lighting information according to the music beat, so that the light can switch color and brightness according to the corresponding melody of the music, thereby solving the problem of low fit between the light response and the music beat in the existing lighting information control process.
[0056] In addition, the technical effects that can be achieved by this embodiment include:
[0057] According to the changes in the energy values corresponding to each audio beat signal and the marked positions of the energy values in each audio beat signal, a lighting control strategy suitable for the target audio signal is generated. The lighting information can be changed at obvious beat points with high synchronization with the rhythm of the music. One beat includes a lighting color control strategy and a lighting brightness control strategy, which includes both color changes and brightness changes. While following the characteristics of the music, the two changes do not interfere with each other.
[0058] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative work.
[0060] Figure 1 A schematic diagram of a flow chart of a method for controlling lighting information provided by an embodiment of the present invention;
[0061] Figure 2 A schematic diagram of the nonlinear correspondence between an audio beat signal and a light brightness value provided by an embodiment of the present invention;
[0062] Figure 3 A structural block diagram of a lighting information control process provided by an embodiment of the present invention;
[0063] Figure 4 A logic block diagram of a lighting information control process provided by an embodiment of the present invention;
[0064] Figure 5 A block diagram of a lighting information control device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0065] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0066] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0067] The present invention provides a method and device for controlling lighting information, which can identify the music beat in an audio signal and set the lighting information according to the music beat, so that the light can switch color and brightness according to the corresponding melody of the music, thereby solving the problem that the response of the light and the music beat are not well matched in the existing control process of the lighting information. The control system of the lighting information of the embodiment of the present invention can be embedded in the electronic control unit carried by the vehicle, and the electronic control unit controls the light to change the brightness and switch the color of the light according to the beat in the audio signal according to the generated lighting control strategy, so that the response of the light is matched with the music beat, so as to meet the needs of different groups of people and create a more comfortable riding atmosphere.
[0068] The embodiments of the present invention are described in detail below.
[0069] Figure 1 A flowchart of a method for controlling lighting information provided by an embodiment of the present invention. The method may include the following steps:
[0070] 101. Obtain a target audio signal with beat characteristics obtained after processing the original audio signal.
[0071] Among them, the original audio signal is the audio signal when the music is playing. The audio signal can be directly used for the music rhythm control of the ambient light, so that the lighting information of the ambient light changes synchronously with the music rhythm in real time to set off the atmosphere in the car and enhance the visual enjoyment of the users in the car.
[0072] Since the original audio signal is an audio signal collected by hardware, it is usually a digital signal converted from an electrical signal. The audio signal is similar to a sine wave, but it is not a regular sine wave. When the volume of the music is low, the fluctuation range is small, and when the volume is high, the fluctuation range is large. In order to adapt to a larger volume range, specifically, the waveform feature points in the original audio signal can be amplified by segmented continuous amplification to enhance the original audio signal, and the original audio signal after amplification is further frequency segmented to obtain a target audio signal with beat characteristics. Here, the amplification process can avoid the loss of too many signal features of the audio signal due to the low volume, and the signal is screened by frequency segmentation to obtain a signal with obvious beat characteristics.
[0073] In one embodiment, for the amplification process of the waveform feature points, a segmented continuous amplification method can be used. Specifically, by determining the amplitude interval corresponding to the original audio signal, and dividing the amplitude interval into multiple amplitude level intervals in order of amplitude size, where the higher the amplitude level, the larger the amplitude corresponding to the waveform feature point in the original audio signal within the amplitude level interval, and then setting an amplitude amplification coefficient for the waveform feature points in the original audio signal within different amplitude level intervals, and using the amplitude amplification coefficient to amplify the waveform feature points in the original audio signal to enhance the amplitude of the original audio signal, where the higher the amplitude level interval, the smaller the amplitude amplification coefficient. For example, the amplitude range corresponding to the original audio signal is 0-5, and the amplitude range is divided into three amplitude levels of 0-1, 1-3, and 3-5. The amplitude amplification factor is set to 5 for the first amplitude level 0-1, 3 for the second amplitude level 1-3, and 2 for the third amplitude level 3-5. Of course, in order to avoid the large amplitude difference between the amplitude intervals after amplification, the amplitude interval with the largest amplitude level can also not be amplified, that is, the amplitude amplification factor is set to 1, so as to avoid the large volume difference in the audio signal. Here, the amplitude amplification factors corresponding to different amplitude level intervals are not limited and can be selected according to actual needs.
[0074] In one embodiment, a frequency segmentation process is performed on an audio signal, and different frequency bands reflect different zero-crossing characteristics on the waveform corresponding to the audio signal. Here, a specific frequency band filtering method can be used to calculate the number of zero crossings of the audio signal, and then the specific frequency band signal is filtered out according to the number of zero crossings, and the interference in the specific frequency band signal is filtered to make the audio signal smoother.
[0075] 102. Use a preset determination condition to identify a music beat contained in the target audio signal, and divide the target audio signal into a plurality of audio beat signals according to the identified music beat.
[0076] Taking into account the rhythmic nature of the target audio signal, in order to make the lighting information more closely fit the musical characteristics of the target audio signal, pre-set judgment conditions can be used here to identify the music beat contained in the target audio signal. Since the music beat reflects the musical characteristics of the target audio signal, the music beat can be used as the basis for controlling the lighting information so that the lighting information is synchronized with the music rhythm.
[0077] It can be understood that the determination conditions here include energy determination conditions and time determination conditions. Specifically, in the process of identifying the music beat contained in the target audio signal, the moment corresponding to the marked position of the energy value in the target audio signal is taken as the starting moment, and the energy determination condition is used to determine whether the accumulated signal energy within the preset sampling period reaches the set energy threshold. The preset sampling period is a set number of sampling periods selected after the starting moment. When the accumulated signal energy within the preset sampling period reaches the set energy threshold, the time determination condition is used to determine whether the time interval is greater than the set time threshold. The time interval is the time difference between the starting moment and the current moment. When the time interval is greater than the set time threshold, the audio signal corresponding to the starting moment and the current moment is intercepted from the target audio signal as the music beat contained in the target audio signal, and the target audio signal is divided into multiple audio beat signals according to the music beat. For example, take t1 in the target audio signal as the starting time, and select the sampling period T1 corresponding to the starting time and the sampling period T2 and sampling period T3 after the actual time t1, and calculate the sum of the signal energy values within the sampling periods T1-T3. If the sum of the energy values reaches the set energy threshold, further determine whether the time interval is greater than the set time threshold. If the time interval is greater than the set time threshold, intercept the audio signal of the corresponding time interval as a music beat signal.
[0078] Among them, the marking position of the energy value in the target audio signal is the trough position in the target audio signal. The inflection point position in the audio signal can be found according to the amplitude change in adjacent sampling periods in the target audio signal, the peak position and the trough position in the target audio signal can be determined, and the trough position is used as the marking position of the energy value in the target audio signal.
[0079] It is understandable that the beat recognition process here adopts the method of short-time energy judgment and beat interval limitation, which avoids the problem of lighting information response errors and frequent changes in lighting information in a short period of time, and improves the display effect of lighting information.
[0080] 103. Generate a lighting control strategy suitable for the target audio signal according to the change of the energy value corresponding to each audio beat signal and the marked position of the energy value in each audio beat signal.
[0081] Among them, the lighting control strategy includes a lighting brightness control strategy and a lighting color control strategy. Specifically, a nonlinear correspondence between the audio beat signal and the lighting brightness value can be set according to the change of the energy value corresponding to each audio beat signal, and a lighting brightness control strategy suitable for the target audio signal is generated according to the nonlinear correspondence. When the target audio signal executes to the marked position of the energy value in each audio beat signal, a color value is randomly selected from the lighting color table as the lighting color corresponding to the output of each music beat signal, and a lighting color control strategy suitable for the target audio signal is generated according to the lighting color corresponding to the output of each music beat signal.
[0082] It is understandable that since the visual effects produced by the same brightness change value in different basic brightnesses are different, for example, when the brightness value changes from 0 to 10, the brightness change effect is more obvious than when the brightness value changes from 80 to 90. Here, the visual impact of different brightness changes is fully taken into consideration, and a nonlinear correspondence between the audio beat signal and the brightness value is set. The brightness values suitable for the audio beat signals with different signal energy values are segmented and mapped to ensure the continuity of the brightness curve. This correspondence not only maintains the similarity between the brightness change curve and the audio signal curve, but also enables the brightness change to better fit the changes in the music beat.
[0083] Furthermore, in order to highlight the beat of the music, the highest brightness value of the light can be output at the peak position of each beat, thereby enhancing the music effect accompanied by the light.
[0084] Specifically, in the process of generating a light brightness control strategy suitable for the target audio signal, multiple energy value intervals can be divided according to the change of the energy value corresponding to each audio beat signal, an upper limit of the brightness value can be set for each energy value interval, and the light brightness mapping is performed on each energy value interval using the upper limit of the brightness as the mapping boundary to obtain a nonlinear correspondence between each audio beat signal and the light brightness value, and the nonlinear correspondence between each audio beat signal and the light brightness value is converted into a light brightness curve corresponding to each audio beat signal, and a light brightness control strategy suitable for the target audio signal is generated in combination with the light brightness curve corresponding to each audio signal.
[0085] For example, Figure 2 As shown, Figure 2 It shows the nonlinear correspondence between the audio beat signal and the light brightness value. Figure 2The change of energy value corresponding to the audio beat signal is 0-1, which is divided into 3 energy value intervals, namely 0-0.2, 0.2-0.6, and 0.6-1. Similarly, the light brightness value distribution is 0-100%. For the segmented music beat signal corresponding to the 0-0.2 energy value interval, the segmented audio beat signal is mapped to the 70%-100% brightness value range, for the segmented audio beat signal corresponding to the 0.2-0.6 energy value interval, the segmented audio beat signal is mapped to the 30%-70% brightness value range, and for the segmented audio beat signal corresponding to the 0-0.2 energy value interval, the segmented audio beat signal is mapped to the 0-30% brightness value range.
[0086] Specifically, in the process of generating a lighting color control strategy suitable for the target audio signal, since visual interference will occur when the brightness and color in the lighting information change at the same time, it is more natural to trigger the color switch at a time when the lighting brightness is low. Here, the lighting color can be switched at the trough position of the energy value corresponding to the audio beat signal, and the lighting color can be kept unchanged in an audio beat signal. The brightness value change is used to highlight the strength of the beat. When the audio beat signal ends and the next audio beat signal is about to come, switch to the next color to respond to the new beat. Normally, the duration of a beat in an audio signal is very short, about 300ms, and the human eye cannot easily see the asynchrony between the color switching timing and the highest brightness value.
[0087] It can be understood that the switching of light colors here can be selected randomly from the color table. The random color selection function increases the diversity of the lighting atmosphere and improves the adaptation range of the volume. The switching of light colors can also be switched sequentially using a pre-set light color table. The pre-set light color table can adapt the appropriate color according to the music style. For example, if the music style is more festive, more red-related light colors can be configured in the light color table. If the music style is more fresh, more green and blue-related light colors can be configured in the light color table.
[0088] In the embodiment of the present invention, the diversity of light color switching is increased, and a function of randomly selecting light colors is designed. After a specific light color switching instruction is issued, a random function will be triggered to generate a random number different from the previous moment, and the corresponding RGB value in the color table will be read according to the random number, and the corresponding RGB color switching instruction will be sent to the actuator. This method of randomly selecting light colors can make the same music play repeatedly with different effects, increase the diversity of the lighting atmosphere, and the color switching is not affected by the volume, which has better universality.
[0089] 104. In response to the light control instruction, the light brightness is controlled to change along with the change of the energy value corresponding to each audio beat signal according to the light brightness control strategy, and the light color is controlled to switch at the marked position of the energy value in each audio beat signal according to the light color control strategy.
[0090] Here, the lighting control command can be triggered by the music on button or the light on button. The lighting control strategy can be embedded in the lighting product of the music rhythm to execute the control of the light color and light brightness during the music rhythm. The specific light brightness can change with the change of the energy value corresponding to each audio beat signal in the music, and the light color can be switched at the marked position of the energy value in each audio beat signal.
[0091] In actual application scenarios, Figure 3 The structural block diagram of the control process of lighting information provided by an embodiment of the present invention is shown. First, there is a signal sampling processing step 201, which mainly processes the original audio signal obtained by the audio acquisition system, including two parts: signal enhancement and frequency band separation. Signal enhancement can amplify the characteristic points in the waveform signal to avoid excessive signal feature loss due to too low volume. Frequency band separation can filter the signal according to the frequency to obtain a signal with obvious beat characteristics, and then the beat recognition step 202 calculates the △y value in the adjacent sampling period to determine the peak position and the trough position, and the peak position and the trough position in the signal are marked and sent to the lighting control step 203. The lighting control step 203 calculates the lighting control strategy according to the corresponding logic, including lighting brightness control and lighting color control. After the lighting brightness control and lighting color control are synchronously processed, the two control modes are merged, and the audio signal merged with the lighting control strategy is sent to the actuator to output the change result of the color and brightness of the audio signal in the period through the control output step 203.
[0092] In actual application scenarios, Figure 4The logic block diagram of the control process of the lighting information provided by the embodiment of the present invention is shown. After the audio signal is input in step 301, step 302 of processing the audio signal is executed, and step 303 of beat recognition is executed. After the peak position and the trough position are identified from the audio signal, the peak position and the trough position are further used to determine whether the beat condition is met, and the identified beat is used to control the change of the lighting information. On the one hand, for the control of the lighting color, firstly, it is determined whether the accumulated energy value reaches the set energy value threshold, and step 304 of determining whether the interval is correct is executed. If the set energy value threshold is reached, a timer is further used to determine whether the time interval reaches the set time threshold, and step 304 of determining whether the interval is satisfied is executed. If the set energy value threshold is not reached, step 306 of determining whether the color is not switched is executed. 6. Control the light color without switching. If the set time threshold is reached, execute the color switching step 307, control the light color to switch and reset the timer. If the set time threshold is not reached, execute the color non-switching step 306, control the light color without switching. For the case of switching the light color, execute the random number generation step 308, randomly select a color value from the color table as the light color for switching, and output the corresponding light color through the controller. On the other hand, for the control of light brightness, after identifying the peak position and trough position in the audio signal, execute the brightness control step 309, directly use the change of the energy value in the audio signal to control the change of light brightness, and execute the controller output step 310, output the corresponding light brightness through the controller.
[0093] Considering that there are certain disturbances in the target audio signal or very small music beats that cannot be distinguished by the human ear, in order to improve the accuracy of light color control in the light information, a short-time energy judgment is adopted here, that is, when the current music beat signal comes, the signal energy within a period of time after the current moment is accumulated. When the energy value accumulation reaches the set energy threshold, it is judged whether the corresponding time interval reaches the set time interval. If the time interval reaches the set time interval, the light color is switched. If the time interval does not reach the set time interval, the light color is not switched. For example, the time interval △t = 60ms, when the moment t is determined to be the color switching moment, the energy value within 60ms after this moment is calculated to determine whether it is the correct switching. In fact, although it is delayed by several cycles in timing, due to the short system cycle, there is no obvious delay effect visually. At the same time, in order to avoid frequent color switching in a short time, the time interval threshold is set as the judgment condition, that is, when the system issues a color switching instruction, the timer is reset and restarts the timing until the next color switching instruction is issued. The entire color control algorithm ensures that both brightness and color are followed in one beat. When the overall brightness changes slightly, the color switching can better make up for this deficiency.
[0094] The control method of light information provided by the embodiment of the present invention, after obtaining the target audio signal with beat characteristics obtained by processing the original audio signal, uses the preset judgment condition to identify the music beat contained in the target audio signal, and divides the target audio signal into multiple audio beat signals according to the identified music beat, and further generates a light control strategy suitable for the target audio signal according to the change of the energy value corresponding to each audio beat signal and the marked position of the energy value in each audio beat signal, the light strategy includes a light brightness control strategy and a light color control strategy, in response to the light control instruction, the light brightness is controlled to change with the change of the energy value corresponding to each audio beat signal according to the light brightness control strategy, and the light color is controlled to switch at the marked position of the energy value in each audio beat signal according to the light color control strategy. It can be seen that compared with the existing method of controlling light information by using spectrum analysis audio signal, the embodiment of the present invention identifies the music beat in the audio signal and sets the light information according to the music beat, so that the light can switch the color and brightness according to the corresponding melody of the music change, thereby solving the problem that the light response and the music beat are not highly fitted in the existing light information control process.
[0095] Based on the above embodiment, another embodiment of the present invention provides a lighting information control device, such as Figure 4 As shown, the device comprises:
[0096] An acquisition unit 21 may be used to acquire a target audio signal having a beat characteristic obtained by processing an original audio signal;
[0097] The dividing unit 22 may be used to identify the music beat contained in the target audio signal using a preset determination condition, and divide the target audio signal into a plurality of audio beat signals according to the identified music beat;
[0098] The generating unit 23 may be used to generate a lighting control strategy suitable for the target audio signal according to the change of the energy value corresponding to each audio beat signal and the marked position of the energy value in each audio beat signal, wherein the lighting control strategy includes a lighting brightness control strategy and a lighting color control strategy;
[0099] The control unit 24 can be used to respond to the lighting control instruction, control the lighting brightness to change along with the change of the energy value corresponding to each audio beat signal according to the lighting brightness control strategy, and control the lighting color to switch at the marked position of the energy value in each audio beat signal according to the lighting color control strategy.
[0100] In an actual application scenario, the acquisition unit 21 includes:
[0101] The processing module can be used to amplify the waveform feature points in the original audio signal by using a segmented continuous amplification method to enhance the original audio signal;
[0102] The segmentation module can be used to perform frequency segmentation on the original audio signal after amplification processing to obtain a target audio signal with beat characteristics.
[0103] In an actual application scenario, the processing module can be specifically used to determine the amplitude interval corresponding to the original audio signal, and divide the amplitude interval into multiple amplitude level intervals in order of amplitude size, wherein the higher the amplitude level, the larger the amplitude corresponding to the waveform feature point in the original audio signal within the amplitude level interval;
[0104] The processing module can also be specifically used to set an amplitude amplification factor for waveform feature points in the original audio signal within different amplitude level intervals, and use the amplitude amplification factor to amplify the waveform feature points in the original audio signal to enhance the amplitude of the original audio signal. The higher the amplitude level interval, the smaller the amplitude amplification factor.
[0105] In an actual application scenario, the determination condition includes an energy determination condition and a time determination condition, and the division unit 22 includes:
[0106] The first judgment module can be used to use the time corresponding to the marked position of the energy value in the target audio signal as the starting time, and use the energy judgment condition to judge whether the signal energy accumulated within a preset sampling period reaches a set energy threshold, wherein the preset sampling period is a set number of sampling periods selected after the starting time;
[0107] The second judgment module can be used to use the time judgment condition to judge whether the time interval is greater than the set time threshold when the signal energy accumulated within the preset sampling period reaches the set energy threshold, and the time interval is the time difference formed by the start time and the current time;
[0108] The division module can be used to intercept the audio signal corresponding to the starting time and the current time from the target audio signal as the music beat contained in the target audio signal when the time interval is greater than the set time threshold, and divide the target audio signal into multiple audio beat signals according to the music beat.
[0109] In an actual application scenario, the division unit 22 further includes:
[0110] The determination module can be used to determine the peak position and trough position in the target audio signal according to the amplitude change in adjacent sampling periods in the target audio signal before using the energy judgment condition to determine whether the signal energy accumulated within a preset sampling period reaches a set energy threshold, taking the moment corresponding to the marked position of the energy value in the target audio signal as the starting moment, and using the trough position as the marked position of the energy value in the target audio signal.
[0111] In an actual application scenario, the generating unit 23 includes:
[0112] A setting module can be used to set a nonlinear correspondence between the audio beat signal and the light brightness value according to the change of the energy value corresponding to each audio beat signal, and generate a light brightness control strategy suitable for the target audio signal according to the nonlinear correspondence;
[0113] The selection module can be used to randomly select a color value from the light color table as the light color corresponding to the output of each music beat signal when the target audio signal executes to the marked position of the energy value in each audio beat signal, and generate a light color control strategy suitable for the target audio signal according to the light color corresponding to the output of each music beat signal.
[0114] In an actual application scenario, the setting module can be specifically used to divide a plurality of energy value intervals according to the change of the energy value corresponding to each audio beat signal;
[0115] The setting module can also be used to set a brightness upper limit for each energy value interval, and use the brightness upper limit as a mapping boundary to perform light brightness mapping on each energy value interval, so as to obtain a nonlinear correspondence between each audio beat signal and the light brightness value;
[0116] The setting module can also be specifically used to convert the nonlinear correspondence between each audio beat signal and the light brightness value into a light brightness curve corresponding to each audio beat signal, and generate a light brightness control strategy suitable for the target audio signal in combination with the light brightness curve corresponding to each audio signal.
[0117] Based on the above method embodiment, another embodiment of the present invention provides a storage medium on which executable instructions are stored. When the instructions are executed by a processor, the processor implements the above method.
[0118] Based on the above embodiment, another embodiment of the present invention provides a lighting information control device, including:
[0119] one or more processors;
[0120] a storage device for storing one or more programs,
[0121] When the one or more programs are executed by the one or more processors, the one or more processors implement the above method.
[0122] The above-mentioned system and device embodiments correspond to the method embodiments and have the same technical effects as the method embodiments. For specific descriptions, please refer to the method embodiments. The device embodiments are obtained based on the method embodiments. For specific descriptions, please refer to the method embodiment part, which will not be repeated here. It can be understood by those of ordinary skill in the art that the accompanying drawings are only schematic diagrams of one embodiment, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present invention.
[0123] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.
[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for controlling lighting information, characterized in that: The method comprises: Obtaining a target audio signal with beat characteristics obtained by processing the original audio signal; Using a preset determination condition to identify the music beat contained in the target audio signal, and dividing the target audio signal into a plurality of audio beat signals according to the identified music beat; Generate a lighting control strategy suitable for the target audio signal according to the change of the energy value corresponding to each audio beat signal and the marked position of the energy value in each audio beat signal, wherein the lighting control strategy includes a lighting brightness control strategy and a lighting color control strategy; In response to the light control instruction, the light brightness is controlled to change along with the change of the energy value corresponding to each audio beat signal according to the light brightness control strategy, and the light color is controlled to switch at the marked position of the energy value in each audio beat signal according to the light color control strategy; The determination condition includes an energy determination condition and a time determination condition, and the step of using the preset determination condition to identify the music beat contained in the target audio signal and dividing the target audio signal into multiple audio beat signals according to the identified music beat includes: Taking the time corresponding to the marked position of the energy value in the target audio signal as the starting time, using the energy determination condition to determine whether the signal energy accumulated within a preset sampling period reaches a set energy threshold, the preset sampling period being a set number of sampling periods selected after the starting time; When the signal energy accumulated within the preset sampling period reaches the set energy threshold, a time determination condition is used to determine whether the time interval is greater than the set time threshold, where the time interval is the time difference between the start time and the current time; When the time interval is greater than the set time threshold, extracting the audio signal corresponding to the starting time and the current time from the target audio signal as the music beat contained in the target audio signal, and dividing the target audio signal into multiple audio beat signals according to the music beat; The method of generating a lighting control strategy suitable for the target audio signal according to the change of the energy value corresponding to each audio beat signal and the marked position of the energy value in each audio beat signal includes: According to the change of the energy value corresponding to each audio beat signal, a nonlinear correspondence between the audio beat signal and the light brightness value is set, and a light brightness control strategy suitable for the target audio signal is generated according to the nonlinear correspondence; When the target audio signal executes to the marked position of the energy value in each audio beat signal, a color value is randomly selected from the light color table as the light color corresponding to the output of each music beat signal, and a light color control strategy suitable for the target audio signal is generated according to the light color corresponding to the output of each music beat signal.
2. The method according to claim 1, characterized in that The step of obtaining a target audio signal having a beat characteristic obtained by processing the original audio signal comprises: The waveform feature points in the original audio signal are amplified by using a segmented continuous amplification method to enhance the original audio signal; The original audio signal after amplification is frequency segmented to obtain a target audio signal with beat characteristics.
3. The method according to claim 2, characterized in that The step of amplifying the waveform feature points in the original audio signal by means of segmented continuous amplification to enhance the original audio signal includes: Determine an amplitude interval corresponding to the original audio signal, and divide the amplitude interval into a plurality of amplitude level intervals in order of amplitude magnitude, wherein the higher the amplitude level, the larger the amplitude corresponding to the waveform feature point in the original audio signal within the amplitude level interval; An amplitude amplification coefficient is set for waveform feature points in the original audio signal within different amplitude level intervals, and the waveform feature points in the original audio signal are amplified using the amplitude amplification coefficient to enhance the amplitude of the original audio signal. The higher the amplitude level interval, the smaller the amplitude amplification coefficient.
4. The method according to claim 1, characterized in that Before taking the time corresponding to the marked position of the energy value in the target audio signal as the starting time and using the energy determination condition to determine whether the signal energy accumulated within the preset sampling period reaches the set energy threshold, the method further includes: According to the amplitude change in adjacent sampling periods of the target audio signal, the peak position and the trough position in the target audio signal are determined, and the trough position is used as the marking position of the energy value in the target audio signal.
5. The method according to claim 1, characterized in that The method of setting a nonlinear correspondence between the audio beat signal and the light brightness value according to the change of the energy value corresponding to each audio beat signal, and generating a light brightness control strategy suitable for the target audio signal according to the nonlinear correspondence includes: Divide multiple energy value intervals according to the change of the energy value corresponding to each audio beat signal; An upper limit of brightness is set for each energy value interval, and the upper limit of brightness is used as a mapping boundary to perform light brightness mapping for each energy value interval, so as to obtain a nonlinear correspondence between each audio beat signal and light brightness value; The nonlinear correspondence between each audio beat signal and the light brightness value is converted into a light brightness curve corresponding to each audio beat signal, and a light brightness control strategy suitable for the target audio signal is generated in combination with the light brightness curve corresponding to each audio signal.
6. A lighting information control device, characterized in that: The device comprises: An acquisition unit, used for acquiring a target audio signal with beat characteristics obtained by processing the original audio signal; A division unit, configured to identify the music beat contained in the target audio signal using a preset determination condition, and divide the target audio signal into a plurality of audio beat signals according to the identified music beat; A generating unit, configured to generate a lighting control strategy suitable for the target audio signal according to a change in an energy value corresponding to each audio beat signal and a marked position of an energy value in each audio beat signal, wherein the lighting control strategy includes a lighting brightness control strategy and a lighting color control strategy; A control unit, for responding to the light control instruction, controlling the light brightness to change along with the change of the energy value corresponding to each audio beat signal according to the light brightness control strategy, and controlling the light color to switch at the marked position of the energy value in each audio beat signal according to the light color control strategy; The determination condition includes an energy determination condition and a time determination condition, and the division unit includes: A first judgment module is used to use the time corresponding to the marked position of the energy value in the target audio signal as the starting time, and use the energy judgment condition to judge whether the signal energy accumulated within a preset sampling period reaches a set energy threshold, wherein the preset sampling period is a set number of sampling periods selected after the starting time; A second judgment module is used to use a time judgment condition to judge whether a time interval is greater than a set time threshold when the signal energy accumulated within the preset sampling period reaches the set energy threshold, wherein the time interval is a time difference between a start time and a current time; A division module, configured to, when the time interval is greater than the set time threshold, intercept the audio signal corresponding to the starting time and the current time from the target audio signal as the music beat contained in the target audio signal, and divide the target audio signal into multiple audio beat signals according to the music beat; The generating unit comprises: A setting module, used to set a nonlinear correspondence between the audio beat signal and the light brightness value according to the change of the energy value corresponding to each audio beat signal, and generate a light brightness control strategy suitable for the target audio signal according to the nonlinear correspondence; The selection module is used to randomly select a color value from the light color table as the light color corresponding to the output of each music beat signal when the target audio signal executes to the marked position of the energy value in each audio beat signal, and generate a light color control strategy suitable for the target audio signal according to the light color corresponding to the output of each music beat signal.
7. A storage medium having executable instructions stored thereon, characterized in that: When the instruction is executed by the processor, the processor implements the lighting information control method described in any one of claims 1-5.
8. A lighting information control device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method for controlling scene through audio, equipment and computer readable storage medium
CN113573442A
Atmosphere lamp display method and device based on music, equipment and storage medium
CN114828359A