A lighting control method, device, equipment and storage medium
By calculating the amplitude-frequency diagram of audio files and finding matching RGB three primary colors, the limitations of music and lighting matching methods in the existing technology are solved, and flexible matching and rich lighting color matching effects for a variety of music and a large number of music fragments are achieved. .
Patent Information
- Application Number
- CN202110994922.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-27
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2041-08-27
AI Technical Summary
The existing music and lighting color matching methods are limited by manual arrangement accuracy and limited lighting color types, and cannot effectively match the situation where there are diverse music types and large number of music clips.
By reading the sampling data from the currently played audio file, calculating the amplitude-frequency diagram, determining the frequency and amplitude of the maximum amplitude component, and searching for the matching RGB three primary colors in the pre-established scale-RGB mapping table, and finally through the PWM pulse Wide modulation drives RGB-LED mixed light color matching.
It realizes lighting control that is not limited by the type of music and the number of music clips, enriches the color matching changes of the same note at different loudness, and improves the matching accuracy of music and lighting and the naturalness of color transition.
Smart Images

Figure CN113630928B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of lighting control, and in particular to a lighting control method, device, equipment and storage medium. Background Art
[0002] The "audio-visual" synesthesia effect of music and light colors is widely used in light shows, music players, car atmosphere lights, psychotherapy and other fields to enhance the emotional appeal of music.
[0003] At present, there are generally two methods for matching music and light colors: manual preset arrangement and real-time matching based on music feature recognition. The former relies on manual arrangement of the lights corresponding to the preset music in advance, which is time-consuming and labor-intensive, and the matching accuracy is limited by the number of preset music; the latter relies on software to collect audio signals in real time, identify the characteristics of audio signals (such as spectrum, volume, sound length, rhythm, etc.), and control the output light color through a matching algorithm. This method is limited by the limited types of light colors and abrupt color transitions. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a lighting control method, device, equipment and storage medium, which can enrich the color matching changes of the same note with different loudness without being limited by the type of music and the number of music clips. The specific scheme is as follows:
[0005] A lighting control method, comprising:
[0006] From the currently playing audio file, read the corresponding sampling data within a fixed period not higher than the note value;
[0007] Calculating an amplitude-frequency diagram according to the sampled data, and determining the frequency and amplitude of the maximum amplitude-frequency component;
[0008] In a pre-defined scale-RGB mapping table, searching for matching RGB three primary colors according to the frequency and amplitude of the maximum amplitude-frequency component;
[0009] According to the obtained RGB three primary colors, RGB-LED mixed light color matching is driven by PWM pulse width modulation.
[0010] Preferably, in the above-mentioned lighting control method provided by the embodiment of the present invention, the calculating of the amplitude-frequency diagram according to the sampled data includes:
[0011] The sampled data is subjected to a fast Fourier transform to obtain an amplitude-frequency diagram with the audio signal frequency as the abscissa and the amplitude as the ordinate.
[0012] Preferably, in the above-mentioned lighting control method provided by the embodiment of the present invention, the step of searching for matching RGB three primary colors according to the frequency and amplitude of the maximum amplitude frequency component includes:
[0013] Obtaining the RGB three primary colors of initial color matching according to the frequency of the maximum amplitude frequency component;
[0014] The initially matched RGB three primary colors are corrected according to the amplitude of the maximum amplitude frequency component to obtain the final matched RGB three primary colors.
[0015] Preferably, in the lighting control method provided in the embodiment of the present invention, the RGB three primary colors of the initial color matching are corrected according to the amplitude of the maximum amplitude frequency component, including:
[0016] The RGB three primary colors of the initial color matching are corrected by linear interpolation according to the amplitude of the maximum amplitude frequency component.
[0017] Preferably, in the above-mentioned lighting control method provided by the embodiment of the present invention, the musical scale-RGB mapping table is formulated according to the standard musical scale frequency and the RGB color matching diagram.
[0018] Preferably, in the above-mentioned lighting control method provided by the embodiment of the present invention, the scale-RGB mapping table includes: a scale-RGB mapping table in the X-axis direction and the Y-axis direction;
[0019] The musical scale-RGB mapping table in the X-axis direction is obtained by linearly mapping multiple standard musical scale frequencies as the X-axis to the X-axis direction of the RGB color matching diagram;
[0020] The scale-RGB mapping table in the Y-axis direction is obtained by linearly mapping the amplitude interval [0, 1] as the Y-axis to the Y-axis direction or color axis of the RGB color matching diagram.
[0021] Preferably, in the above-mentioned lighting control method provided by the embodiment of the present invention, the method of driving RGB-LED mixed light color matching through PWM pulse width modulation according to the obtained RGB three primary colors includes:
[0022] Linearly map the obtained value range [0,255] of the RGB three primary colors to the PWM duty cycle range [0,100];
[0023] The RGB-LED mixed light color matching is driven respectively according to the obtained PWM duty ratio corresponding to the three primary colors of RGB.
[0024] The embodiment of the present invention further provides a lighting control device, comprising:
[0025] The sampling data reading module is used to read the sampling data corresponding to a fixed period not higher than the note value from the currently playing audio file;
[0026] A frequency amplitude determination module, used to calculate an amplitude-frequency diagram according to the sampled data, and determine the frequency and amplitude of the maximum amplitude-frequency component;
[0027] A three-primary color search module is used to search for matching RGB three-primary colors in a pre-defined scale-RGB mapping table according to the frequency and amplitude of the maximum amplitude-frequency component;
[0028] The mixed light color matching driving module is used to drive the RGB-LED mixed light color matching through PWM pulse width modulation according to the obtained RGB three primary colors.
[0029] An embodiment of the present invention further provides a lighting control device, comprising a processor and a memory, wherein the processor implements the above lighting control method provided by the embodiment of the present invention when executing a computer program stored in the memory.
[0030] An embodiment of the present invention further provides a computer-readable storage medium for storing a computer program, wherein when the computer program is executed by a processor, the lighting control method provided by the embodiment of the present invention is implemented.
[0031] It can be seen from the above technical scheme that a lighting control method provided by the present invention includes: reading corresponding sampling data within a fixed period not higher than the note value from the currently played audio file; calculating the amplitude-frequency diagram according to the sampling data, and determining the frequency and amplitude of the maximum amplitude-frequency component; in a pre-defined scale-RGB mapping table, searching for matching RGB primary colors according to the frequency and amplitude of the maximum amplitude-frequency component; and according to the obtained RGB primary colors, driving the RGB-LED mixed light color matching through PWM pulse width modulation.
[0032] The present invention starts from the note duration of the music, reads the audio file at a fixed period not higher than the note duration, identifies the specific scale of the current audio clip being played, and facilitates the determination of the algorithm's scheduling period; in addition, there is no need to obtain multiple music clips in advance, and is not restricted by the type of music and the number of music clips; at the same time, the scale-RGB mapping table matches the RGB three primary colors by comprehensively using the frequency and amplitude information of the maximum amplitude-frequency component, thereby enriching the color matching changes under different loudness conditions of the same note.
[0033] In addition, the present invention also provides corresponding devices, equipment and computer-readable storage media for the lighting control method, which further makes the above method more practical. The device, equipment and computer-readable storage medium have corresponding advantages. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0035] Figure 1 A flowchart of a lighting control method provided by an embodiment of the present invention;
[0036] Figure 2 The RGB color matching diagram provided by the embodiment of the present invention;
[0037] Figure 3 A schematic diagram of the structure of a lighting control device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the 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.
[0039] The present invention provides a lighting control method, such as Figure 1 As shown, the following steps are included:
[0040] S101, reading the sampling data corresponding to a fixed period not longer than the note value from the currently playing audio file;
[0041] It should be noted that notes generally include whole notes, half notes, quarter notes, eighth notes, sixteenth notes, etc. In the present invention, when a quarter note is a beat, taking a sixteenth note as an example, its duration is a quarter beat, and when the prescribed speed of the music is 120 beats per minute, the duration of the sixteenth note corresponding to the note is 1 / 8 second, and the fixed period not exceeding the duration of the note should be no greater than 1 / 8 second; similarly, if the music contains thirty-second notes, and the beat and speed remain unchanged, the fixed period should be no greater than 1 / 16 second; from the perspective of the versatility of the method, for most music, the duration of each note is generally not less than 1 / 32 second, so the fixed period is no greater than 1 / 32 second, for example, 1 / 32 second, 1 / 40 second, etc. The smaller the fixed period, the higher the real-time requirements for the method.
[0042] The above-mentioned sampling data corresponding to the audio file read within a fixed period specifically refers to: the commonly used sampling rates in the digital audio field are 44100S / s (CD / MP3, etc.), 22050S / s (FM radio), and 11025S / s (AM radio); taking MP3 music as an example, the sampling rate is 44100S / s. When the fixed period is 1 / 32 seconds, the corresponding number of sampling data is 44100*1 / 32=1378.
[0043] S102, calculating an amplitude-frequency diagram according to the sampled data, and determining the frequency and amplitude of the maximum amplitude-frequency component;
[0044] S103, in a pre-defined scale-RGB mapping table, searching for matching RGB three primary colors according to the frequency and amplitude of the maximum amplitude frequency component;
[0045] S104, according to the obtained RGB three primary colors, drive the RGB-LED mixed light color matching through PWM (Pulse Width Modulation).
[0046] It should be noted that RGB-LED is a light source composed of three light-emitting diodes, red, green and blue, which are matched in appropriate proportions to obtain a specific required color.
[0047] In the lighting control method provided by the embodiment of the present invention, starting from the note value of the music, the audio file is read at a fixed period not higher than the note value, and the specific scale of the current audio clip being played is identified, so as to facilitate the determination of the scheduling period of the algorithm; in addition, there is no need to obtain multiple music clips in advance, and it is not limited by the type of music and the number of music clips; at the same time, the scale-RGB mapping table matches the RGB three primary colors by comprehensively using the frequency and amplitude of the maximum amplitude-frequency component, thereby enriching the color matching changes under different loudness conditions of the same note.
[0048] In specific implementation, in the above-mentioned lighting control method provided by the embodiment of the present invention, step S102 of calculating the amplitude-frequency diagram according to the sampled data may include: performing a fast Fourier transform (FFT) on the sampled data to obtain an amplitude-frequency diagram with the audio signal frequency as the horizontal coordinate and the amplitude as the vertical coordinate. Then, the frequency and amplitude value of the maximum amplitude-frequency component (the point with the largest amplitude) can be retrieved from the amplitude-frequency diagram.
[0049] In specific implementation, in the above-mentioned lighting control method provided by the embodiment of the present invention, step S103 searches for matching RGB three primary colors according to the frequency and amplitude of the maximum amplitude frequency component, which may include: obtaining the initial color matching RGB three primary colors according to the frequency of the maximum amplitude frequency component; correcting the initial color matching RGB three primary colors according to the amplitude of the maximum amplitude frequency component to obtain the final matching RGB three primary colors. In this way, the initial color matching of the current note is determined according to the frequency, and the brightness of the initial color matching is corrected according to the amplitude, which enriches the color matching changes of the same note with different loudness.
[0050] Preferably, the RGB three primary colors of the initial color matching can be corrected by linear interpolation according to the amplitude of the maximum amplitude frequency component.
[0051] In the specific implementation, in the above-mentioned lighting control method provided by the embodiment of the present invention, the scale-RGB mapping table is formulated according to the standard scale frequency and the RGB color matching diagram. Figure 2 The RGB color diagram shown is used to formulate a scale-RGB mapping table in a set implementation method.
[0052] Table 1 Correspondence between standard scale and frequency
[0053]
[0054] The present invention determines the RGB three primary colors according to the standard musical scale, does not need to obtain multiple music clips in advance, is not limited by the type of music and the number of music clips, and has a wide variable range of RGB color matching, and can achieve infinite mixed light color matching through means such as linear interpolation.
[0055] Furthermore, in the above-mentioned lighting control method provided by an embodiment of the present invention, the scale-RGB mapping table may include: a scale-RGB mapping table in the X-axis direction and a Y-axis direction; the scale-RGB mapping table in the X-axis direction is obtained by linearly mapping a plurality of standard scale frequencies as the X-axis to the X-axis direction of the RGB color matching diagram; the scale-RGB mapping table in the Y-axis direction is obtained by linearly mapping the amplitude interval [0,1] as the Y-axis to the Y-axis direction or the color axis of the RGB color matching diagram.
[0056] That is to say, there are two specific implementation methods for formulating the scale-RGB mapping table:
[0057] The first specific implementation method is: take the 120 standard scales in Table 1 as the X-axis and linearly map to Figure 2 The X-axis direction of the RGB color matching diagram is 1, and the scale-RGB mapping table in the X-axis direction is obtained, that is, the row corresponding to the amplitude value 1.0 in Table 2 below; with the amplitude interval [0,1] as the Y-axis, linearly mapped to Figure 2In the Y-axis direction of the RGB color matching diagram 2, the scale-RGB mapping table in the Y-axis direction is obtained; finally, the scale-RGB mapping tables in the X-axis and Y-axis directions are integrated into a mapping table as shown in Table 2 below; then, according to the frequency and amplitude of the maximum amplitude-frequency component determined in step S102, the matching RGB three primary colors are obtained by approximate retrieval (multi-level dimming) or linear interpolation (stepless dimming) in the mapping table.
[0058] Table 2 An embodiment of the scale-RGB mapping table
[0059]
[0060] The second specific implementation method is: take the 120 standard scales in Table 1 as the X-axis and linearly map to Figure 2 The X-axis direction of the RGB color matching diagram is 1, and the scale-RGB mapping table in the X-axis direction is obtained, that is, the row corresponding to the amplitude value 0.5 in Table 3 below; with the amplitude interval [0,1] as the Y-axis, linearly mapped to Figure 2 The color axis 3 of the RGB color matching diagram is obtained, and the scale-RGB mapping table in the Y-axis direction is obtained; finally, the scale-RGB mapping tables in the X-axis and Y-axis directions are integrated into a mapping table as shown in Table 3 below; then, according to the frequency and amplitude of the maximum amplitude-frequency component determined in step S102, the matching RGB three primary colors are obtained by approximate retrieval (multi-level dimming) or linear interpolation (stepless dimming) in the mapping table.
[0061] Table 3 Another embodiment of the scale-RGB mapping table
[0062]
[0063]
[0064] Further, step S103 uses the 120 standard scales in Table 1 as the X-axis and linearly maps to Figure 2 In the X-axis direction 1 of the RGB color matching diagram, the standard scale C0 (16.352Hz) is mapped to the RGB three primary colors (1, 1, 255) corresponding to blue, and the standard scale B9 (15804Hz) is mapped to the RGB three primary colors (255, 1, 255) corresponding to purple. The remaining standard scales between C0 and B9 are evenly distributed between blue and purple. This is also an embodiment of the present invention. In practical applications, the linear mapping relationship established by the standard scale and different color ranges should also fall within the scope of the present invention.
[0065] Furthermore, step S103 uses the amplitude interval [0,1] as the Y axis and linearly maps to Figure 2In the RGB color matching diagram, the Y-axis direction 2 or the color axis 3 is used to obtain the scale-RGB mapping table in the Y-axis direction. In Table 2 and Table 3, the amplitude interval is [0,1] and the amplitude step is 0.1. This is an embodiment of the present invention. The "scale-RGB mapping table" determined by other amplitude intervals and step sizes belongs to the scope of the present invention. At the same time, when the amplitude value in Table 2 is 1, it is mapped to Figure 2 The top color of the RGB color matching diagram (the color specified when Y=0) is mapped to gray when the amplitude value is 0, mapped to white when the amplitude value is 1 in Table 3, and mapped to black when the amplitude value is 0. This is also an embodiment of the present patent. The linear mapping relationship established by the amplitude value and different color ranges should also fall within the scope of the present invention.
[0066] In the specific implementation, in the above-mentioned lighting control method provided by the embodiment of the present invention, step S104 drives the RGB-LED mixed light color matching through PWM pulse width modulation according to the obtained RGB three primary colors, which may include: first, linearly mapping the value range [0,255] of the obtained RGB three primary colors to the PWM duty cycle range [0,100]; then, driving the RGB-LED mixed light color matching respectively according to the PWM duty cycle corresponding to the obtained RGB three primary colors. The number, position and setting of the PWM drive circuit of the RGB-LED can be determined according to the actual situation and are not limited here.
[0067] Based on the same inventive concept, an embodiment of the present invention further provides a lighting control device. Since the principle of solving the problem by the device is similar to that of the aforementioned lighting control method, the implementation of the device can refer to the implementation of the lighting control method, and the repeated parts will not be repeated.
[0068] In specific implementation, the lighting control device provided by the embodiment of the present invention is as follows: Figure 3 As shown, specifically including:
[0069] The sampling data reading module 11 is used to read the sampling data corresponding to a fixed period not longer than the note value from the currently played audio file;
[0070] A frequency amplitude determination module 12 is used to calculate an amplitude-frequency diagram according to the sampled data and determine the frequency and amplitude of the maximum amplitude-frequency component;
[0071] The three-primary color search module 13 is used to search for matching RGB three-primary colors according to the frequency and amplitude of the maximum amplitude frequency component in a pre-defined scale-RGB mapping table;
[0072] The light mixing and color matching driving module 14 is used to drive the RGB-LED light mixing and color matching through PWM pulse width modulation according to the obtained RGB three primary colors.
[0073] In the lighting control device provided in the embodiment of the present invention, the scheduling period of the algorithm can be conveniently determined based on the duration of the musical notes through the interaction of the above four modules; there is no need to obtain multiple music clips in advance, and it is not limited by the types of music and the number of music clips; at the same time, the color changes of the same note at different loudness conditions are enriched.
[0074] For more specific working processes of the above modules, please refer to the corresponding contents disclosed in the above embodiments, which will not be repeated here.
[0075] Correspondingly, an embodiment of the present invention further discloses a lighting control device, including a processor and a memory; wherein the lighting control method disclosed in the above embodiment is implemented when the processor executes a computer program stored in the memory.
[0076] For more specific processes of the above method, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0077] Furthermore, the present invention also discloses a computer-readable storage medium for storing a computer program; when the computer program is executed by a processor, the aforementioned lighting control method is implemented.
[0078] For more specific processes of the above method, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0079] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the devices, equipment, and storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part.
[0080] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0081] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0082] In summary, a lighting control method provided by an embodiment of the present invention includes: reading the corresponding sampling data within a fixed period not higher than the note value from the currently played audio file; calculating the amplitude-frequency diagram according to the sampling data, and determining the frequency and amplitude of the maximum amplitude-frequency component; searching for the matching RGB three primary colors according to the frequency and amplitude of the maximum amplitude-frequency component in the pre-established scale-RGB mapping table; and driving the RGB-LED mixed light color matching through PWM pulse width modulation according to the obtained RGB three primary colors. Starting from the note value of the music, the present invention reads the audio file at a fixed period not higher than the note value, identifies the specific scale of the current audio clip playing, and facilitates the determination of the scheduling cycle of the algorithm; in addition, there is no need to obtain multiple music clips in advance, and is not limited by the type of music and the number of music clips; at the same time, the scale-RGB mapping table matches the RGB three primary colors by comprehensively using the frequency and amplitude of the maximum amplitude-frequency component, enriching the color matching changes under different loudness conditions of the same note. In addition, the present invention also provides a corresponding device, equipment and computer-readable storage medium for the lighting control method, which further makes the above method more practical, and the device, equipment and computer-readable storage medium have corresponding advantages.
[0083] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0084] The lighting control method, device, equipment and storage medium provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A lighting control method, characterized in that: include: From the currently playing audio file, read the corresponding sampling data within a fixed period not higher than the note value; Calculating an amplitude-frequency diagram according to the sampled data, and determining the frequency and amplitude of the maximum amplitude-frequency component; In a pre-defined scale-RGB mapping table, obtaining the RGB three primary colors of the initial color matching according to the frequency of the maximum amplitude-frequency component; Correcting the RGB three primary colors of the initial color matching by linear interpolation according to the amplitude of the maximum amplitude frequency component to obtain the final matching RGB three primary colors; According to the final matching RGB three primary colors, PWM pulse width modulation is used to drive the RGB-LED mixed light color matching.
2. The lighting control method according to claim 1, characterized in that: The calculating the amplitude-frequency diagram according to the sampling data comprises: The sampled data is subjected to a fast Fourier transform to obtain an amplitude-frequency diagram with the audio signal frequency as the abscissa and the amplitude as the ordinate.
3. The lighting control method according to claim 2, characterized in that: The musical scale-RGB mapping table is formulated based on the standard musical scale frequency and the RGB color matching diagram.
4. The lighting control method according to claim 3, characterized in that: The scale-RGB mapping table includes: a scale-RGB mapping table in the X-axis direction and a Y-axis direction; The musical scale-RGB mapping table in the X-axis direction is obtained by linearly mapping multiple standard musical scale frequencies as the X-axis to the X-axis direction of the RGB color matching diagram; The scale-RGB mapping table in the Y-axis direction is obtained by linearly mapping the amplitude interval [0, 1] as the Y-axis to the Y-axis direction or color axis of the RGB color matching diagram.
5. The lighting control method according to claim 4, characterized in that: The method of driving the RGB-LED mixed light color matching by PWM pulse width modulation according to the finally matched RGB three primary colors obtained includes: Linearly map the final matching RGB three-primary color value range [0,255] to the PWM duty cycle range [0,100]; The RGB-LED mixed light color matching is driven respectively according to the PWM duty ratio corresponding to the final matched RGB three primary colors.
6. A lighting control device, characterized in that: include: The sampling data reading module is used to read the sampling data corresponding to a fixed period not higher than the note value from the currently playing audio file; A frequency amplitude determination module, used to calculate an amplitude-frequency diagram according to the sampled data, and determine the frequency and amplitude of the maximum amplitude-frequency component; A three-primary color search module is used to obtain the RGB three primary colors of the initial color matching according to the frequency of the maximum amplitude frequency component in a pre-defined scale-RGB mapping table; and to correct the RGB three primary colors of the initial color matching by linear interpolation according to the amplitude of the maximum amplitude frequency component to obtain the final matching RGB three primary colors; The mixed light color matching driving module is used to drive the RGB-LED mixed light color matching through PWM pulse width modulation according to the final matching RGB three primary colors.
7. A lighting control device, characterized in that: The device comprises a processor and a memory, wherein the processor implements the lighting control method according to any one of claims 1 to 5 when executing the computer program stored in the memory.
8. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program, when executed by a processor, implements the lighting control method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Unmanned aerial vehicle formation music synchronization light control method, control system and unmanned aerial vehicle
CN111988891A