CN115802563A - Lamp effect control method and sound equipment - Google Patents

Lamp effect control method and sound equipment Download PDF

Info

Publication number
CN115802563A
CN115802563A CN202211492193.8A CN202211492193A CN115802563A CN 115802563 A CN115802563 A CN 115802563A CN 202211492193 A CN202211492193 A CN 202211492193A CN 115802563 A CN115802563 A CN 115802563A
Authority
CN
China
Prior art keywords
music
light effect
thread
energy
light
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211492193.8A
Other languages
Chinese (zh)
Inventor
陈世颖
杨晓峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Fenda Technology Co Ltd
Original Assignee
Shenzhen Fenda Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Fenda Technology Co Ltd filed Critical Shenzhen Fenda Technology Co Ltd
Priority to CN202211492193.8A priority Critical patent/CN115802563A/en
Publication of CN115802563A publication Critical patent/CN115802563A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

The invention provides a light effect control method and a sound box, wherein the light effect control method is applied to the sound box and comprises the following steps: s101: creating a light effect thread and a music following thread, and determining and executing a light effect mode according to the light effect operation instruction after receiving the light effect operation instruction; s102: and starting a timer, and circularly calculating the current music energy by using the music following thread, so that the light effect thread corresponding to the light effect mode starts the light effect according to the timer and the music energy. According to the invention, the current music energy is calculated through the music following thread, and the information of the music energy is transmitted to the light effect thread, so that the light effect thread controls the light effect according to the timer and the music energy, and therefore, when music is played, the light effect can be controlled to generate various changes according to sound, the interaction effect is good, and the use experience of a user is improved.

Description

Light effect control method and sound equipment
Technical Field
The invention relates to the technical field of sound equipment, in particular to a light effect control method and sound equipment.
Background
The Bluetooth sound box is characterized in that a built-in Bluetooth chip is used for connecting Bluetooth to replace sound equipment connected by traditional wires, and the Bluetooth sound box is connected with Bluetooth playing equipment such as a mobile phone tablet computer and a notebook computer to achieve the purpose of convenience and rapidness.
In order to strengthen bluetooth sound's practicality, more and more people select to use multi-functional bluetooth sound now to convenience more when using bluetooth sound, however, its function of bluetooth sound on the present market is all comparatively simple, only possesses music instant music, and when people were playing the music, the stereo set function singleness, interactive effect is poor, can not give the atmosphere of amusement well and bring, has reduced user's use and has experienced.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a light effect control method and a sound box, wherein a light effect thread and a music following thread are created, a timer is started after a light effect operation instruction is received, the current music energy is calculated through the music following thread, and the information of the music energy is transmitted to the light effect thread, so that the light effect thread controls the light effect according to the timer and the music energy, the light effect can be controlled to generate various changes according to sound when music is played, the interaction effect is good, and the use experience of a user is improved.
In order to solve the above problems, the present invention adopts a technical solution as follows: a light effect control method applied to a sound system includes: s101: creating a light effect thread and a music following thread, and determining and executing a light effect mode according to the light effect operation instruction after receiving the light effect operation instruction; s102: and starting a timer, and circularly calculating the current music energy by using the music following thread, so that the light effect thread corresponding to the light effect mode starts the light effect according to the timer and the music energy.
Further, the step of creating the light effect thread specifically includes: the method comprises the steps of initializing and creating a linked list, initializing structural bodies in the linked list and adding structural body variables, wherein different linked lists correspond to different light effect modes.
Further, the step of creating a music following thread specifically includes: and setting a channel for acquiring music energy and information of frequency points for acquiring the energy by the music following thread.
Further, the step of determining and executing the light effect mode according to the light effect operation instruction further comprises: judging whether a timer is already started; if yes, closing the opened timer and the opened light effect; if not, determining and executing the light effect mode according to the light effect operation instruction.
Further, the step of starting the timer specifically includes: and initializing and starting a timer corresponding to the light effect thread and a timer corresponding to the music following thread.
Further, the step of calculating the current music energy by using the music following thread loop specifically includes: after the timer corresponding to the music following thread is determined to be triggered, the music following thread acquires the energy value of each frequency point, the current music energy is calculated according to the energy value, the music energy is sent to the currently running light effect thread, and the timer corresponding to the music following thread is restarted.
Further, the step of acquiring the energy value of each frequency point by the music following thread, and calculating the current music energy according to the energy value specifically includes: the energy value of the played music at each frequency point is obtained, the total energy of the music and the change trend of the music tune are calculated according to the energy value, and the current music energy is obtained according to the total energy and the change trend of the music tune.
Further, the step of enabling the light effect thread corresponding to the light effect mode to start the light effect according to the timer and the music energy specifically includes: and determining the trigger of a timer corresponding to the light effect thread, operating a light effect mode corresponding to the light effect thread, and controlling the restarting time of the timer according to the music energy information transmitted by the music following thread.
Further, the step of controlling the restart time of the timer according to the music energy information transmitted by the music following thread specifically includes: judging whether the lamp effect changes along with the change in real time according to the music energy; if so, displaying a light effect based on the data of the music energy, and restarting a timer corresponding to the light effect thread; if not, restarting a timer corresponding to the light effect thread.
Based on the same inventive concept, the invention further provides a sound box, the sound box comprises a controller, an LED lamp driving module and an LED lamp for displaying the lamp effect, the LED lamp driving module is respectively connected with the controller and the LED lamp, and the sound box executes the lamp effect control method through the controller, the LED lamp driving module and the LED lamp.
Compared with the prior art, the invention has the beneficial effects that: the light effect thread and the music following thread are created, the timer is started after the light effect operation instruction is received, the current music energy is calculated through the music following thread, the information of the music energy is transmitted to the light effect thread, and therefore the light effect thread controls the light effect according to the timer and the music energy, and therefore when music is played, the light effect is controlled to generate various changes according to sound, the interaction effect is good, and the use experience of a user is improved.
Drawings
FIG. 1 is a flow chart of a lamp effect control method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating music energy calculation according to an embodiment of the light effect control method of the present invention;
FIG. 3 is a flowchart illustrating a lamp efficiency control method according to another embodiment of the present invention;
FIG. 4 is a block diagram of an embodiment of the sound of the present invention;
FIG. 5 is a logic control diagram of an embodiment of the sound of the present invention;
FIG. 6 is a block diagram of power control for an embodiment of the audio of the present invention;
FIG. 7 is a partial circuit diagram of an embodiment of a Bluetooth module in a speaker of the present invention;
FIG. 8 is a circuit diagram of another portion of the Bluetooth module of FIG. 7;
FIG. 9 is a partial circuit diagram of an embodiment of a power module for a sound box according to the present invention;
FIG. 10 is a circuit diagram of an embodiment of a power on/off circuit of a key module in a speaker according to the present invention;
FIG. 11 is a circuit diagram of a portion of a sound effect module in a sound box according to an embodiment of the present invention;
FIG. 12 is a circuit diagram of another portion of the sound effect module of FIG. 11;
fig. 13 is a circuit diagram of an embodiment of a power amplifier module in a sound box according to the present invention;
FIG. 14 is a circuit diagram of an embodiment of a microphone module in an audio system of the present invention;
FIG. 15 is a circuit diagram of an embodiment of an LED lamp in a speaker according to the present invention;
fig. 16 is a circuit diagram of an LED lamp driving module in a stereo set according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present application is provided by way of specific examples, and other advantages and effects of the present application will be readily apparent to those skilled in the art from the disclosure herein. The application is capable of other and different embodiments and its several details are capable of modifications and various changes in detail without departing from the spirit of the application. It should be noted that the various embodiments of the present disclosure, described and illustrated in the figures herein generally, may be combined with each other without conflict, and that the structural members or functional modules therein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the disclosure, provided in the accompanying drawings, is not intended to limit the scope of the disclosure, as claimed, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
The terminology used in the description of the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1-3, fig. 1 is a flow chart illustrating a lamp efficiency control method according to an embodiment of the present invention; FIG. 2 is a diagram illustrating music energy calculation according to an embodiment of the light effect control method of the present invention; fig. 3 is a flowchart of another embodiment of a lamp effect control method according to the present invention. The lamp efficiency control method of the present invention will be described in detail with reference to fig. 1 to 3.
In this embodiment, the light effect control method is applied to a sound provided with an LED lamp for light effect exhibition, including:
s101: creating a light effect thread and a music following thread, determining and executing a light effect mode according to the light effect operation instruction after receiving the light effect operation instruction, and executing S102.
In this embodiment, the step of creating the light effect thread specifically includes: the method comprises the steps of initializing and creating a linked list, initializing structural bodies in the linked list and adding structural body variables, wherein different linked lists correspond to different light effect modes.
The light effect thread uses the light service to manage the light, namely if the sound equipment needs to display the light effect, the light effect thread is uniformly handed to the light to be executed by proxy instead of directly operating the light. The reason for this is the following:
1. and the developer can write complex lighting effects conveniently. Lightd provides an abstract library of effects lighting effects that developers can easily combine and execute in sequence.
2. And (5) managing resources. Direct operation of the LED is simplest if there is only one lamp effect. If you have 2 light effects, an extra bit of code is needed to ensure the execution sequence of the light effects, and if more than 3 light effects exist, the resources occupied by the code need to be confirmed.
3. Threads are asynchronous and at any time, a problem arises if there are 2 programs to operate the lights at the same time. If light effects are animations that transition within a certain time, they must be manually interrupted when the second light effect is executed. Transitional animations are used, meaning that timers are used, and to manually interrupt them, handles of the timers must be saved, you can find that all the handles of the timers and the codes for canceling the timers are in the codes, and the real light effect codes only account for a small part. All of the above are managed by effects using the effects library provided by lightd. The developer does not worry about having 2 effects executing simultaneously, nor does it manage timers.
4. And (5) modularization. And the lightd saves each light effect file as a separate thread file, so that the code coupling degree is lower, the maintainability and the readability are higher, the problem of variable renaming is not needed to be worried, and each file is a separate scope.
5. A recovery mechanism. The light can restore the lamp effect at the proper time. If the forbidden wheat light effect is played currently and a volume light effect is suddenly generated, the forbidden wheat needs to be recovered after the volume light effect is executed. The light will automatically resume.
6. A priority mechanism. The light can ensure that the light with high priority is executed preferentially. The light effect with high priority is always executed preferentially, and the light effect developer does not need to worry about being interrupted and has a recovery mechanism even if being interrupted. The system light effect priority is configured by a configuration file and is dynamically adjustable for a user.
Specifically, the linked list used in the light effect thread includes one or more of a one-way linked list, a two-way linked list and an annular linked list, and a developer can select the corresponding linked list according to the content of the light effect mode and the user requirement. And the structure in the linked list is a light structure variable. The structure variables include (light _ id, light _ address, data _ r, data _ g, data _ b, next, prior), which respectively correspond to the number of lamps, addresses, RGB member values, and the order in which the lamps are converted by pointers. When the light effect thread is operated, a function is exported through the file of the light effect thread, the function receives parameters, and when the function is executed, light calls the function to realize corresponding light effect mode control.
In one embodiment, the light effect thread implements light effect control according to light effect priority. Wherein the light effect priority control comprises: 1. when the high priority light comes, the low priority light is not displayed. If the light with low priority needs to be recovered, the light is put into a corresponding recovery queue. 2. When the light A at the same level comes, the light B at the same level can interrupt the light A.3. When the low-priority light comes, the high-priority light interrupts the low-priority light. 4. And after the current light is executed, recovering the first light from the recovery queue from high to low according to the priority. 5. And the light effect thread executes the light effect operation according to a built-in timer. 6. The system light effect priority is always higher than the user light effect priority regardless of the size.
In a specific embodiment, be provided with the horse race lamp on the stereo set, throw the pinup, wherein, the horse race lamp includes lamp ring form go up the horse race lamp, down the horse race lamp, go up the lamp area of horse race lamp both sides, go up the flashing light between horse race lamp, the lower horse race lamp at last horse race lamp, down. The lantern effect mode that the horse race lamp corresponds has six kinds, includes:
mode 1, when there is no music, the mode is changed according to the set mode, when there is music, the speed of lamp change is carried out according to the music rhythm. Go up the horse race lamp, down the horse race lamp full circle seven various demonstration when no music, and go up the color of horse race lamp, lower horse race lamp and stagger the demonstration, according to anticlockwise rotation simultaneously, when having the music, rotate according to the music rhythm. When the lamp strip is free of music, the left lamp strip is full-bright in colors, the colors move upwards, the right lamp strip is full-bright in colors, the colors move downwards, and the colors at the upper end of the left lamp strip correspond to the colors at the lower end of the right lamp strip. When music is available, the moving speed of the color on the left lamp strip and the right lamp strip changes along with the rhythm of the music. The flashing light does not flash when no music exists, and flashes according to the music rhythm when music exists.
And in the second mode, the lamp is changed according to a set mode when no music exists, and the speed of the lamp change is carried out according to the music rhythm when music exists. When the horse race lamp has no music, two fifths of the lamps emit light to display in a rotary light emitting mode, and meanwhile, after the horse race lamp is changed according to the colors of seven colors and rotates for 6 circles, one fifth of the lamp ring on the opposite angle is lightened, and the horse race lamp is changed according to the colors of seven colors and rotates for 6 circles, so that the horse race lamp is changed circularly. When music exists, the music is changed in a music-free mode, and the rotation speed is changed according to the rhythm of the music. When the lamp belts on the two sides have no music, the display positions rotate along with the marquee, and the color of the display positions is consistent with that of the marquee. When having the music, the show position in lamp area is followed the horse race lamp and is rotated, and the colour keeps unanimous with the horse race lamp, and rotatory developments are synchronous with the horse race lamp. The flashing light does not flash when no music exists, and flashes according to the rhythm of the music when music exists.
And in the third mode, when no music exists, the three colors of red, orange and purple move and change, and when music exists, the three colors of red, orange and purple are lightened and extinguished from top to bottom in the middle according to the music rhythm and change color by color according to the seven colors. The lamp ring of the upper horse race lamp in the horse race lamp starts to emit light from the bottom when no music exists, the bottom is extinguished when the light-emitting position reaches the middle part, the light is on and off and the light is emitted to the top continuously, the same operation is circulated from the bottom after the light is extinguished, meanwhile, when music exists according to seven-color change (one color is used in each circulation), the bottom is on, the number of the light is fluctuated up and down according to the leap rhythm, and meanwhile, the seven colors are changed. The lantern ring of the lower running lantern starts to be lightened from the top when no music is available, and the top is extinguished when the lightened position reaches the middle part, and the lightening and extinguishing are continuously carried out until the lantern at the bottom is extinguished. The above cycle is repeated from top to bottom while cycling through the colors (one color per cycle). When music is available, the top of the lower horse race lamp emits light, the number of the light-emitting lamps fluctuates up and down according to the rhythm of the music, and the light-emitting lamps are changed in colorful colors. When the lamp belt has no music, the lamp belt emits light upwards from the bottom, when the light-emitting position reaches the middle part, the bottom is turned off, and the continuous on-off operation extends to the turning off of the lamp at the top. This operation is repeated in cycles and displayed in seven colors (one color for each cycle) with the color of the light strip being consistent with the ticker. When music is available, the middle part is bright, the fluctuation is up and down according to the music rhythm, and simultaneously, the color changes of the horse race lamp and the lamp strip are synchronous according to the seven-color change. The flashing light does not flash when no music exists, and flashes according to the music rhythm when music exists.
And in the fourth mode, when no music exists, the flame effect is changed according to the free rule of the flame effect, and when music exists, the change height of the flame is changed according to the rhythm of the music. The horse race lamp is when no music, and from the lower left side, both sides are luminous upwards, and after luminous position extended to the middle part, the lower left corner began to extinguish, and the operation of bright going out lasts to the top right portion and extinguishes. After all lamps are extinguished. From the lower right corner, both sides are luminous upwards, and after luminous position extended to the middle part, the lower right corner began to extinguish, and the operation of bright going out lasts to the top left and extinguishes. The above operations are cycled through, keeping each cycle using a different color (the color is seven). And when music exists, the lamp effect is circularly executed according to the change rule of the music when no music exists. The flashing light does not flash when no music exists, and flashes according to the rhythm of the music when music exists. When the lamp strip is silent, the left lower side of the lamp strip starts to light, the lamp strip emits light upwards from two sides, when the light-emitting position reaches the middle part, the bottom of the left side starts to extinguish, the lighting and extinguishing operations continue to extinguish the right top of the lamp strip, after all the lamps are extinguished, the lamp strips on the two sides start to emit light upwards from the lower right corner, after the light-emitting position reaches the middle part, the lamp strip on the lower right corner is extinguished, the lighting and extinguishing operations continue to extinguish the lamp strip on the top left, all the lamp strips are extinguished, and therefore, the cycle is repeated, each cycle of the lamp strip is controlled to emit light with a color, and the color is consistent with the color of the horse race lamp. When music is available, the lamp strip emits light according to music, the light emitting lamp flickers according to music rhythm, and the color of the horse race lamp and the color of the lamp strip are kept synchronous. The flashing light does not flash when no music is available, and flashes according to the music rhythm when music is available.
And in the fifth mode, when no music exists, the music is gradually changed in a circulating mode according to a set mode sequence, and when music exists, the music is changed in a circulating mode and flickers according to the rhythm of the music. When no music is available, two fifths of the horse race lamp shines in colorful colors and turns clockwise to shine. When music exists, the display mode is the same as that of music-free music, and the rotation speed is changed according to the rhythm of the music. When the lower horse race lamp does not have music, two fifths of the lamps emit light in colorful colors and rotate counterclockwise to emit light. When music exists, the light emitting mode is the same as that of music, and the rotation speed is changed according to the rhythm of the music. The lamp strip is displayed in a colorful mode when no music exists, changes circularly from bottom to top (each cycle lasts for 0-5 s), and is lightened in a colorful mode when music exists, and changes up and down according to music rhythm when each cycle lasts for 0-5 s. The flashing light does not flash when no music exists, and flashes according to the music rhythm when music exists.
And in the sixth mode, when no music exists, the music is gradually changed in a circulating mode according to a set mode, and when music exists, the music is changed in a circulating mode according to the set mode and flickers according to the rhythm of the music. The horse race lamp is when no music, all wait until seven various colour gradual changes, when having the music, glimmer according to the music rhythm. The light emitted by all the lamps of the lamp strip is in the same color, and is synchronous with the horse race lamp according to the frequency of the gradual change of the colors of the seven colors. The change rule is that the lamp strip changes left and right continuously, the color change direction of the lamp on the lamp strip is clockwise first, and the change interval is 1s in anticlockwise. When music is available, the music flickers according to the music rhythm. When music flickers, the marquee and the lamp strip do not flick at the same time, and the time for the two-time flashing of the marquee is longer than the time for the two-time flashing of the lamp strip and longer than the time for the one-time flashing of the marquee. The flashing light does not flash when no music exists, and flashes according to the music rhythm when music exists.
The lamp effect mode of the wall lamp is an automatic mode and comprises four modes, namely 1, when no music exists, a red lamp flickers, and when music exists, the red lamp flickers according to the change rule of no music and the music rhythm; 2. when no music exists, the music flickers according to the change rule of no music and the music rhythm; 3. the blue lamp flickers when no music exists, and the blue lamp flickers according to the music rhythm according to the change rule of no music when music exists; 4. the light mode is switched red, green and blue when no music exists, the switching frequency is 0.5s, and the light mode flickers according to the music rhythm according to the change rule of no music when music exists. The projection lamp is automatically associated with the last lamp mode, and 1, when the lamp in the previous mode is red, the projection lamp is automatically switched to the red mode to flicker; when the current former mode is green, automatically switching to a red mode to flash; when the former mode is the blue mode, automatically switching to the blue mode to flash; when the former mode is other colors except red, green and blue, the mode is automatically switched to the red, green and blue switching mode.
In this embodiment, the light effects realized by the light effect thread are of two types, one is that the light effect thread definitely ends by itself within a certain time. The second category is never self-terminating and needs to be restored after being interrupted.
In this embodiment, the step of creating a music following thread specifically includes: and setting a channel for acquiring music energy and information of frequency points for acquiring the energy by a music following thread.
In a specific embodiment, the information of the frequency points is the frequency of each frequency point, including a low frequency point (50 HZ), a medium and low frequency point (100 HZ), a medium frequency point (250 HZ), and a medium and high frequency point (600 HZ), and when the frequency of the audio is located at the frequency point, the energy value of the audio is obtained.
In this embodiment, before executing a new lamp effect mode, it is necessary to turn off an old lamp effect mode, and therefore, the step of determining and executing the lamp effect mode according to the lamp effect operation command further includes: judging whether a timer is already started; if yes, closing the opened timer and the opened light effect; if not, determining and executing the light effect mode according to the light effect operation instruction.
Specifically, a light effect thread in the sound waits for receiving a light effect operation instruction and determines a light effect mode needing to be skipped according to the light effect operation instruction after receiving the light effect operation instruction.
S102: and starting a timer, and circularly calculating the current music energy by using the music following thread to enable the light effect thread corresponding to the light effect mode to start the light effect according to the timer and the music energy.
The step of starting the timer specifically comprises: and initializing and starting a timer corresponding to the light effect thread and a timer corresponding to the music following thread. The two timers have the same timing time, which is 5ms. In other embodiments, the two timing periods may be other time periods, such as 4ms and other values, and the timing periods of the two timing periods may also be different, which may be specifically set according to user requirements.
In this embodiment, the step of calculating the current music energy by using the music following thread loop specifically includes: after the timer corresponding to the music following thread is triggered, the music following thread acquires the energy value of each frequency point, the current music energy is calculated according to the energy value, the music energy is sent to the currently running light effect thread, and the timer corresponding to the music following thread is restarted.
The method comprises the following steps that the music following thread acquires energy values of all frequency points, and the step of calculating the current music energy according to the energy values specifically comprises the following steps: and acquiring the energy values of the played music at each frequency point, calculating the total energy of the music and the change trend of the music tune according to the energy values, and acquiring the current music energy according to the total energy and the change trend of the music tune.
In a specific embodiment, as shown in fig. 2, when the music following thread calculates the current music energy, a piece of music is taken from the audio stream, and the energy value of the music in each frequency band is determined, where the taken frequency point value is: the low frequency point (50 HZ), the middle and low frequency (100 HZ), the middle frequency point (250 HZ) and the middle and high frequency (600 HZ) are recorded, the numerical value of each frequency point is recorded as the A point, a 10MS timer is arranged, the numerical value of each frequency point is continuously taken, and the record is stored as the B point. The same method continues to take 2 points and store them as C and D points. Firstly, judging the style of music of the whole music, and comparing and calculating the numerical values of points A, B, C and D at each frequency point. And judging the total volume of the music of the whole song, and calculating the accumulation threshold values of the points A, B, C and D. And recording as point E, E = a + B + C + D; after the volume level of the music and the ratio of each frequency band are determined, difference calculation is carried out, and F, G and H points are set respectively. F = B-A; g = C-B; h = D-C; comparing the values of F, G and H points, judging the time of the values, judging whether the tune of the music is in an ascending trend or a descending trend, and if H > G > F and H > E/2, judging that the H point is a captured frequency point. And transmitting the values of the points E and H to a light effect algorithm thread, and setting a corresponding music following effect by the light effect thread according to the received values.
In this embodiment, the step of enabling the light effect thread corresponding to the light effect mode to turn on the light effect according to the timer and the music energy specifically includes: and determining the triggering of the timer corresponding to the light effect thread, operating the light effect mode corresponding to the light effect thread, and controlling the restarting time of the timer according to the music energy information transmitted by the music following thread.
The step of controlling the restart time of the timer according to the music energy information transmitted by the music following thread specifically comprises: judging whether the light effect changes in real time according to the music energy; if yes, displaying the light effect based on the data of the music energy, and restarting a timer corresponding to the light effect thread; if not, restarting a timer corresponding to the light effect thread.
Has the advantages that: according to the light effect control method, the light effect thread and the music following thread are established, the timer is started after the light effect operation instruction is received, the current music energy is calculated through the music following thread, and the information of the music energy is transmitted to the light effect thread, so that the light effect thread controls the light effect according to the timer and the music energy, the light effect can be controlled to generate various changes according to sound when music is played, the interaction effect is good, and the use experience of a user is improved.
Based on the same inventive concept, the present invention further provides a sound system, please refer to fig. 4-16, fig. 4 is a structural diagram of an embodiment of the sound system of the present invention; FIG. 5 is a logic control diagram of an embodiment of the sound of the present invention; FIG. 6 is a block diagram of power control for an embodiment of the audio of the present invention; FIG. 7 is a partial circuit diagram of an embodiment of a Bluetooth module in a speaker of the present invention; FIG. 8 is a circuit diagram of another portion of the Bluetooth module of FIG. 7; FIG. 9 is a partial circuit diagram of an embodiment of a power module for a sound box according to the present invention; FIG. 10 is a circuit diagram of an embodiment of a power on/off circuit of a key module in a speaker according to the present invention; FIG. 11 is a circuit diagram of a portion of a sound effect module of the audio device according to an embodiment of the present invention; FIG. 12 is a circuit diagram of another portion of the sound effect module of FIG. 11; fig. 13 is a circuit diagram of an embodiment of a power amplifier module in a sound box according to the present invention; FIG. 14 is a circuit diagram of an embodiment of a microphone module in an audio system according to the present invention; FIG. 15 is a circuit diagram of an embodiment of an LED lamp in the audio of the present invention; fig. 16 is a circuit diagram of an embodiment of an LED lamp driving module in an audio system according to the present invention, and the audio system according to the present invention is described with reference to fig. 4 to 16.
In this embodiment, the sound box includes a controller, an LED lamp driving module, and an LED lamp for displaying light effect, the LED lamp driving module is connected to the controller and the LED lamp, respectively, and the sound box executes the light effect control method according to the above embodiment through the controller, the LED lamp driving module, and the LED lamp. The controller is a single chip microcomputer, the single chip microcomputer stores computer programs of the light effect thread and the music following thread, and the LED lamp driving module is controlled to work through the computer programs to achieve the light effect driving method.
In this embodiment, the stereo set is bluetooth stereo set, still includes bluetooth module, power module, microphone module, audio module, button module, power amplifier module.
In this embodiment, after the controller is initialized as a main control, the controller controls the LED lamp to perform light display, detects whether a key in the key module is effectively pressed, if yes, executes a specific function corresponding to the pressed key, and shuts down and exits after receiving a shutdown instruction. And if the key is not effectively pressed or not pressed, receiving audio data, controlling the LED lamp to correspondingly emit light according to the audio data, and carrying out corresponding interrupt processing on the current lamp effect mode of the LED lamp based on the processed audio data.
Specifically, as shown in fig. 6, the first voltage converting circuit in the power module receives DC input of 20V/5A, outputs DC input of 20V/5A, and supplies the DC input to the power amplifier 1 (AMP 1) and the power amplifier 2 (AMP 2) in the power amplifier module. Meanwhile, the current of 20V/0.75A is output to a charging management chip (CN 3704) in the power module, and the charging management chip charges a battery (VBAT). The battery outputs 14.8V/2.7A voltage, and the voltage is converted by a triode (MOS) in the power module and supplied to a power amplifier. Meanwhile, the direct current input (DC 20V/5A) outputs direct current of 5V/2.5A through the second voltage conversion circuit, and power is supplied to the Bluetooth module (BT) through a first voltage stabilizing chip (WL 2855K404V/500 MA) in the boost management module, and the following devices are simultaneously supplied with power: a second voltage stabilizing chip (LDO) in the boost management module, a radio receiving chip (QN 8035) in the microphone module, a third voltage conversion circuit for outputting direct current of 5V/25MA, a DISPLAY module (DISPLAY), a fourth voltage conversion circuit for outputting direct current (5V/2.1A), and an operational amplifier chip (TP 2412) in the power amplifier module, wherein the direct current-to-direct current (DC-DC) in the boost management module outputs 5V/2A, and the direct current-to-red-blue lamp panel (RGB _ LED) in the LED lamp and the LED lamp driver module (IS 31FL 3729) are supplied.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A light effect control method is applied to a sound box, and comprises the following steps:
s101: creating a light effect thread and a music following thread, and determining and executing a light effect mode according to the light effect operation instruction after receiving the light effect operation instruction;
s102: and starting a timer, and circularly calculating the current music energy by using the music following thread, so that the light effect thread corresponding to the light effect mode starts the light effect according to the timer and the music energy.
2. The light effect control method according to claim 1, wherein the step of creating a light effect thread specifically comprises:
the method comprises the steps of initializing and creating a linked list, initializing a structural body in the linked list and adding structural body variables, wherein different linked lists correspond to different light effect modes.
3. The light effect control method according to claim 1, wherein the step of creating a music following thread specifically comprises:
and setting a channel for acquiring music energy and information of frequency points for acquiring the energy by the music following thread.
4. The lamp effect control method according to claim 1, wherein the step of determining and executing the lamp effect mode according to the lamp effect operation command further comprises:
judging whether a timer is already started;
if yes, closing the opened timer and the opened light effect;
if not, determining and executing the light effect mode according to the light effect operation instruction.
5. The lamp-effect control method according to claim 1, wherein the step of starting the timer specifically comprises:
and initializing and starting a timer corresponding to the light effect thread and a timer corresponding to the music following thread.
6. The light effect control method according to claim 1, wherein the step of calculating the current music energy using a music following thread loop specifically comprises:
after the timer corresponding to the music following thread is triggered, the music following thread acquires the energy value of each frequency point, the current music energy is calculated according to the energy value, the music energy is sent to the currently running light effect thread, and the timer corresponding to the music following thread is restarted.
7. The light effect control method according to claim 6, wherein the music following thread acquires energy values of each frequency point, and the step of calculating the current music energy according to the energy values specifically comprises:
the energy value of the played music at each frequency point is obtained, the total energy of the music and the change trend of the music tune are calculated according to the energy value, and the current music energy is obtained according to the total energy and the change trend of the music tune.
8. The light effect control method according to claim 1, wherein the step of enabling the light effect thread corresponding to the light effect mode to turn on the light effect according to the timer and the music energy specifically comprises:
and determining the trigger of a timer corresponding to the light effect thread, operating a light effect mode corresponding to the light effect thread, and controlling the restarting time of the timer according to the music energy information transmitted by the music following thread.
9. The light effect control method according to claim 8, wherein the step of controlling the restart time of the timer according to the music energy information transmitted by the music following thread specifically comprises:
judging whether the lamp effect changes along with the change in real time according to the music energy;
if so, displaying a light effect based on the data of the music energy, and restarting a timer corresponding to the light effect thread;
if not, restarting a timer corresponding to the light effect thread.
10. A sound box, characterized in that the sound box comprises a controller, an LED lamp driving module and an LED lamp for displaying light effects, the LED lamp driving module is respectively connected with the controller and the LED lamp, and the sound box performs the light effect control method according to any one of claims 1-9 through the controller, the LED lamp driving module and the LED lamp.
CN202211492193.8A 2022-11-25 2022-11-25 Lamp effect control method and sound equipment Pending CN115802563A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211492193.8A CN115802563A (en) 2022-11-25 2022-11-25 Lamp effect control method and sound equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211492193.8A CN115802563A (en) 2022-11-25 2022-11-25 Lamp effect control method and sound equipment

Publications (1)

Publication Number Publication Date
CN115802563A true CN115802563A (en) 2023-03-14

Family

ID=85441636

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211492193.8A Pending CN115802563A (en) 2022-11-25 2022-11-25 Lamp effect control method and sound equipment

Country Status (1)

Country Link
CN (1) CN115802563A (en)

Similar Documents

Publication Publication Date Title
US9990175B2 (en) Lighting device and voice broadcasting system and method thereof
US9661724B2 (en) Light-emitting device, method of controlling light-emitting device, and program
JP2011233493A (en) Power supply control device for led illumination, and illumination system
JP2006303002A (en) Information processing apparatus and brightness adjustment method
WO2008025214A1 (en) Lamp controller with a single lamp access function
JP2000090702A (en) Stick light
CN107249146B (en) Method for dynamically configuring LED indicator lamp based on smart television
CN106658848B (en) A kind of color music Landscape Lamps of LED seven
CN110515293A (en) A kind of wake-up system and awakening method
CN115802563A (en) Lamp effect control method and sound equipment
CN101409742A (en) Mobile terminal with horse-racing lamp flickering along music and control method for horse-racing lamp
CN115715043A (en) Multi-lamp effect sound box
JP2016225247A (en) Light projector
JP2002352967A (en) Illumination equipment and illumination fitting
CN214627423U (en) Off-line pronunciation intelligence LED lamp area controller based on bluetooth
CN201787476U (en) Multi-functional lamp
JP4054074B2 (en) Lighting device
JP2000194339A (en) Acoustic device and acoustic reproducing method
TWI448201B (en) Graphic Interface Controlled Multicolor Light Source System and Its Association Method
JP6038602B2 (en) Lighting device, light control / color control method, and light control / color control system
TWM543956U (en) Multiple color-temperature light bulb system
JP7171983B1 (en) Luminaire for event
KR102271416B1 (en) Portable light emitting apparatus for support and Method for controlling the same
KR100380416B1 (en) Flickering apparatus for advertising fluorescent lamp
CN214046068U (en) Control system of LED module based on bluetooth and speech control

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication