CN108925014B - Light source brightness control method, system and equipment - Google Patents

Light source brightness control method, system and equipment Download PDF

Info

Publication number
CN108925014B
CN108925014B CN201810482643.2A CN201810482643A CN108925014B CN 108925014 B CN108925014 B CN 108925014B CN 201810482643 A CN201810482643 A CN 201810482643A CN 108925014 B CN108925014 B CN 108925014B
Authority
CN
China
Prior art keywords
audio
value
brightness
peak value
light source
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.)
Active
Application number
CN201810482643.2A
Other languages
Chinese (zh)
Other versions
CN108925014A (en
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.)
Anker Innovations Co Ltd
Original Assignee
Anker Innovations 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 Anker Innovations Co Ltd filed Critical Anker Innovations Co Ltd
Priority to CN201810482643.2A priority Critical patent/CN108925014B/en
Publication of CN108925014A publication Critical patent/CN108925014A/en
Application granted granted Critical
Publication of CN108925014B publication Critical patent/CN108925014B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • 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)
  • Optical Communication System (AREA)

Abstract

The invention relates to the technical field of electronic communication, and discloses a light source brightness control method, a light source brightness control system and electronic equipment. The light source brightness control method comprises the following steps: receiving an audio signal, and determining an audio magnitude value corresponding to the audio signal; adjusting the maximum peak value and the minimum peak value of the audio frequency in real time according to the audio frequency quantity value; determining a brightness parameter corresponding to the audio magnitude according to the current audio maximum peak value and the audio minimum peak value; wherein the brightness of the light source matches the brightness parameter. By the mode, the change of the light source brightness can be adapted to the audio signals with different rhythms.

Description

Light source brightness control method, system and equipment
Technical Field
The present invention relates to the field of electronic communication technologies, and in particular, to a light source brightness control method, a light source brightness control system, and an electronic device.
Background
The inventor finds that with the rise of the internet of things and intelligent household appliances, the intelligent home is rapidly developed and popularized, more and more intelligent household appliances appear and are accepted by people, and the intelligent household appliances are connected to a home local area network and are interconnected with external cloud services. At present, one of the main ways of operating intelligent household electrical appliances is to use lan control in consideration of stability and timeliness of operation. The intelligent bulb is one of the most common and important parts in intelligent household appliances. The intelligent light bulb on the market has a plurality of control modes, and the music mode is one of the modes with the intelligent effect of the intelligent light bulb. The bulb needs to perform a series of algorithm conversion on real-time sound data acquired through a mobile phone end, and finally the real-time sound data is converted into corresponding brightness which is transmitted to the equipment. The conversion method is a difficult problem because the characteristics of the sound data are unique (especially when the music is played), the sound data are difficult to be quantized into specific brightness values, and the light bulb needs to be converted into brightness with corresponding size according to the rhythm of the rhythm.
Disclosure of Invention
In view of the above, the present invention provides a light source brightness control method, a light effect control system and a device with a storage function, which can adapt the change of the light source brightness to audio signals with different rhythms.
In order to solve the technical problems, the invention adopts a technical scheme that: provided is a light source brightness control method, including: receiving an audio signal, and determining an audio magnitude value corresponding to the audio signal; adjusting the maximum peak value and the minimum peak value of the audio frequency in real time according to the audio frequency quantity value; determining a brightness parameter corresponding to the audio magnitude according to the current audio maximum peak value and the audio minimum peak value; wherein the brightness of the light source matches the brightness parameter.
The step of adjusting the maximum audio peak value and the minimum audio peak value in real time according to the audio magnitude specifically comprises: reading an audio critical low value, and assigning the initial values of the audio maximum peak value and the audio minimum peak value to be equal to the audio critical low value, wherein the audio critical low value defines an audio magnitude value in a mute state; judging whether the audio magnitude value is smaller than the audio minimum peak value, if so, taking the average value of the audio magnitude value and the current audio minimum peak value and assigning the average value to the audio minimum peak value; if not, judging whether the audio magnitude value is larger than the audio maximum peak value, if so, taking the average value of the audio magnitude value and the current audio maximum peak value and assigning the average value to the audio maximum peak value; if not, taking the average value of the audio magnitude value and the current audio minimum peak value and assigning the average value to the audio minimum peak value, and taking the average value of the audio magnitude value and the current audio maximum peak value and assigning the average value to the audio maximum peak value.
Wherein, according to the audio magnitude, the step of adjusting the audio maximum peak value and the audio minimum peak value in real time further comprises: and judging whether the audio frequency magnitude is smaller than the audio frequency critical low value, and if so, assigning the audio frequency critical low value to the audio frequency magnitude.
Wherein, according to the audio magnitude, the step of adjusting the audio maximum peak value and the audio minimum peak value in real time further comprises: and judging whether the maximum audio peak value is larger than the minimum audio peak value or not, and if not, adaptively increasing the maximum audio peak value until the maximum audio peak value is larger than the minimum audio peak value.
The step of determining the brightness parameter corresponding to the audio magnitude value according to the current audio maximum peak value and the audio minimum peak value specifically includes: calculating a first difference value between the audio magnitude and the current audio minimum peak value, and calculating a second difference value between the current audio maximum peak value and the audio minimum peak value, wherein the ratio of the first difference value to the second difference value is a conversion ratio; wherein the brightness parameter comprises a conversion ratio; the brightness matching brightness parameters of the light source specifically include: reading the maximum brightness value of the light source, and taking the product of the maximum brightness value and the conversion ratio as a brightness value; wherein, the brightness of the light source corresponds to the brightness value.
The step of determining the brightness parameter corresponding to the audio magnitude value according to the current audio maximum peak value and the audio minimum peak value comprises the following steps: judging whether the conversion ratio is lower than a preset ratio low value or not, and if so, assigning the preset ratio low value to the conversion ratio; or judging whether the conversion ratio is greater than 1, and if so, assigning the conversion ratio to 1.
The step of reading the maximum brightness value of the light source and taking the product of the maximum brightness value and the conversion ratio as the brightness value comprises the following steps: periodically transmitting the brightness value to the light source by taking a first preset time length as a period; the light output by the light source has multiple colors, and the color of the light output by the light source is periodically changed gradually by taking a second preset time period as a period.
Wherein the audio magnitude value comprises one of a volume intensity value or a pitch intensity value.
In order to solve the technical problem, the invention adopts another technical scheme that: the electronic equipment comprises a processor and an audio acquisition device, wherein the processor is connected with the audio acquisition device and can realize the following actions: controlling an audio acquisition device to receive an audio signal and determining an audio magnitude value corresponding to the audio signal; adjusting the maximum peak value and the minimum peak value of the audio frequency in real time according to the audio frequency quantity value; and determining a brightness parameter corresponding to the audio magnitude according to the current audio maximum peak value and the audio minimum peak value so as to calculate a brightness value corresponding to the brightness parameter and transmit the brightness value to the light source.
In order to solve the technical problem, the invention adopts another technical scheme that: there is provided a light source brightness control system, which includes the electronic device and the light source as set forth in the above embodiments, the light source receives the brightness value transmitted to the light source by the electronic device, and the brightness of the light source corresponds to the brightness value.
The invention has the beneficial effects that: the light source brightness control method provided by the invention determines the audio magnitude value corresponding to the audio signal by receiving the audio signal. And then, adjusting the maximum peak value and the minimum peak value of the audio frequency in real time according to the audio frequency magnitude, so that the change of the light source brightness can adapt to audio signals with different rhythms, and the light source brightness can obviously change aiming at different tones or volumes of the audio frequency for the audio frequencies with different range spans and volume spans. And determining a brightness parameter corresponding to the audio magnitude according to the current maximum peak value and the current minimum peak value of the audio, wherein the brightness of the light source is matched with the brightness parameter, so that the current brightness of the light source corresponds to the audio magnitude of the audio signal, namely the current brightness of the light source corresponds to the tone or volume of the currently received audio signal, so that the brightness of the light source is changed in real time along with the rhythm of the audio, and the effect of following the rhythm of the audio rhythm is achieved.
Drawings
FIG. 1 is a schematic flow chart illustrating a method for controlling brightness of a light source according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a method for controlling brightness of a light source according to another embodiment of the present invention;
FIG. 3 is a schematic diagram of a light source brightness control system according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating an embodiment of a method for controlling brightness of a light source corresponding to the system shown in FIG. 3;
fig. 5 is a schematic structural diagram of an embodiment of an electronic device according to the invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a method for controlling brightness of a light source according to an embodiment of the present invention.
S101: receiving an audio signal, and determining an audio magnitude value corresponding to the audio signal;
in this embodiment, in order to make the brightness of the light source follow the rhythm of the audio frequency, a real-time audio signal needs to be received, and the audio magnitude corresponding to the current audio signal is analyzed according to the received audio signal, so that the brightness of the light source is adjusted in real time according to the audio magnitude, and the brightness of the light source changes in real time along with the audio magnitude, that is, the brightness of the light source follows the rhythm of the audio frequency.
S102: adjusting the maximum peak value and the minimum peak value of the audio frequency in real time according to the audio frequency quantity value;
in this embodiment, after the audio magnitude is determined, since the audio magnitude is not a constant value, the variation rule of the audio magnitude is related to the audio to which the audio magnitude belongs, and according to the variation rule of the audio magnitude, the maximum peak value and the minimum peak value of the audio are adjusted in real time, that is, the real-time audio variation amplitude is obtained, so as to obtain the ratio of the real-time audio magnitude to the audio variation amplitude, where the maximum peak value of the audio corresponds to the maximum brightness of the light source, and the minimum peak value of the audio corresponds to the minimum brightness of the light source, when the audio magnitude reaches the maximum peak value of the audio, the light source outputs light with the maximum brightness, when the audio magnitude reaches the minimum peak value of the audio, the ratio of the light brightness output by the light source to the maximum brightness of the light source corresponds to the ratio of the audio variation amplitude, so that the light source is proportioned to output light with corresponding brightness.
S103: determining a brightness parameter corresponding to the audio magnitude according to the current audio maximum peak value and the audio minimum peak value; wherein the brightness of the light source matches the brightness parameter;
in this embodiment, in order to make the brightness of the light output by the light source follow the rhythm of the audio frequency to which the audio signal belongs, the light source is required to output the light with the brightness corresponding to the audio signal in real time. To achieve the above technical objective, it is required to calculate to determine the brightness parameter corresponding to the audio magnitude according to the current audio maximum peak value and the audio minimum peak value. The brightness of the light currently output by the light source is matched with the brightness parameter, so that the light source can output the light with the brightness corresponding to the audio signal in real time, and the effect that the brightness of the light output by the light source can follow the rhythm of the audio frequency to which the audio signal belongs is achieved.
It can be seen from the above that, the light source brightness control method provided by the present invention determines the audio magnitude corresponding to the audio signal by receiving the audio signal. And then, adjusting the maximum peak value and the minimum peak value of the audio frequency in real time according to the audio frequency magnitude, so that the change of the light source brightness can adapt to audio signals with different rhythms, and the light source brightness can obviously change aiming at different tones or volumes of the audio frequency for the audio frequencies with different range spans and volume spans. And determining a brightness parameter corresponding to the audio magnitude according to the current maximum peak value and the current minimum peak value of the audio, wherein the brightness of the light source is matched with the brightness parameter, so that the current brightness of the light source corresponds to the audio magnitude of the audio signal, namely the current brightness of the light source corresponds to the tone or volume of the currently received audio signal, so that the brightness of the light source is changed in real time along with the rhythm of the audio, and the effect of following the rhythm of the audio rhythm is achieved.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating a method for controlling brightness of a light source according to another embodiment of the present invention.
The implementation of the light source brightness control method described in this embodiment may be that the mobile terminal controls the light effect output by the intelligent light source to move with the audio rhythm played by the mobile terminal, or the intelligent light source adjusts the light effect output by the intelligent light source to move with the audio rhythm according to the audio rhythm played by the external environment. As described in detail below.
S201: acquiring an audio critical low value, and assigning the initial value of the audio maximum peak value and the audio minimum peak value to be equal to the audio critical low value;
in this embodiment, the maximum audio peak is the maximum peak for measuring the audio frequency band to which the received audio magnitude belongs, the minimum audio peak is the minimum peak for measuring the audio frequency band to which the received audio magnitude belongs, the audio threshold low value is the audio magnitude defined in the mute state, and when the audio magnitude is lower than the audio threshold low value, the audio magnitude source is considered to be in the mute state, that is, the audio magnitude source does not play any audio. To initialize the light source brightness control method provided in this embodiment, the initial values of the maximum audio peak and the minimum audio peak are equal to the threshold audio low value.
Optionally, the threshold audio low value may be preset to describe a mute state of the audio magnitude source, and a value of the threshold audio low value may be adaptively adjusted according to a complexity of an environment where the audio magnitude source is located.
S202: receiving an audio signal, and determining an audio magnitude value corresponding to the audio signal;
in this embodiment, in order to make the brightness of the light source follow the rhythm of the audio frequency, a real-time audio signal needs to be received, and the audio magnitude corresponding to the current audio signal is analyzed according to the received audio signal, so that the brightness of the light source is adjusted in real time according to the audio magnitude, and the brightness of the light source changes in real time along with the audio magnitude, that is, the brightness of the light source follows the rhythm of the audio frequency.
S203: judging whether the audio magnitude is smaller than the audio critical low value;
in this embodiment, if the audio magnitude is smaller than the audio threshold low value, step S204 is executed, and if the audio magnitude is not smaller than the audio threshold low value, step S205 is executed.
S204: assigning an audio frequency critical low value to the audio frequency magnitude value;
in this embodiment, after receiving the audio magnitude value, it is necessary to determine whether the audio magnitude value is smaller than the audio critical low value to determine the validity of the received audio magnitude value, and if the audio magnitude value is not smaller than the audio critical low value, it is determined that the audio magnitude value is an effective value, and a next process step may be performed. Step S205 is then performed.
S205: judging whether the audio magnitude is smaller than the audio minimum peak value;
in this embodiment, if the audio magnitude is smaller than the audio minimum peak, step S206 is performed, and if the audio magnitude is not smaller than the audio minimum peak, step S207 is performed.
S206: taking the average value of the audio magnitude and the current audio minimum peak value and assigning the average value to the audio minimum peak value;
in this embodiment, the real-time adjustment of the minimum audio peak is implemented by determining whether the audio magnitude is smaller than the minimum audio peak, and when the audio magnitude is smaller than the minimum audio peak, the audio output from the audio magnitude source may change, such as a change in audio category (for example, different songs are played), or a change in audio frequency band (for example, a mild music prelude, but a high refrain portion, a rapid tempo, etc.), so that the minimum audio peak is no longer adapted to the received real-time audio magnitude, and needs to be adjusted. And then jumps to step S210.
S207: judging whether the audio magnitude is larger than the maximum audio peak value;
in this embodiment, if the audio magnitude is greater than the maximum audio peak, step S208 is performed, and if the audio magnitude is not greater than the maximum audio peak, step S209 is performed.
S208: taking the average value of the audio magnitude and the current audio maximum peak value and assigning the average value to the audio maximum peak value;
in this embodiment, the real-time adjustment of the maximum audio peak is implemented by determining whether the audio magnitude is greater than the maximum audio peak, and when the audio magnitude is greater than the maximum audio peak, the audio output from the audio magnitude source may change, such as a change in audio category (for example, different songs are played), or a change in audio frequency band (for example, a more moderate music prelude, but a high refrain portion, a rapid tempo, etc.), so that the current maximum audio peak no longer matches the received real-time audio magnitude, and needs to be adjusted, and therefore, an average value of the audio magnitude and the current maximum audio peak is taken and assigned to the maximum audio peak, thereby implementing the real-time adjustment of the maximum audio peak. And then jumps to step S210.
S209: taking an average value of the audio magnitude value and the current audio minimum peak value and assigning the average value to the audio minimum peak value, and taking an average value of the audio magnitude value and the current audio maximum peak value and assigning the average value to the audio maximum peak value;
in this embodiment, when the received audio magnitude is between the current audio maximum peak and the audio minimum peak, it is indicated that the current audio maximum peak and the audio minimum peak can be adapted to the current audio magnitude received in real time, but it cannot be excluded that the audio output from the audio magnitude source has changed, and only the audio magnitude that the current audio maximum peak and the audio minimum peak cannot be adapted to has not been received, so the audio magnitude and the current audio minimum peak are averaged and assigned to the audio minimum peak, and the audio magnitude and the current audio maximum peak are averaged and assigned to the audio maximum peak Frequency band changes, etc.), the audio maximum peak and audio minimum peak can be adjusted in time to adapt to audio of different range spans or volume spans according to the change of the received audio volume value.
S210: acquiring a first difference value between the audio magnitude and the audio minimum peak value, acquiring a second difference value between the audio maximum peak value and the audio minimum peak value, and acquiring a ratio of the first difference value to the second difference value to acquire a conversion ratio;
in this embodiment, a first difference between an audio magnitude and an audio minimum peak value is obtained, a second difference between the audio maximum peak value and the audio minimum peak value is obtained, a ratio of the first difference to the second difference is obtained to obtain a conversion ratio, based on a mathematical principle, a denominator in a fraction is not 0, that is, the second difference between the audio maximum peak value and the audio minimum peak value is not 0, so that it is required to determine whether the audio maximum peak value is greater than the audio minimum peak value, if the audio maximum peak value is not greater than the audio minimum peak value, to ensure the rationality of a calculation result, the audio maximum peak value is adaptively increased until the audio maximum peak value is greater than the audio minimum peak value, and an increase amplitude may be 1, 2, 3, and the like, that is, when an operation of determining whether the audio maximum peak value is greater than the audio minimum peak value is performed each time, if the result is negative, the value of the current audio maximum, and then, continuously executing the judgment action until the maximum audio peak value is larger than the minimum audio peak value so as to ensure the reasonability of the obtained conversion ratio.
S211: judging whether the conversion ratio is lower than a preset ratio low value or not;
in this embodiment, if the conversion ratio is lower than the preset ratio low value, step S212 is executed, and if the conversion ratio is not lower than the preset ratio low value, step S213 is executed.
S212: assigning a low value of the preset proportion to the conversion proportion;
in this embodiment, the rationality of the calculated conversion ratio is further confirmed by determining whether the conversion ratio is lower than a preset ratio low value, where the preset ratio low value is preset to describe the rationality of the conversion ratio and corresponds to the minimum brightness of the light output by the light source, and if the conversion ratio is not lower than the preset ratio low value, the conversion ratio is a reasonable value, and the next step may be performed. And then jumps to step S215.
Optionally, the preset ratio low value may be 4%, 5%, 6%, or the like, and the brightness of the light output by the light source corresponding to the preset ratio low value is the minimum brightness recognized by human eyes, so as to ensure that the light output by the light source can be observed.
S213: judging whether the conversion ratio is larger than 1;
in this embodiment, if the conversion ratio is greater than 1, step S214 is executed, and if the conversion ratio is not greater than 1, step S215 is executed.
S214: assigning the conversion ratio to 1;
in this embodiment, the conversion ratio may range from 0 to 1, and the conversion ratio corresponds to the peak interval of the light source luminance. That is, when the conversion ratio is 0, it means that the light source luminance is 0 (the light source does not emit light); a conversion ratio of 1 means that the light source emits light with maximum brightness. When the conversion ratio is larger than 1, the current conversion ratio is not in accordance with the mathematical principle, that is, the light emitting brightness of the light source is larger than the maximum brightness, so that the unreasonable phenomenon exists. For this case, the conversion ratio needs to be set to 1, and the light source emits light with maximum brightness. Step S215 is then performed.
S215: the light source outputs light rays with brightness matched with the conversion proportion;
in this embodiment, the luminance parameter includes the conversion ratio obtained in the above steps. The maximum brightness of the light output by the light source depends on the type and specification of the light source, which is determined when the light source is shipped. Therefore, the maximum brightness value of the light rays which can be output by the light source can be directly read according to the type, the specification and the like of the used light source, the product of the maximum brightness value and the conversion ratio is taken as the brightness value, the brightness value corresponding to the conversion ratio is obtained, the brightness value is transmitted to the light source, the brightness of the light rays output by the light source corresponds to the brightness value, and the brightness value is used for describing the brightness of the light source.
Optionally, a first preset time period is taken as a period, the brightness information is periodically transmitted to the light source, so that the brightness of the light output by the light source follows the rhythm of the audio rhythm, the first preset time period can be 1 millisecond, 2 milliseconds, 3 milliseconds and the like, and in order to ensure the real-time performance of the brightness adjustment of the light output by the light source, the first preset time period can be as short as possible, so that the real-time performance of the brightness adjustment of the light output by the light source can be ensured, and the brightness of the light output by the light source follows the rhythm of the audio rhythm.
Optionally, the light output by the light source may have multiple colors, and the multiple colors of the light source gradually change periodically with a second preset time period as a period, so as to achieve a streamer effect of the light output by the light source, and the colors of adjacent periods have a certain color continuity, that is, the color systems of adjacent periods are close to and matched with each other, so as to optimize the streamer effect of the light output by the light source. The second preset time period may be 1 second, 2 seconds, 3 seconds, and the like, and the colors of the light output by the light source may include 2, 3, 4, and the like, and the color type of the light output by the light source and the second preset time period include, but are not limited to, the above, and the gradual change operation between the colors of the light output by the light source can be performed by taking the second preset time period as a cycle, which can be the color type of the light output by the light source and the second preset time period described in this embodiment, which is not limited herein.
It can be understood that the change process of the brightness of the light output by the light source and the change process of the color are two independent change processes, and do not affect each other, and the brightness of the light output by the light source changes with the audio and combines with the periodic gradual change of the color, so that the overall appearance effect of the light output by the light source appears to follow the rhythm of the audio rhythm. Of course, the color of the light output by the light source described in this embodiment can also be controlled by the light source brightness control method described above, so that the change of the audio rhythm is reflected by the saturation change or the color change of the color, and the color of the light output by the light source follows the rhythm of the audio rhythm.
It should be noted that the audio magnitude described in this embodiment may be one of a volume intensity value or a pitch intensity value, when the audio magnitude is the volume intensity value, the brightness of the light output by the light source is adjusted in real time along with the volume of the audio, when the audio magnitude is the pitch intensity value, the brightness of the light output by the light source is adjusted in real time along with the pitch of the audio, and in this embodiment, the variation amplitudes of the audio data of different audio frequencies and different frequency bands of the audio are quantized into an audio minimum peak value and an audio maximum peak value to measure the variation amplitude of the audio data, and the audio minimum peak value and the audio maximum peak value are adjusted in real time, and finally the variation rule of the audio magnitude is reflected in a proportional manner on the brightness of the light output by the light source, no matter how large or small the audio span and the volume span of the audio, the brightness of the light output by the light, so as to reflect the change of the audio volume value and further realize the effect that the light effect output by the light source follows the rhythm of the audio rhythm.
In summary, the light source brightness control method provided by the present invention determines the audio magnitude corresponding to the audio signal by receiving the audio signal. And then, adjusting the maximum peak value and the minimum peak value of the audio frequency in real time according to the audio frequency magnitude, so that the change of the light source brightness can adapt to audio signals with different rhythms, and the light source brightness can obviously change aiming at different tones or volumes of the audio frequency for the audio frequencies with different range spans and volume spans. And determining a brightness parameter corresponding to the audio magnitude according to the current maximum peak value and the current minimum peak value of the audio, wherein the brightness of the light source is matched with the brightness parameter, so that the current brightness of the light source corresponds to the audio magnitude of the audio signal, namely the current brightness of the light source corresponds to the tone or volume of the currently received audio signal, so that the brightness of the light source is changed in real time along with the rhythm of the audio, and the effect of following the rhythm of the audio rhythm is achieved. The light source has a streamer function, the light rays output by the light source have various colors, and the various colors are periodically gradually changed to match with the light source brightness to follow the rhythm of the audio rhythm, so that the rhythm effect of the light source is further improved.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a light source brightness control system according to an embodiment of the present invention.
In this embodiment, the light source brightness control system 300 includes an electronic device 301 and a light source 302, the electronic device 301 is connected to the light source 302, and the electronic device 301 can implement the following actions: receiving an audio signal, and determining an audio magnitude value corresponding to the audio signal; adjusting the maximum peak value and the minimum peak value of the audio frequency in real time according to the audio frequency quantity value; according to the current maximum audio peak value and the current minimum audio peak value, the brightness parameter corresponding to the audio magnitude value is determined, so as to calculate the brightness value corresponding to the brightness parameter and transmit the brightness value to the light source 302, and the brightness of the light source 302 matches with the brightness parameter. The calculation and conversion process between the audio magnitude and the luminance parameter has been described in detail in the above embodiments, and will not be described herein again.
Optionally, a communication connection 303 may be established between the electronic device 301 and the light source 302, specifically, the communication connection may be a wireless communication connection such as a WI-FI communication connection or a bluetooth communication connection, so that the electronic device 301 and the light source 302 are located in the same local area network, and radio signal transmission between the two is implemented.
Optionally, the electronic device 301 includes an audio collecting device 304, where the audio collecting device 304 may collect audio data information output by the electronic device 301, and the audio collecting device may be a device capable of collecting audio data information, such as a microphone carried by the electronic device 301, and is not limited herein.
The electronic device 301 may be a mobile terminal such as a smart phone, a tablet computer, and a notebook computer, or a terminal device such as a personal digital assistant. It is understood that the electronic device 301 described in this embodiment includes, but is not limited to, the electronic device 301 described in this embodiment, which is capable of establishing the communication connection 303 with the light source 302 and enabling the brightness of the light source 302 to follow the audio rhythm captured by the electronic device 301, and is not limited thereto.
Referring to fig. 4, fig. 4 is a flowchart illustrating an embodiment of a method for controlling brightness of a light source corresponding to the system shown in fig. 3.
S401: the electronic equipment establishes communication connection with the light source;
in this embodiment, the electronic device 301 and the light source 302 establish the communication connection 303 in a wireless communication manner, so that the electronic device 301 and the light source 302 are in the same local area network, and radio signal communication transmission between the electronic device 301 and the light source 302 can be realized, specifically, the electronic device 301 and the light source 302 can log in the same cloud account, so as to ensure that the electronic device 301 can control the light source 302 through an application program and the like installed thereon.
S402: the light source is switched to a music mode;
in this embodiment, the light source 302 switches its state to the music mode, that is, enters a state of waiting for receiving the brightness information transmitted by the electronic device 301, and the brightness of the light output by the light source 302 is not regulated and controlled by itself, but is correspondingly regulated and controlled according to the brightness information transmitted by the electronic device 301.
S403: the electronic equipment starts an audio acquisition device to acquire an audio magnitude;
in this embodiment, the electronic device 301 outputs audio data information, and the audio acquisition device 304 is turned on to acquire the audio data information output by the electronic device 301.
S404: converting the audio magnitude value into a brightness value;
in this embodiment, the electronic device 301 converts the collected audio magnitude value into a brightness value through calculation, where the audio magnitude value represents audio data information output by the electronic device 301, and the brightness value corresponds to brightness of light output by the light source 302, and the calculation and conversion process has been described in detail in the above embodiments, and will not be described again here.
S405: transmitting the luminance value to a light source;
in this embodiment, the electronic device 301 transmits the luminance value obtained by calculation to the light source 302 through the communication connection 303 established between the electronic device 301 and the light source 302, so as to adjust the luminance of the light output by the light source 302 to follow the received luminance value.
S406: the light source outputs light rays with brightness corresponding to the brightness value;
in this embodiment, after the light source 302 receives the luminance value through the communication connection 303 between the light source 302 and the electronic device 301, the light source 302 correspondingly adjusts the luminance of the light output by the light source 302, so that the light output by the light source 302 corresponds to the luminance value, and the luminance of the light output by the light source 302 follows the audio rhythm output by the electronic device 301.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the invention.
In this embodiment, the electronic device 500 includes a processor 501 and an audio capture device 502, where the processor 501 is connected to the audio capture device 502, and the processor 501 can implement the following actions: controlling the audio acquisition device 502 to receive the audio signal and determine an audio magnitude corresponding to the audio signal; adjusting the maximum peak value and the minimum peak value of the audio frequency in real time according to the audio frequency quantity value; and determining a brightness parameter corresponding to the audio magnitude according to the current audio maximum peak value and the audio minimum peak value so as to calculate a brightness value corresponding to the brightness parameter and transmit the brightness value to the light source.
The electronic device 500 may be a mobile terminal such as a smart phone, a tablet computer, and a notebook computer, or a terminal device such as a personal digital assistant. It is understood that the electronic device 500 described in this embodiment includes, but is not limited to, the electronic device 500 described in this embodiment, and any electronic device that can establish a communication connection with the light source and achieve the brightness of the light source to follow the audio rhythm captured by the electronic device 500 can be the electronic device 500 described in this embodiment, and is not limited herein.
In the several embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are illustrative, and for example, the division of the modules or units into one logical functional division may be implemented in practice in another logical functional division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage device and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A method for controlling brightness of a light source, the method comprising:
receiving an audio signal, and determining an audio magnitude value corresponding to the audio signal;
adjusting the maximum peak value and the minimum peak value of the audio frequency in real time according to the audio frequency quantity value;
determining a brightness parameter corresponding to the audio magnitude value according to the current audio maximum peak value and the audio minimum peak value; wherein the brightness of the light source matches the brightness parameter;
the step of determining the brightness parameter corresponding to the audio magnitude value according to the current audio maximum peak value and the audio minimum peak value specifically includes:
calculating a first difference value of the audio magnitude value and the current audio minimum peak value, and calculating a second difference value of the current audio maximum peak value and the audio minimum peak value, wherein the ratio of the first difference value to the second difference value is a conversion ratio; wherein the luminance parameter comprises the conversion ratio;
the matching of the brightness of the light source with the brightness parameter specifically includes: reading the maximum brightness value of the light source, and taking the product of the maximum brightness value and the conversion ratio as a brightness value; wherein the brightness of the light source corresponds to the brightness value;
the step of adjusting the maximum audio peak value and the minimum audio peak value in real time according to the audio magnitude specifically includes:
reading an audio critical low value, and assigning the initial values of the audio maximum peak value and the audio minimum peak value to be equal to the audio critical low value, wherein the audio critical low value defines an audio magnitude value in a mute state;
judging whether the audio magnitude value is smaller than the audio minimum peak value, if so, taking the average value of the audio magnitude value and the current audio minimum peak value and assigning the average value to the audio minimum peak value; if not, then
Judging whether the audio magnitude value is larger than the audio maximum peak value, if so, taking the average value of the audio magnitude value and the current audio maximum peak value and assigning the average value to the audio maximum peak value; if not, then
And taking the average value of the audio magnitude value and the current audio minimum peak value and assigning the average value to the audio minimum peak value, and taking the average value of the audio magnitude value and the current audio maximum peak value and assigning the average value to the audio maximum peak value.
2. The method as claimed in claim 1, wherein the step of adjusting the maximum audio peak value and the minimum audio peak value in real time according to the audio magnitude further comprises:
and judging whether the audio frequency magnitude is smaller than the audio frequency critical low value, and if so, assigning the audio frequency critical low value to the audio frequency magnitude.
3. The method as claimed in claim 2, wherein the step of adjusting the maximum audio peak value and the minimum audio peak value in real time according to the audio magnitude further comprises:
and judging whether the maximum audio peak value is larger than the minimum audio peak value or not, and if not, adaptively increasing the maximum audio peak value until the maximum audio peak value is larger than the minimum audio peak value.
4. The method for controlling the brightness of a light source according to claim 1, wherein the step of determining the brightness parameter corresponding to the audio magnitude value according to the current audio maximum peak value and the audio minimum peak value is followed by the steps of:
judging whether the conversion ratio is lower than a preset ratio low value or not, and if so, assigning the preset ratio low value to the conversion ratio; or
And judging whether the conversion ratio is greater than 1, and if so, assigning the conversion ratio to be 1.
5. The method for controlling brightness of a light source according to claim 1, wherein the step of reading the maximum value of the brightness of the light source and taking the product of the maximum value of the brightness and the conversion ratio as the brightness value is followed by: periodically transmitting the brightness value to the light source by taking a first preset time length as a period; and is
The light output by the light source has multiple colors, and the color of the light output by the light source is periodically changed in a gradual manner by taking a second preset time period as a period.
6. The method of claim 1, wherein the audio magnitude value comprises one of a volume intensity value or a tonal intensity value.
7. An electronic device, comprising a processor and an audio acquisition device, wherein the processor is connected to the audio acquisition device, and the processor is capable of implementing the following actions:
controlling the audio acquisition device to receive an audio signal and determining an audio magnitude value corresponding to the audio signal;
adjusting the maximum peak value and the minimum peak value of the audio frequency in real time according to the audio frequency quantity value;
determining a brightness parameter corresponding to the audio magnitude value according to the current audio maximum peak value and the audio minimum peak value, so as to calculate a brightness value corresponding to the brightness parameter and transmit the brightness value to a light source;
the step of determining the brightness parameter corresponding to the audio magnitude value according to the current audio maximum peak value and the audio minimum peak value specifically includes:
calculating a first difference value of the audio magnitude value and the current audio minimum peak value, and calculating a second difference value of the current audio maximum peak value and the audio minimum peak value, wherein the ratio of the first difference value to the second difference value is a conversion ratio; wherein the luminance parameter comprises the conversion ratio;
the matching of the brightness of the light source with the brightness parameter specifically includes: reading the maximum brightness value of the light source, and taking the product of the maximum brightness value and the conversion ratio as a brightness value; wherein the brightness of the light source corresponds to the brightness value;
the step of adjusting the maximum audio peak value and the minimum audio peak value in real time according to the audio magnitude specifically includes:
reading an audio critical low value, and assigning the initial values of the audio maximum peak value and the audio minimum peak value to be equal to the audio critical low value, wherein the audio critical low value defines an audio magnitude value in a mute state;
judging whether the audio magnitude value is smaller than the audio minimum peak value, if so, taking the average value of the audio magnitude value and the current audio minimum peak value and assigning the average value to the audio minimum peak value; if not, then
Judging whether the audio magnitude value is larger than the audio maximum peak value, if so, taking the average value of the audio magnitude value and the current audio maximum peak value and assigning the average value to the audio maximum peak value; if not, then
And taking the average value of the audio magnitude value and the current audio minimum peak value and assigning the average value to the audio minimum peak value, and taking the average value of the audio magnitude value and the current audio maximum peak value and assigning the average value to the audio maximum peak value.
8. A light source brightness control system, comprising the electronic device of claim 7 and a light source, wherein the light source receives a brightness value transmitted from the electronic device to the light source, and the brightness of the light source corresponds to the brightness value.
CN201810482643.2A 2018-05-18 2018-05-18 Light source brightness control method, system and equipment Active CN108925014B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810482643.2A CN108925014B (en) 2018-05-18 2018-05-18 Light source brightness control method, system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810482643.2A CN108925014B (en) 2018-05-18 2018-05-18 Light source brightness control method, system and equipment

Publications (2)

Publication Number Publication Date
CN108925014A CN108925014A (en) 2018-11-30
CN108925014B true CN108925014B (en) 2020-05-08

Family

ID=64404311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810482643.2A Active CN108925014B (en) 2018-05-18 2018-05-18 Light source brightness control method, system and equipment

Country Status (1)

Country Link
CN (1) CN108925014B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4297014A1 (en) * 2022-06-22 2023-12-27 Casio Computer Co., Ltd. Indicator device, electronic musical instrument, light emission control method and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112261767A (en) * 2020-10-23 2021-01-22 深圳市智岩科技有限公司 Method, device and system for controlling lamp effect and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104811538A (en) * 2015-03-26 2015-07-29 努比亚技术有限公司 Audio-based breathing lamp control method and device
CN105224279A (en) * 2015-09-21 2016-01-06 福州瑞芯微电子股份有限公司 A kind of audio output control method, control system and electronic equipment
WO2016174510A1 (en) * 2015-04-30 2016-11-03 Yandex Europe Ag Method of controlling a display of an electronic device and device implementing same
CN107889324A (en) * 2017-10-27 2018-04-06 广东小天才科技有限公司 Light adjusting method and device, audio playing equipment and storage medium
CN108282922A (en) * 2018-02-13 2018-07-13 上海艾为电子技术股份有限公司 A kind of audio sound phototiming lamp effect dynamic Enhancement Method and device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8050419B2 (en) * 2008-03-31 2011-11-01 General Motors Llc Adaptive initial volume settings for a vehicle audio system
JP4797215B2 (en) * 2010-02-26 2011-10-19 オンキヨー株式会社 Volume control system
CN103475975A (en) * 2012-06-06 2013-12-25 天津三星电子有限公司 Audio processing device
CN103793010A (en) * 2014-02-28 2014-05-14 苏州三星电子电脑有限公司 Multi-media playing device dynamically varying outer shell color along with rhythm and control method of multi-media playing device
CN103929140A (en) * 2014-04-30 2014-07-16 深圳市中兴移动通信有限公司 Method and device for pre-processing voice frequency
US9398670B2 (en) * 2014-07-03 2016-07-19 Michael Kidakarn Remotely controlled holiday lighting and sound system
CN104219849A (en) * 2014-09-16 2014-12-17 深圳市华海技术有限公司 Method and device for controlling light-emitting equipment on basis of audio signal
CN107122156A (en) * 2017-03-09 2017-09-01 深圳市金立通信设备有限公司 A kind of method for controlling volume and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104811538A (en) * 2015-03-26 2015-07-29 努比亚技术有限公司 Audio-based breathing lamp control method and device
WO2016174510A1 (en) * 2015-04-30 2016-11-03 Yandex Europe Ag Method of controlling a display of an electronic device and device implementing same
CN105224279A (en) * 2015-09-21 2016-01-06 福州瑞芯微电子股份有限公司 A kind of audio output control method, control system and electronic equipment
CN107889324A (en) * 2017-10-27 2018-04-06 广东小天才科技有限公司 Light adjusting method and device, audio playing equipment and storage medium
CN108282922A (en) * 2018-02-13 2018-07-13 上海艾为电子技术股份有限公司 A kind of audio sound phototiming lamp effect dynamic Enhancement Method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4297014A1 (en) * 2022-06-22 2023-12-27 Casio Computer Co., Ltd. Indicator device, electronic musical instrument, light emission control method and storage medium

Also Published As

Publication number Publication date
CN108925014A (en) 2018-11-30

Similar Documents

Publication Publication Date Title
CN107705778B (en) Audio processing method, device, storage medium and terminal
CN109658942B (en) Audio data processing method and device and related equipment
CN109274909B (en) Television sound adjusting method, television and storage medium
CN105551517B (en) It is a kind of to be wirelessly transferred recording pen and recording system with application scenarios identification control
CN103915103A (en) Voice quality enhancement system
CN108925014B (en) Light source brightness control method, system and equipment
CN110062309B (en) Method and device for controlling intelligent loudspeaker box
CN105578640A (en) Audio-based lamp control system and device and control method and application thereof
CN112270913B (en) Pitch adjusting method and device and computer storage medium
CN110875045A (en) Voice recognition method, intelligent device and intelligent television
CN111554317A (en) Voice broadcasting method, device, computer storage medium and system
TW202018493A (en) Systems and methods for generating haptic output for enhanced user experience
CN203689892U (en) Sightsinging place special-purpose personal audio frequency data adjusting apparatus
CN112055279A (en) Earphone noise reduction method and device, earphone and medium
CN108566706A (en) flash lamp control method, device, terminal device and storage medium
CN113424558A (en) Intelligent personal assistant
CN112331195A (en) Voice interaction method, device and system
CN116980804B (en) Volume adjustment method, device, equipment and readable storage medium
CN104464746A (en) Voice filtering method and device and electron equipment
CN117544262A (en) Dynamic control method, device, equipment and storage medium for directional broadcasting
CN111739496B (en) Audio processing method, device and storage medium
CN112133320B (en) Speech processing apparatus and speech processing method
CN113035174A (en) Voice recognition processing method, device, equipment and system
CN112201239B (en) Determination method and device of target equipment, storage medium and electronic device
US20180254056A1 (en) Sounding device, audio transmission system, and audio analysis method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant