Audio visual conversion method and device, medium and equipment
By obtaining audio spectrum information, determining the target sound amplitude and vibration frequency, calculating the light color transformation speed and scaling ratio, the problem of poor visual effect of sound linkage is solved, the visual display effect is matched with audio, and the user experience is improved.
Patent Information
- Application Number
- CN202410194624.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-21
- Publication Date
- 2025-08-22
AI Technical Summary
In the prior art, the solution of sound-linked vision has a single change in the light effect color and lacks a change rhythm, so it is impossible to effectively match the audio and visual display effects, resulting in the visual display effects that are inconsistent with the sound.
By obtaining the spectrum information of the audio data, determining the target sound amplitude and vibration frequency, calculating the transformation speed and scaling ratio of the light color, and controlling the display effect of the visual display device to improve the matching degree between audio and vision.
The matching degree between visual display effects and audio is enhanced, and the audio rhythm changes in the auditory sense are expressed through visual senses, improving the user's immersion and audio-visual experience.
Smart Images

Figure CN120529459A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of lighting control technology, and in particular to an audio-visual conversion method, device, medium, and equipment. Background Art
[0002] With the development of technology, people are pursuing multi-sensory experiences that integrate visual effects with sound, allowing visual displays like light color and ripples to change with sound. However, current solutions for integrating sound with visuals have not achieved ideal results. For example, methods that calculate light color based on timbre have low accuracy and cannot provide positive feedback through direct sensory perception. Sound-following solutions that reflect sound based on average level have a higher frequency concentration in high-frequency areas, which is inconsistent with auditory perception. Therefore, sound-integrated visuals still suffer from problems such as single light effect color changes and a lack of rhythmic changes, resulting in poor coordination between the visual display and the sound. Summary of the Invention
[0003] In order to solve the above technical problems, the present disclosure provides an audio-visual conversion method, device, medium and equipment to improve the matching degree between visual display effect and audio.
[0004] The present disclosure provides an audio-visual conversion method, comprising:
[0005] Acquiring spectrum information converted from current audio data; wherein the spectrum information is used to represent the corresponding relationship between vibration frequency and sound amplitude;
[0006] determining a target sound amplitude with a maximum amplitude and a target vibration frequency corresponding to the target sound amplitude based on the frequency spectrum information;
[0007] The target vibration frequency and multiple historical vibration frequencies are calculated according to a speed conversion algorithm to obtain a speed at which the light color changes; wherein the historical vibration frequency is the vibration frequency corresponding to the maximum sound amplitude of multiple consecutive historical audio data segments before the current audio data;
[0008] Mapping the target sound amplitude to a target scaling ratio of the audio ripple;
[0009] The display effect of the visual display device is controlled based on the transformation speed and the target scaling ratio.
[0010] In some embodiments, calculating the target vibration frequency and multiple historical vibration frequencies according to a speed conversion algorithm to obtain the light color change speed includes:
[0011] calculating a speed conversion parameter based on the target vibration frequency and a plurality of historical vibration frequencies;
[0012] The speed conversion parameters are calculated according to the speed conversion algorithm to obtain the speed of light color change.
[0013] In some embodiments, the speed conversion algorithm includes:
[0014]
[0015] Wherein, β represents the speed conversion parameter, and speed represents the speed of changing the light color.
[0016] In some embodiments, mapping the target sound amplitude to a target scaling ratio of the audio ripple includes:
[0017] According to the preset original size of the original ripple animation, the target sound amplitude is mapped to the target scaling ratio of the audio ripple.
[0018] In some embodiments, controlling the display effect of the visual display device based on the transformation speed and the target scaling ratio includes:
[0019] Controlling the size of the original ripple animation of the visual display device according to the target scaling ratio to obtain the target ripple animation;
[0020] Determining a color sequence of the light of the visual display device from a current color to a target color to be converted;
[0021] Rendering the color sequence to the target ripple animation;
[0022] The target ripple animation is controlled to display the gradient color sequence according to the transformation speed.
[0023] In some embodiments, controlling the size of the original ripple animation of the visual display device according to the target scaling ratio to obtain the target ripple animation includes:
[0024] scaling the size of the original ripple animation of the visual display device according to the target scaling ratio, and determining the ripple interpolation point in the scaled ripple animation;
[0025] The interpolation points are rendered into the scaled ripple animation to obtain a target ripple animation.
[0026] In some embodiments, determining a color sequence of the light of the visual display device from a current color to a target color to be converted comprises:
[0027] Based on a preset color set, selecting a target color to be converted from adjacent colors of the current color of the light of the visual display device; wherein the color set includes: a plurality of colors with equal step sizes within a preset hue interval;
[0028] Color gradient interpolation points are inserted between the color value of the current color and the color value of the target color to obtain a color sequence.
[0029] The present disclosure provides an audio-visual conversion device, comprising:
[0030] A spectrum acquisition module, configured to acquire spectrum information converted from current audio data; wherein the spectrum information is used to represent the corresponding relationship between vibration frequency and sound amplitude;
[0031] a sound determination module, configured to determine a target sound amplitude with a maximum amplitude and a target vibration frequency corresponding to the target sound amplitude based on the frequency spectrum information;
[0032] a speed calculation module, configured to calculate the target vibration frequency and a plurality of historical vibration frequencies according to a speed conversion algorithm to obtain a speed at which the light color changes; wherein the historical vibration frequency is the vibration frequency corresponding to the maximum sound amplitude of a plurality of consecutive historical audio data segments preceding the current audio data;
[0033] A ratio calculation module, configured to map the target sound amplitude to a target scaling ratio of the audio ripple;
[0034] The effect control module is used to control the display effect of the visual display device based on the transformation speed and the target scaling ratio.
[0035] The present disclosure also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program or instruction, wherein the program or instruction enables a computer to execute the steps of any one of the above methods.
[0036] The present disclosure also provides an electronic device, comprising:
[0037] one or more processors;
[0038] a memory for storing one or more programs or instructions;
[0039] The processor is configured to execute the steps of any of the above methods by calling the program or instructions stored in the memory.
[0040] The technical solution provided by the embodiments of the present disclosure has the following advantages over the prior art:
[0041] The technical solution provided by the embodiment of the present disclosure includes: first obtaining spectrum information converted from current audio data; wherein the spectrum information is used to represent the correspondence between vibration frequency and sound amplitude; determining the target sound amplitude with the largest amplitude and the target vibration frequency corresponding to the target sound amplitude based on the spectrum information; then calculating the target vibration frequency and multiple historical vibration frequencies according to a speed conversion algorithm to obtain the speed of light color change; wherein the historical vibration frequency is the vibration frequency corresponding to the maximum sound amplitude of multiple consecutive historical audio data before the current audio data; and mapping the target sound amplitude to a target scaling ratio of the audio ripple; finally, controlling the display effect of the visual display device based on the conversion speed and the target scaling ratio.
[0042] The present technical solution determines the target sound amplitude and its corresponding target vibration frequency from the spectrum information of the audio data. Since the target sound amplitude is the maximum amplitude, it is a sound feature that can be intuitively and obviously experienced by the user's hearing. Therefore, the target sound amplitude is mapped to the target scaling ratio of the audio ripple, so that the size of the audio sound in the auditory sense can be expressed by the size of the audio ripple in the visual sense; and accordingly, the target vibration frequency corresponding to the target sound amplitude is used as the main frequency, and the speed of change of the light color is calculated in combination with the historical vibration frequency, so that the speed of change of the light color in the visual sense is more consistent with the change of the audio rhythm in the auditory sense. Therefore, the present disclosure enhances the matching degree between the size of the audio ripple and the sound amplitude from the visual and auditory perspectives, and enhances the matching degree between the changing speed of the light color and the vibration frequency from the rhythm perspective, thereby improving the matching degree between the visual display effect and the audio. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0044] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0045] Figure 1 A flowchart of an audio-visual conversion method provided in an embodiment of the present disclosure;
[0046] Figure 2 A schematic diagram of a sound-controlled lighting change process provided by an embodiment of the present disclosure;
[0047] Figure 3 A structural block diagram of an audio-visual conversion device provided in an embodiment of the present disclosure;
[0048] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0049] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that, in the absence of conflict, the embodiments of the present disclosure and the features therein can be combined with each other.
[0050] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0051] Currently, the effect of the linkage between light and sound is not ideal. Based on this, the embodiments of the present disclosure provide an audio-visual conversion method, device, medium and equipment.
[0052] Figure 1 A flowchart of an audio-visual conversion method provided for an embodiment of the present disclosure. This method is applicable to devices with combined audio and light functions, such as lamps, speakers, and visual display devices. Exemplary application scenarios include ambient lights in vehicles, light shows on stages, and the like. This solution can map the audio amplitude to the ripple size and convert the vibration frequency to the speed of light color change, thereby improving the matching degree between the visual display effect and the audio. This method can be executed by an audio-visual conversion device, which can be implemented in software and / or hardware. Figure 1 As shown, the method includes the following steps:
[0053] S102: Acquire spectrum information converted from current audio data; wherein the spectrum information is used to represent the corresponding relationship between vibration frequency and sound amplitude.
[0054] In this embodiment, a complete segment of original audio data may be obtained, and the original audio data may be divided into a plurality of segmented audio data according to a preset duration (eg, 100 milliseconds), and each segmented audio data may be used as current audio data to be processed.
[0055] The current audio data is converted into spectrum information. One conversion method may include: collecting PCM data of the current audio data; and performing fast Fourier transform on the PCM data to obtain spectrum information.
[0056] Reference Figure 2In a specific example, PCM (Pulse Code Modulation) data used to access the current audio data being played in the audio output mixer can be captured in real time using an acquisition tool such as a Visualizer; the aforementioned Visualizer is a visualization tool in the existing Android platform library. The captured PCM data is subjected to a fast Fourier transform to obtain spectrum information. The spectrum information can reflect the frequency distribution of the current audio data and can be decomposed into harmonic oscillations with different amplitudes and frequencies. Based on this, this embodiment uses spectrum information to represent the correspondence between vibration frequency and sound amplitude.
[0057] S104: Determine the target sound amplitude with the largest amplitude and the target vibration frequency corresponding to the target sound amplitude based on the frequency spectrum information.
[0058] Taking into account that the sound frequency range that the human ear can perceive is usually between 20Hz and 20kHz, this embodiment can determine the target sound amplitude with the largest amplitude in the specified frequency band and its corresponding target vibration frequency based on the spectrum information. The above-mentioned specified frequency bands are, for example: 20Hz to 20kHz, or a bass band less than 320Hz, etc.; the bass band is often the main part of music, and the use of the target sound amplitude and target vibration frequency in this frequency band to control visual display effects such as lighting changes has greater practical significance. Of course, the determination of the target sound amplitude and target vibration frequency and the control of the visual display effect can also be done for any other frequency band, and there is no limitation here.
[0059] It is understood that sound amplitude is a key factor in determining how loud a sound is perceived by a user. The larger the sound amplitude, the louder the perceived sound. In this case, this embodiment determines the maximum sound amplitude as the target sound amplitude based on the spectrum information. The audio corresponding to the target sound amplitude is the loudest, most intuitive, and most noticeable sound to the user. Simultaneously, the vibration frequency corresponding to the target sound amplitude in the spectrum information is determined as the target vibration frequency.
[0060] S106. Calculate the target vibration frequency and multiple historical vibration frequencies according to a speed conversion algorithm to obtain a light color change speed.
[0061] The historical vibration frequency is the vibration frequency corresponding to the maximum sound amplitude of multiple consecutive historical audio data segments before the current audio data. In one example, the N (e.g., N=10) consecutive audio data segments before the current audio data can be determined as the historical audio data, that is, the multiple historical audio data and the current audio data are multiple consecutive audio data segments arranged in an orderly manner in the original audio data; based on the spectrum information converted from the historical audio data, the vibration frequency corresponding to the maximum sound amplitude in the historical audio data is determined, and this vibration frequency is the historical vibration frequency.
[0062] The method for calculating the target vibration frequency and multiple historical vibration frequencies according to the speed conversion algorithm in this embodiment can be referred to as follows: calculating the speed conversion parameters based on the target vibration frequency and multiple historical vibration frequencies; calculating the speed conversion parameters according to the speed conversion algorithm to obtain the speed of light color change.
[0063] In a specific implementation, the frequency average between the target vibration frequency and multiple historical vibration frequencies is first calculated, and then the conversion index is calculated based on the frequency average, the target vibration frequency and the preset first adjustment parameter according to the following formula (1):
[0064]
[0065] Among them, index is the conversion index, is the frequency average, f is the target vibration frequency, and x is the first adjustment parameter.
[0066] Referring to the following formula (2), the conversion index is mapped to the speed conversion parameter β according to the preset second adjustment parameter a and the third adjustment parameter b:
[0067] β=a*(index-b) (2)
[0068] Next, refer to the speed conversion algorithm shown in the following formula (3) to convert the speed conversion parameter β into the light color change speed speed:
[0069]
[0070] Since the vibration frequency of sound determines the pitch, and the pitch reflects the rhythm changes of the audio, the target vibration frequency and its previous multiple historical vibration frequencies are converted into the speed of light color change through the above embodiment, so that the speed of light color change can be well adapted to the changes in audio rhythm.
[0071] S108: Map the target sound amplitude to a target scaling ratio of the audio ripple.
[0072] In one embodiment, the target sound amplitude can be mapped to the target scaling ratio of the audio ripple according to the preset original size of the original ripple animation. For example, the original size can include the length and width of the original ripple animation. Referring to the following formula (4), the target sound amplitude is mapped to the target scaling ratio of the audio ripple:
[0073]
[0074] Where ratio is the target scaling ratio, max Phase Value is the target sound amplitude, L and W are the length and width of the original ripple animation, respectively. For example, L can be 255 and W can be 0.5.
[0075] S110: Control the display effect of the visual display device based on the transformation speed and the target zoom ratio. The visual display device can be any device such as an atmosphere light, a display screen, etc. that can achieve sound and light linkage and produce visual display effects.
[0076] The specific implementation of this embodiment refers to the following content.
[0077] The size of the original ripple animation of the visual display device is controlled according to the target scaling ratio to obtain the target ripple animation.
[0078] In this embodiment, the size of the original ripple animation of the visual display device can be scaled according to the target scaling ratio, and the ripple interpolation points can be determined in the scaled ripple animation; the interpolation points are rendered into the scaled ripple animation to obtain the target ripple animation.
[0079] Specifically, SpringAnimation (elastic animation tool) can be used to scale the original ripple animation according to the target scaling ratio, and then interpolate in the scaled ripple animation, and render the inserted ripple interpolation points in real time to the scaled ripple animation. The target ripple animation thus obtained can achieve the vibration effect of the ripple getting bigger and smaller, and through interpolation, the ripple quality can be avoided from deteriorating, thereby maintaining a higher quality ripple animation.
[0080] Determines the color sequence of the light of a visual display device from its current color to the target color to be converted.
[0081] In one implementation, a target color to be converted to can be selected from adjacent colors of the current color of the visual display device's light based on a preset color set. The color set includes multiple colors with equal step sizes within a preset hue range. Within the color set, each color typically has two adjacent colors separated by the same step size. In this embodiment, a color adjacent to the current color in the color set can be used as a subsequent color. A target color can be selected from the candidate colors using a semi-random algorithm or other method. This target color serves as the gradient target for the current color to be converted.
[0082] Color gradient interpolation points are inserted between the color value of the current color and the color value of the target color to obtain a color sequence. For example, multiple color values can be selected at equal intervals as color gradient interpolation points based on the difference between the color value of the current color and the color value of the target color; and the current color, the multiple color gradient interpolation points, and the target color are combined to form a gradient color sequence.
[0083] Then, the color sequence is rendered to the target ripple animation. In this embodiment, the color gradient interpolation point can be inserted between the current color and the target color by a breathing interpolator, and the gradient color sequence can be rendered to the target ripple animation in real time.
[0084] Finally, the target ripple animation is controlled to display a gradient color sequence according to the transformation speed.
[0085] In summary, the audio-visual conversion method provided by the embodiment of the present disclosure first determines the target sound amplitude and its corresponding target vibration frequency from the spectrum information of the audio data, and then calculates the change speed of the light color based on the target vibration frequency and multiple historical vibration frequencies, and maps the target sound amplitude to the target scaling ratio of the audio ripple; since the target sound amplitude, as the maximum amplitude, is the sound feature that the user can intuitively and obviously experience auditorily, the target sound amplitude is mapped to the target scaling ratio of the audio ripple, so that the size of the audio sound in the auditory sense can be expressed by the size of the audio ripple in the visual sense; and accordingly, the target vibration frequency corresponding to the target sound amplitude is used as the main frequency, and the light color change speed is calculated in combination with the historical vibration frequency, so that the change speed of the light color in the visual sense is more consistent with the change of the audio rhythm in the auditory sense. In this case, controlling the display effect of the visual display device based on the transformation speed and the target zoom ratio can enhance the matching degree between the size of the audio ripple and the sound amplitude visually and auditorily, and enhance the matching degree between the changing speed of the light color and the vibration frequency rhythmically, thereby improving the matching degree between the display effect of the visual display device and the audio, and enhancing the user's audio-visual experience in use and increasing the sense of immersion.
[0086] Corresponding to the audio-visual conversion method provided by the embodiment of the present disclosure, the embodiment of the present disclosure also provides an audio-visual conversion device. Figure 3 The structure diagram of the audio-visual conversion device provided by the embodiment of the present disclosure is as follows: Figure 3 As shown, the audio-visual conversion device includes:
[0087] The spectrum acquisition module 210 is used to acquire spectrum information converted from the current audio data; wherein the spectrum information is used to represent the corresponding relationship between vibration frequency and sound amplitude;
[0088] A sound determination module 220 is configured to determine a target sound amplitude with a maximum amplitude and a target vibration frequency corresponding to the target sound amplitude based on the frequency spectrum information;
[0089] The speed calculation module 230 is configured to calculate the target vibration frequency and multiple historical vibration frequencies according to a speed conversion algorithm to obtain a speed of light color change; wherein the historical vibration frequency is the vibration frequency corresponding to the maximum sound amplitude of multiple consecutive historical audio data segments before the current audio data;
[0090] A ratio calculation module 240 is configured to map the target sound amplitude to a target scaling ratio of the audio ripple;
[0091] The effect control module 250 is used to control the display effect of the visual display device based on the transformation speed and the target scaling ratio.
[0092] In one embodiment, the speed calculation module 230 is further configured to:
[0093] calculating a speed conversion parameter based on the target vibration frequency and a plurality of historical vibration frequencies;
[0094] The speed conversion parameters are calculated according to the speed conversion algorithm to obtain the speed of light color change.
[0095] In one embodiment, the speed conversion algorithm includes:
[0096]
[0097] Wherein, β represents the speed conversion parameter, and speed represents the speed of changing the light color.
[0098] In one embodiment, the ratio calculation module 240 is further configured to:
[0099] According to the preset original size of the original ripple animation, the target sound amplitude is mapped to the target scaling ratio of the audio ripple.
[0100] In one embodiment, the effect control module 250 is further configured to:
[0101] Controlling the size of the original ripple animation of the visual display device according to the target scaling ratio to obtain the target ripple animation;
[0102] Determining a color sequence of the light of the visual display device from a current color to a target color to be converted;
[0103] Rendering the color sequence to the target ripple animation;
[0104] The target ripple animation is controlled to display the gradient color sequence according to the transformation speed.
[0105] In one embodiment, the effect control module 250 is further configured to:
[0106] scaling the size of the original ripple animation of the visual display device according to the target scaling ratio, and determining the ripple interpolation point in the scaled ripple animation;
[0107] The interpolation points are rendered into the scaled ripple animation to obtain a target ripple animation.
[0108] In one embodiment, the effect control module 250 is further configured to:
[0109] Based on a preset color set, selecting a target color to be converted from adjacent colors of the current color of the light of the visual display device; wherein the color set includes: a plurality of colors with equal step sizes within a preset hue interval;
[0110] Color gradient interpolation points are inserted between the color value of the current color and the color value of the target color to obtain a color sequence.
[0111] The audio-visual conversion device disclosed in the above embodiments can execute the audio-visual conversion method disclosed in the above embodiments, and has the same or corresponding beneficial effects. To avoid repetition, it will not be described here.
[0112] The embodiments of the present disclosure further provide a computer-readable storage medium, which stores a program or instruction, and the program or instruction enables a computer to execute the steps of any of the above methods.
[0113] Acquiring spectrum information converted from current audio data; wherein the spectrum information is used to represent the corresponding relationship between vibration frequency and sound amplitude;
[0114] determining a target sound amplitude with a maximum amplitude and a target vibration frequency corresponding to the target sound amplitude based on the frequency spectrum information;
[0115] The target vibration frequency and multiple historical vibration frequencies are calculated according to a speed conversion algorithm to obtain a speed at which the light color changes; wherein the historical vibration frequency is the vibration frequency corresponding to the maximum sound amplitude of multiple consecutive historical audio data segments before the current audio data;
[0116] Mapping the target sound amplitude to a target scaling ratio of the audio ripple;
[0117] The display effect of the visual display device is controlled based on the transformation speed and the target scaling ratio.
[0118] Optionally, when executed by a computer processor, the computer executable instructions can also be used to execute the technical solutions of any of the above-mentioned audio-visual conversion methods provided in the embodiments of the present disclosure to achieve corresponding beneficial effects.
[0119] Through the above description of the implementation methods, those skilled in the art can clearly understand that the embodiments of the present disclosure can be implemented with the help of software and necessary general-purpose hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the embodiments of the present disclosure is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present disclosure.
[0120] An embodiment of the present disclosure also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs or instructions; the processor calls the programs or instructions stored in the memory to execute the steps of any of the above methods to achieve corresponding beneficial effects.
[0121] Figure 4 Schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present disclosure. Figure 4 As shown, the electronic device includes one or more processors 301 and a memory 302 .
[0122] The processor 301 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0123] The memory 302 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 301 may run the program instructions to implement the audio-visual conversion method of the embodiment of the present disclosure described above, and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.
[0124] In one example, the electronic device may further include: an input device 303 and an output device 304 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0125] In addition, the input device 303 may also include, for example, a keyboard, a mouse, and the like.
[0126] The output device 304 can output various information to the outside, including determined distance information, direction information, etc. The output device 304 can include, for example, a display, a speaker, a printer, a communication network and its connected remote output device, etc.
[0127] Of course, to simplify, Figure 4 Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device may further include any other appropriate components according to specific application scenarios.
[0128] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0129] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.
Claims
1. An audio-visual conversion method, characterized in that: include: Acquiring spectrum information converted from current audio data; wherein the spectrum information is used to represent the corresponding relationship between vibration frequency and sound amplitude; determining a target sound amplitude with a maximum amplitude and a target vibration frequency corresponding to the target sound amplitude based on the frequency spectrum information; The target vibration frequency and multiple historical vibration frequencies are calculated according to a speed conversion algorithm to obtain a speed at which the light color changes; wherein the historical vibration frequency is the vibration frequency corresponding to the maximum sound amplitude of multiple consecutive historical audio data segments before the current audio data; Mapping the target sound amplitude to a target scaling ratio of the audio ripple; The display effect of the visual display device is controlled based on the transformation speed and the target scaling ratio.
2. The method according to claim 1, characterized in that The target vibration frequency and multiple historical vibration frequencies are calculated according to the speed conversion algorithm to obtain the light color change speed, including: calculating a speed conversion parameter based on the target vibration frequency and a plurality of historical vibration frequencies; The speed conversion parameters are calculated according to the speed conversion algorithm to obtain the speed of light color change.
3. The method according to claim 2, characterized in that The speed conversion algorithm includes: Wherein, β represents the speed conversion parameter, and speed represents the speed of changing the light color.
4. The method according to claim 1, wherein Mapping the target sound amplitude to a target scaling ratio of the audio ripple includes: According to the preset original size of the original ripple animation, the target sound amplitude is mapped to the target scaling ratio of the audio ripple.
5. The method according to claim 1, wherein The controlling of the display effect of the visual display device based on the transformation speed and the target scaling ratio includes: Controlling the size of the original ripple animation of the visual display device according to the target scaling ratio to obtain the target ripple animation; Determining a color sequence of the light of the visual display device from a current color to a target color to be converted; Rendering the color sequence to the target ripple animation; The target ripple animation is controlled to display the gradient color sequence according to the transformation speed.
6. The method according to claim 5, characterized in that The step of controlling the size of the original ripple animation of the visual display device according to the target scaling ratio to obtain the target ripple animation includes: scaling the size of the original ripple animation of the visual display device according to the target scaling ratio, and determining the ripple interpolation point in the scaled ripple animation; The interpolation points are rendered into the scaled ripple animation to obtain a target ripple animation.
7. The method according to claim 5, characterized in that Determining a color sequence between a current color and a target color to be converted from the light of the visual display device comprises: Based on a preset color set, selecting a target color to be converted from adjacent colors of the current color of the light of the visual display device; wherein the color set includes: a plurality of colors with equal step sizes within a preset hue interval; Color gradient interpolation points are inserted between the color value of the current color and the color value of the target color to obtain a color sequence.
8. An audio-visual conversion device, characterized in that: include: A spectrum acquisition module, configured to acquire spectrum information converted from current audio data; wherein the spectrum information is used to represent the corresponding relationship between vibration frequency and sound amplitude; a sound determination module, configured to determine a target sound amplitude with a maximum amplitude and a target vibration frequency corresponding to the target sound amplitude based on the frequency spectrum information; a speed calculation module, configured to calculate the target vibration frequency and a plurality of historical vibration frequencies according to a speed conversion algorithm to obtain a speed at which the light color changes; wherein the historical vibration frequency is the vibration frequency corresponding to the maximum sound amplitude of a plurality of consecutive historical audio data segments preceding the current audio data; A ratio calculation module, configured to map the target sound amplitude to a target scaling ratio of the audio ripple; The effect control module is used to control the display effect of the visual display device based on the transformation speed and the target scaling ratio.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the steps of the method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs or instructions; The processor is configured to execute the steps of the method according to any one of claims 1 to 7 by calling the program or instructions stored in the memory.
Citation Information
Patent Citations
Software for expressing music with images
CN104574453A
Lamplight flickering control method, reminding method, reminding system and lighting equipment
CN109287053A
Light display control method and device
CN111836437A
Unmanned aerial vehicle formation music synchronization light control method, control system and unmanned aerial vehicle
CN111988891A
Method for controlling scene through audio, equipment and computer readable storage medium
CN113573442A