Interface light control method based on audio data and computer readable storage medium
By detecting the drum frequency and energy in the audio data in real time, the display effect of the interface lights is controlled, solving the problem of the display screen not being related to the audio, and realizing a rich visual experience and better user interaction.
Patent Information
- Application Number
- CN202111597818.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-24
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2041-12-24
AI Technical Summary
In entertainment venues such as KTVs and bars, the visual effects of the display screens are not related to the audio, resulting in a relatively monotonous user experience and an inability to fully immerse oneself in the atmosphere.
By detecting the drum frequency and energy in the audio data in real time, the display effect of the interface lights is controlled to make them change in sync with the audio.
It enriches the visual effects of the display screen, enhances the user's visual experience, and allows users to better immerse themselves in the atmosphere of the event.
Smart Images

Figure CN116343757B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of screen lighting control technology, and in particular to an interface lighting control method based on audio data and a computer-readable storage medium. Background Technology
[0002] Entertainment venues such as KTVs, bars, and dance halls often feature cool or uniquely themed lighting to provide customers with a comprehensive sensory experience.
[0003] Currently, technologies for controlling scene lighting based on audio have emerged in the market. For example, patent application CN202110127046.X, entitled "Audio-Based Lighting Control System and Method," discloses an audio-based lighting control system and method, including: an audio signal input unit, an audio signal equalization unit, a timbre data analysis unit, a pitch data analysis unit, a loudness data analysis unit, and a lighting mode unit. Each data analysis unit reads the audio digital signal and analyzes it into timbre data, pitch data, and loudness data, respectively. The lighting mode unit converts the timbre data into a main lighting color signal, the pitch data into a local lighting color signal, and the loudness data into an overall lighting brightness signal. The lighting control system performs layered control of the lighting using timbre data, pitch data, and loudness data. The timbre data is used to control the main lighting color; the pitch data is used to control the local lighting color; and the loudness data is used to control the overall lighting brightness. This invention enables changes in brightness and color of the lighting based on changes in timbre, pitch, and loudness, resulting in richer rhythmic effects and an enhanced user experience.
[0004] As can be seen from the above patents, it is now possible to control scene lighting through audio. However, digital entertainment venues such as KTVs and bars often have display screens (TV screens or large screens). Currently, these screens typically only display music videos or pre-set images or videos, without being linked to the audio being played. The display effect is relatively simple and cannot allow users to better immerse themselves in the atmosphere. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide an interface lighting control method based on audio data and a computer-readable storage medium, which can enrich the visual effects of the display screen and improve the user's visual experience.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for controlling interface lighting based on audio data, comprising:
[0007] Acquire audio data in real time and identify drum beats in the audio data in real time;
[0008] Based on the preset drum beat frequency level detection period, obtain the number of drum beats within the current drum beat frequency level detection period, and determine the drum beat frequency level of the current drum beat frequency level detection period based on the number of drum beats.
[0009] According to the preset drum energy level detection cycle, the maximum spectral energy of the drum within the current drum energy level detection cycle is obtained, and the drum energy level of the current drum energy level detection cycle is determined based on the maximum spectral energy.
[0010] Based on the drum frequency level of the current drum frequency level detection cycle, control the interface lighting for the next drum frequency level detection cycle, and / or based on the drum energy level of the current drum energy level detection cycle, control the interface lighting for the next drum energy level detection cycle.
[0011] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.
[0012] The beneficial effects of this invention are as follows: by detecting the drum beats in the audio data and controlling the display of interface lighting animations according to the frequency and energy of the drum beats, the interface lighting can change according to the audio changes, enriching the visual effects of the display screen, attracting the attention of users in the venue, and improving the user's visual experience. Attached Figure Description
[0013] Figure 1 This is a flowchart of an interface lighting control method based on audio data according to the present invention;
[0014] Figure 2 This is a flowchart of the method according to Embodiment 1 of the present invention;
[0015] Figure 3 This is a flowchart of step S1 in Embodiment 2 of the present invention. Detailed Implementation
[0016] To explain the technical content, objectives, and effects of the present invention in detail, the following description is provided in conjunction with the embodiments and accompanying drawings.
[0017] Please see Figure 1 A method for controlling interface lighting based on audio data, comprising:
[0018] Acquire audio data in real time and identify drum beats in the audio data in real time;
[0019] Based on the preset drum beat frequency level detection period, obtain the number of drum beats within the current drum beat frequency level detection period, and determine the drum beat frequency level of the current drum beat frequency level detection period based on the number of drum beats.
[0020] According to the preset drum energy level detection cycle, the maximum spectral energy of the drum within the current drum energy level detection cycle is obtained, and the drum energy level of the current drum energy level detection cycle is determined based on the maximum spectral energy.
[0021] Based on the drum frequency level of the current drum frequency level detection cycle, control the interface lighting for the next drum frequency level detection cycle, and / or based on the drum energy level of the current drum energy level detection cycle, control the interface lighting for the next drum energy level detection cycle.
[0022] As can be seen from the above description, the beneficial effects of the present invention are as follows: based on the frequency and energy of the drum beats in the audio data, the display of the interface lights is controlled, realizing the interaction between the audio and the display screen, enriching the visual effects of the display screen, and improving the user's visual experience.
[0023] Further, the step of obtaining the number of drumbeats within the current drumbeat frequency level detection period according to a preset drumbeat frequency level detection period, and determining the drumbeat frequency level of the current drumbeat frequency level detection period based on the number of drumbeats, specifically involves:
[0024] When the preset drum frequency level detection cycle is reached, the drum beats with an energy difference greater than the preset first threshold within the current drum frequency level detection cycle are obtained, and the first drum beat is obtained.
[0025] Based on the number of the first drumbeats, determine the drumbeat frequency level corresponding to the current drumbeat frequency level detection cycle.
[0026] Further, determining the drum frequency level corresponding to the current drum frequency level detection cycle based on the number of the first drum beats specifically involves:
[0027] If the number of the first drumbeats is 0 or 1, then the drumbeat frequency level corresponding to the current drumbeat frequency level detection cycle is set to 1.
[0028] If the number of the first drumbeats is 2, then the drumbeat frequency level corresponding to the current drumbeat frequency level detection cycle is set to 2;
[0029] If the number of the first drumbeats is 3 or 4, then the drumbeat frequency level corresponding to the current drumbeat frequency level detection cycle is set to 3.
[0030] If the number of the first drumbeats is greater than or equal to 5, then the drumbeat frequency level corresponding to the current drumbeat frequency level detection cycle is set to 4.
[0031] As described above, the drum frequency level is determined based on the number of drumbeats with an energy difference greater than a preset threshold.
[0032] Further, the step of obtaining the maximum spectral energy of the drum beats within the current drum beat energy level detection period according to the preset drum beat energy level detection period, and determining the drum beat energy level of the current drum beat energy level detection period based on the maximum spectral energy sum, specifically involves:
[0033] When the preset drum energy level detection period is reached, the maximum value of the sum of the spectral energy of each drum within the current drum energy level detection period is obtained, and the drum energy level corresponding to the current drum energy level detection period is determined based on the maximum value.
[0034] Furthermore, when a preset drum energy level detection period is reached, the maximum value of the sum of the spectral energy of each drum within the current drum energy level detection period is obtained, and the drum energy level corresponding to the current drum energy level detection period is determined based on the maximum value. Specifically, this is as follows:
[0035] When the preset drum energy level detection cycle is reached, determine whether there is a drumbeat within the current drum energy level detection cycle;
[0036] If it does not exist, then set the drum energy level corresponding to the current drum energy level detection cycle to 1;
[0037] If it exists, obtain the maximum value of the sum of the spectral energy of each drumbeat within the current drumbeat energy level detection period;
[0038] If the maximum value is within the preset first value range, then the drum energy level corresponding to the current drum energy level detection cycle is set to 2;
[0039] If the maximum value is within the preset second value range, then the drum energy level corresponding to the current drum energy level detection cycle is set to 3.
[0040] As described above, the energy level of a drumbeat is determined based on its maximum spectral energy.
[0041] Furthermore, the interface lighting includes spotlights, which include left and right spotlights and a bottom spotlight;
[0042] The specific steps for controlling the interface lighting for the next drum beat frequency level detection cycle based on the drum beat frequency level of the current drum beat frequency level detection cycle are as follows:
[0043] In the next drum beat frequency level detection cycle, the display of the left and right spotlights is controlled according to the preset spotlight animation effect corresponding to the drum beat frequency level.
[0044] In the next drum beat frequency level detection cycle, the display of the bottom spotlight is controlled according to the preset spotlight animation effect corresponding to the drum beat frequency level.
[0045] As described above, the display of the left and right spotlights and the bottom spotlights is controlled according to the drum beat frequency level.
[0046] Furthermore, in the next drum beat frequency level detection cycle, controlling the display of the left and right spotlights according to the preset spotlight animation effect corresponding to the drum beat frequency level specifically involves:
[0047] Based on the drum frequency level of the current drum frequency level detection cycle, obtain the corresponding spotlight animation effect;
[0048] Select one spotlight animation effect from the corresponding spotlight animation effects, and in the next drum beat frequency level detection cycle, control the display of the left and right spotlights according to the selected spotlight animation effect.
[0049] As described above, multiple spotlight animation effects can be preset, and one of the spotlight animation effects can be dynamically selected to control the display of the left and right spotlights, thereby achieving different lighting effects.
[0050] Furthermore, the interface lighting includes a bottom background light;
[0051] The specific steps for controlling the interface lighting for the next drumbeat energy level detection cycle based on the drumbeat energy level of the current drumbeat energy level detection cycle are as follows:
[0052] The transparency of the bottom background light is determined based on the maximum value of the spectral energy of each drumbeat within the current drumbeat energy level detection cycle. In the next drumbeat energy level detection cycle, the display of the bottom background light is controlled according to the preset background light animation effect corresponding to the drumbeat energy level and the transparency.
[0053] As described above, the display of the bottom background light is controlled based on the drum energy level and the maximum spectral energy of the drum.
[0054] Furthermore, determining the transparency of the bottom background light based on the maximum value of the sum of the spectral energy of each drumbeat within the current drumbeat energy level detection period specifically involves:
[0055] If the maximum value of the sum of the spectral energy of each drumbeat within the current drumbeat energy level detection period is less than or equal to the preset energy threshold, then the transparency of the bottom background light will be set to the preset transparency.
[0056] If the maximum sum of the spectral energy of each drumbeat within the current drumbeat energy level detection period is greater than the preset energy threshold, then the transparency of the bottom background light is set according to the maximum sum of the spectral energy of each drumbeat within the current drumbeat energy level detection period.
[0057] As described above, based on the maximum spectral energy of the drumbeat and the determined transparency, when the drumbeat is weak, the transparency is low, resulting in a weaker display effect of the bottom background light; when the drumbeat is strong, the transparency is high, resulting in a stronger display effect of the bottom background light.
[0058] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.
[0059] Example 1
[0060] Please refer to Figure 2 Embodiment 1 of the present invention is: an interface lighting control method based on audio data, which can be applied to audiovisual venues such as KTVs, bars, and dance halls. Figure 2 As shown, it includes the following steps:
[0061] S1: Acquire audio data in real time and identify drum beats in the audio data in real time.
[0062] In this embodiment, audio data is acquired, and then each 0.3s or 0.4s of audio data is taken as an audio frame. The difference between the spectral energy of adjacent audio frames is calculated to obtain the energy difference of the audio frames. Finally, based on the energy difference of the audio frames, the drum beats in the audio data are identified in real time.
[0063] S2: Based on the preset drum frequency level detection period, obtain the number of drum beats within the current drum frequency level detection period, and determine the drum frequency level of the current drum frequency level detection period based on the number of drum beats.
[0064] Specifically, when the preset drum beat frequency level detection cycle is reached, the drum beats with an energy difference greater than the preset first threshold within the current drum beat frequency level detection cycle are obtained to obtain the first drum beat; then, based on the number of the first drum beats, the drum beat frequency level corresponding to the current drum beat frequency level detection cycle is determined.
[0065] In this embodiment, the drum beat frequency level detection period can be 1-2 seconds, specifically 1.6 seconds. Every 1.6 seconds, the number of first drum beats with an energy difference greater than a preset first threshold is obtained, and then the drum beat frequency level corresponding to the current period is determined based on the number. In this embodiment, four drum beat frequency levels are set. Specifically, if the number of first drum beats is 0 or 1, the drum beat frequency level corresponding to the current drum beat frequency level detection period is set to 1; if the number of first drum beats is 2, the drum beat frequency level corresponding to the current drum beat frequency level detection period is set to 2; if the number of first drum beats is 3 or 4, the drum beat frequency level corresponding to the current drum beat frequency level detection period is set to 3; if the number of first drum beats is greater than or equal to 5, the drum beat frequency level corresponding to the current drum beat frequency level detection period is set to 4.
[0066] S3: Based on the preset drum energy level detection period, obtain the maximum spectral energy of the drum within the current drum energy level detection period, and determine the drum energy level of the current drum energy level detection period based on the maximum spectral energy.
[0067] Specifically, when the preset drum energy level detection period is reached, the maximum value of the sum of the spectral energy of each drum within the current drum energy level detection period is obtained, and then the drum energy level corresponding to the current drum energy level detection period is determined based on the maximum value.
[0068] In this embodiment, the drum beat energy level detection period can be 0.2s-0.8s, specifically 0.6s. Every 0.6s, the maximum value of the sum of the spectral energy of each drum beat is obtained, and then the drum beat energy level corresponding to the current period is determined based on the maximum value. In this embodiment, three drum beat energy levels are set. Specifically, if there are no drum beats in the current drum beat energy level detection period, i.e., the number of drum beats is 0, then the drum beat energy level corresponding to the current drum beat energy level detection period is set to 1; if the maximum value of the sum of the spectral energy of each drum beat in the current drum beat energy level detection period is less than or equal to 30, then the drum beat energy level corresponding to the current drum beat energy level detection period is set to 2; if the maximum value is greater than 30, then the drum beat energy level corresponding to the current drum beat energy level detection period is set to 3.
[0069] S4: Based on the drum frequency level of the current drum frequency level detection cycle, control the interface lighting for the next drum frequency level detection cycle.
[0070] S5: Based on the drum energy level of the current drum energy level detection cycle, control the interface lighting for the next drum energy level detection cycle.
[0071] In the above steps, steps S2 and S3 can be executed simultaneously, and steps S4 and S5 can be executed simultaneously.
[0072] In this embodiment, the interface lighting includes spotlights and background lights. The spotlights include left and right spotlights and a bottom spotlight, and the background lights include a bottom background light. The left and right spotlights and the bottom spotlights display according to the drum beat frequency level, while the bottom background light displays according to the drum beat energy level.
[0073] For step S4, specifically, in the next drum frequency level detection cycle, the display of the left and right spotlights is controlled according to the spotlight animation effect corresponding to the drum frequency level of the current drum energy level detection cycle; at the same time, the display of the bottom spotlight is controlled according to the spotlight animation effect corresponding to the drum frequency level of the current drum energy level detection cycle.
[0074] Furthermore, in an optional embodiment, for each drum frequency level, multiple spotlight animation effects are preset. After determining the drum energy level of the current drum energy level detection cycle, a spotlight animation effect is selected from the corresponding multiple spotlight animation effects, and the display of the left and right spotlights is controlled according to the selected spotlight animation effect.
[0075] Similarly, you can select one of the various spotlight animation effects corresponding to the drum energy level in the current drum energy level detection cycle to control the display of the bottom spotlight.
[0076] For step S5, specifically, the transparency of the bottom background light is first determined based on the maximum value of the sum of the spectral energy of each drumbeat within the current drumbeat energy level detection cycle. Then, in the next drumbeat energy level detection cycle, the display of the bottom background light is controlled based on the background light animation effect corresponding to the drumbeat energy level of the current drumbeat energy level detection cycle and the transparency.
[0077] Specifically, if the maximum sum of the spectral energy of all drums within the current drum energy level detection period is less than or equal to a preset energy threshold, the transparency of the bottom background light is set to a preset transparency; otherwise, the transparency of the bottom background light is set according to the maximum sum of the spectral energy of all drums within the current drum energy level detection period. Preferably, the preset energy threshold is 60, and the preset transparency is 50%.
[0078] When the maximum sum of the spectral energy of each drumbeat within the current drumbeat energy level detection period exceeds a preset energy threshold, the transparency of the bottom background light is set as follows: for example, when the maximum sum of the spectral energy of each drumbeat within the current drumbeat energy level detection period is between 90 and 100, the transparency of the bottom background light is 95%; when the maximum sum of the spectral energy of each drumbeat within the current drumbeat energy level detection period is between 70 and 90, the transparency of the bottom background light is 85%; and when the maximum sum of the spectral energy of each drumbeat within the current drumbeat energy level detection period is between 60 and 70, the transparency of the bottom background light is 60%.
[0079] For example, suppose the intro of a song lasts from 00:00.00 to 00:11.603. Within these 11 seconds, the drum frequency level and energy level of each drum beat detection cycle are both 1, and the maximum sum of the spectral energy of each drum beat is 55. Then, within these 11 seconds, the left and right spotlights will display an animation effect with a display level of 1, the bottom spotlights will display an animation effect with a display level of 1, and the bottom background light will display an animation effect with a display level of 1 and 50% transparency. Because the drum beats are relatively weak during the intro, the visual effect of the lighting is weak.
[0080] During the time interval from 00:28.169 to 00:36.877 in this song, the drum frequency level is 4 for each drum frequency level detection cycle, and the drum energy level is 3 for each drum energy level detection cycle. The maximum sum of the spectral energy of each drum is 82. Therefore, during this time interval, the left and right spotlights display according to the spotlight animation effect of display level 4, the bottom spotlights display according to the spotlight animation effect of display level 4, and the bottom background light displays according to the background light animation effect of display level 3 with 85% transparency. Because the drum beats are relatively strong and dense during this time interval, the visual lighting effect is strong.
[0081] Furthermore, in order to ensure that the lighting effects are synchronized with the drum beats in real time, drum beat data from multiple songs can be collected, and the effects can be adjusted one by one. Parameters such as the detection cycle, drum beat frequency level, and drum beat energy level can be optimized to suit the lighting display effects of most songs.
[0082] This embodiment can be applied to the Android system, greatly reducing the device cost to achieve the same effect; it can dynamically configure lighting effects and display different lighting effects, making the interface lighting display effect richer; it realizes the interaction between songs and display screen lights, enriches the display screen display effect, and can attract the attention of users in the venue, allowing users to better immerse themselves in the atmosphere.
[0083] Example 2
[0084] Please refer to Figure 3 This embodiment is a further extension of step S1 in Embodiment 1. For example... Figure 3 As shown, in this embodiment, step S1 specifically includes the following steps:
[0085] S101: Acquire audio data in real time, and further, normalize the audio data after acquisition.
[0086] S102: Sequentially acquire an audio frame from the audio data as the current audio frame, and use the difference between the sum of the spectral energy of the current audio frame and the previous audio frame as the energy difference D of the current audio frame. n And save the energy difference D n .
[0087] Specifically, this step includes the following steps:
[0088] S1021: Obtain the first audio frame of the audio data according to the preset frame length; in this embodiment, the frame length is 0.3s, that is, every 0.3s of audio data is taken as an audio frame.
[0089] S1022: Perform a Fourier transform on the first audio frame to obtain the spectrum of the first audio frame.
[0090] S1023: Calculate the sum of spectral energy of the first audio frame within a preset frequency band; the frequency band range can be selected according to requirements, such as the low-frequency part, mid-frequency part, high-frequency part, or the entire frequency band. In this embodiment, the sum of spectral energy is calculated within the entire frequency band range, denoted as S. n The subscript n indicates the frame number, which is counted starting from 1, i.e., the sequence number corresponding to the audio frame.
[0091] S1024: Based on the preset frame length, obtain the next audio frame of the audio data and use it as the current audio frame.
[0092] S1025: Perform a Fourier transform on the current audio frame to obtain the spectrum of the current audio frame.
[0093] S1026: Calculate the spectral energy of the current audio frame in the preset frequency band.
[0094] S1027: Subtract the sum of the spectral energy of the previous audio frame from the sum of the spectral energy of the current audio frame to obtain the energy difference value of the current audio frame, and save the energy difference value. Specifically, according to formula D... n =S n -S n-1 Calculate the energy difference between the current audio frame and the previous audio frame. The energy difference for the first audio frame can be ignored, or the spectral energy value of the first audio frame can be directly used as the energy difference.
[0095] S103: Determine the energy threshold δ corresponding to the current audio frame. n In this embodiment, the energy threshold can be a preset empirical value. Also, in this embodiment, the energy threshold corresponding to each audio frame is the same, which is the preset empirical value.
[0096] In other alternative embodiments, the energy threshold may not be a fixed value, but may be adaptively adjusted based on the energy difference of the processed audio frames.
[0097] S104: Obtain the current audio frame and two or more consecutive audio frames adjacent to it, and obtain the energy difference of three or more audio frames.
[0098] S105: Determine whether there is a peak value among the energy differences of the three or more audio frames, and whether the peak value is greater than the energy threshold corresponding to the current audio frame. If yes, proceed to step S106; otherwise, continue to obtain the next audio frame, i.e., proceed to step S102. For example, when obtaining the energy difference of three audio frames, determine whether the following condition is met: D n-2 <D n-1 And D n-1 >D nMeanwhile, D n-1 >δ n , where D n-1 D represents the energy difference between the current audio frame and the previous audio frame. n-2 It represents the energy difference between the two preceding audio frames of the current audio frame.
[0099] S106: Mark the audio frame corresponding to the peak as a drum beat. Return to step S102, and further, return to step S1024 until the audio data processing is complete.
[0100] This embodiment detects drum beats in audio data based on the energy difference between audio frames. This can be done in real time and has higher accuracy. Furthermore, it does not require the establishment of a model. By analyzing and comparing the energy differences of several adjacent audio frames, the drum beats are determined, which improves the detection efficiency.
[0101] Example 3
[0102] This embodiment is a computer-readable storage medium corresponding to the above embodiments, on which a computer program is stored. When the computer program is executed by a processor, it implements the various processes in the above embodiments of the interface lighting control method based on audio data, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0103] In summary, the present invention provides an interface lighting control method and computer-readable storage medium based on audio data. This method detects drum beats in audio data based on the energy difference between audio frames, enabling real-time detection with higher accuracy. Furthermore, it eliminates the need for model building, determining drum beats by analyzing and comparing the energy differences of several adjacent audio frames, thus improving detection efficiency. By detecting drum beats in the audio data and controlling the interface lighting display based on their frequency and energy level, the interface lighting changes in response to audio variations, achieving interaction between the song and the display screen's lighting. This enriches the display screen's visual effects, attracts the attention of users in the venue, and allows users to better immerse themselves in the atmosphere.
[0104] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. An interface light control method based on audio data, characterized by, The method comprises the following steps: real-time acquisition of audio data and real-time identification of drum points in the audio data; acquisition of the number of drum points in the current drum point frequency level detection period according to a preset drum point frequency level detection period, and determination of the drum point frequency level of the current drum point frequency level detection period according to the number of drum points; acquisition of the maximum spectral energy sum of the drum points in the current drum point energy level detection period according to a preset drum point energy level detection period, and determination of the drum point energy level of the current drum point energy level detection period according to the maximum spectral energy sum; control of the interface light of the next drum point frequency level detection period according to the drum point frequency level of the current drum point frequency level detection period, or, control of the interface light of the next drum point frequency level detection period according to the drum point frequency level of the current drum point frequency level detection period, and control of the interface light of the next drum point energy level detection period according to the drum point energy level of the current drum point energy level detection period.
2. The audio data based interface light control method of claim 1, wherein, The acquisition of the number of drum points in the current drum point frequency level detection period according to a preset drum point frequency level detection period, and the determination of the drum point frequency level of the current drum point frequency level detection period according to the number of drum points specifically comprise the following steps: when the preset drum point frequency level detection period is reached, the drum points with an energy difference greater than a preset first threshold value in the current drum point frequency level detection period are acquired to obtain first drum points; determination of the drum point frequency level corresponding to the current drum point frequency level detection period according to the number of first drum points.
3. The audio data based interface light control method of claim 2, wherein, The determination of the drum point frequency level corresponding to the current drum point frequency level detection period according to the number of first drum points specifically comprises the following steps: if the number of first drum points is 0 or 1, the drum point frequency level corresponding to the current drum point frequency level detection period is set to 1; if the number of first drum points is 2, the drum point frequency level corresponding to the current drum point frequency level detection period is set to 2; if the number of first drum points is 3 or 4, the drum point frequency level corresponding to the current drum point frequency level detection period is set to 3; if the number of first drum points is greater than or equal to 5, the drum point frequency level corresponding to the current drum point frequency level detection period is set to 4.
4. The audio data based interface light control method of claim 1, wherein, The acquisition of the maximum spectral energy sum of the drum points in the current drum point energy level detection period according to a preset drum point energy level detection period, and the determination of the drum point energy level of the current drum point energy level detection period according to the maximum spectral energy sum specifically comprise the following steps: when the preset drum point energy level detection period is reached, the maximum value of the spectral energy sum of each drum point in the current drum point energy level detection period is acquired, and the drum point energy level corresponding to the current drum point energy level detection period is determined according to the maximum value.
5. The audio data based interface light control method of claim 4, wherein, The acquisition of the maximum value of the spectral energy sum of each drum point in the current drum point energy level detection period when the preset drum point energy level detection period is reached, and the determination of the drum point energy level corresponding to the current drum point energy level detection period according to the maximum value specifically comprise the following steps: when the preset drum point energy level detection period is reached, it is judged whether there is a drum point in the current drum point energy level detection period; If not, the drum energy level corresponding to the current drum energy level detection period is set to 1; If so, the maximum value of the sum of the spectral energy of each drum in the current drum energy level detection period is obtained; If the maximum value is within a preset first value range, the drum energy level corresponding to the current drum energy level detection period is set to 2; If the maximum value is within a preset second value range, the drum energy level corresponding to the current drum energy level detection period is set to 3.
6. The audio data based interface light control method of claim 1, wherein, The interface light includes a spotlight, and the spotlight includes left and right spotlights and a bottom spotlight; The control of the interface light in the next drum frequency level detection period according to the drum frequency level of the current drum frequency level detection period is specifically: In the next drum frequency level detection period, the display of the left and right spotlights is controlled according to a preset spotlight animation effect corresponding to the drum frequency level. In the next drum frequency level detection period, the display of the bottom spotlight is controlled according to a preset spotlight animation effect corresponding to the drum frequency level.
7. The audio data based interface light control method of claim 6, wherein, The control of the display of the left and right spotlights in the next drum frequency level detection period according to a preset spotlight animation effect corresponding to the drum frequency level is specifically: According to the drum frequency level of the current drum frequency level detection period, a corresponding spotlight animation effect is obtained; From the corresponding spotlight animation effect, a spotlight animation effect is selected, and in the next drum frequency level detection period, the display of the left and right spotlights is controlled according to the spotlight animation effect.
8. The audio data based interface light control method of claim 1, wherein, The interface light includes a bottom background light; The control of the interface light in the next drum energy level detection period according to the drum energy level of the current drum energy level detection period is specifically: According to the maximum value of the sum of the spectral energy of each drum in the current drum energy level detection period, the transparency of the bottom background light is determined, and in the next drum energy level detection period, the display of the bottom background light is controlled according to a preset background light animation effect corresponding to the drum energy level and the transparency.
9. The audio data based interface light control method of claim 8, wherein, The determination of the transparency of the bottom background light according to the maximum value of the sum of the spectral energy of each drum in the current drum energy level detection period is specifically: If the maximum value of the sum of the spectral energy of each drum in the current drum energy level detection period is less than or equal to a preset energy threshold, the transparency of the bottom background light is set to a preset transparency; If the maximum value of the sum of the spectral energy of each drum in the current drum energy level detection period is greater than the preset energy threshold, the transparency of the bottom background light is set according to the maximum value of the sum of the spectral energy of each drum in the current drum energy level detection period.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method of any one of claims 1-9.
Citation Information
Patent Citations
Audio-based lighting control system and method
CN112911767B
Music drumbeat control terminal flash method, storage equipment and computer equipment
CN108322971A
Linkage control method for interface light and scene light and storage medium
CN116347722A