CN101043772A - Method and apparatus for controlling LED indicating lamp - Google Patents

Method and apparatus for controlling LED indicating lamp Download PDF

Info

Publication number
CN101043772A
CN101043772A CN200710065267.9A CN200710065267A CN101043772A CN 101043772 A CN101043772 A CN 101043772A CN 200710065267 A CN200710065267 A CN 200710065267A CN 101043772 A CN101043772 A CN 101043772A
Authority
CN
China
Prior art keywords
data
group
control signal
pcm data
comparative result
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.)
Granted
Application number
CN200710065267.9A
Other languages
Chinese (zh)
Other versions
CN100508677C (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.)
Vimicro Corp
Original Assignee
Vimicro Corp
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 Vimicro Corp filed Critical Vimicro Corp
Priority to CNB2007100652679A priority Critical patent/CN100508677C/en
Publication of CN101043772A publication Critical patent/CN101043772A/en
Application granted granted Critical
Publication of CN100508677C publication Critical patent/CN100508677C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The disclosed control method for LED indicating lamp comprises: pre-setting the comparison threshold for audio file; obtaining the PCM data of decoded audio file, setting Eigenvalue for every PCM data for their audio characteristics; comparing the threshold with the Eigenvalue of every PCM data, and outputting the control signal according to the compared result. This invention can control the LED indicating lamp synchronous flashing with displayed audio data.

Description

A kind of control method of LED light and device
Technical field
The present invention relates to control technology, particularly a kind of control method of LED light and device.
Background technology
All have LED light existing in such as handheld devices such as mobile phones, when the handheld device playing audio-fequency data, LED light can be glimmered rhythmically.At present, in this class embedded audio playback system, the Synchronization Control LED light generally has following two kinds with the method for audio waveform data (MP3, WMA, compression audio coding form or non-compressed audio coded formats such as WAVE) music rhythm flicker.
One, after the Wave data music began to play, the system start-up timer interrupted, and the control information that adds LED light in timer Interrupt Process function makes regularly light on and off of LED light.The advantage of this mode is that control is simple, is easy to realize the control of evenly glimmering of LED shades of colour; Shortcoming is, because the control information in the Interrupt Process function is constant all the time, so LED can not glimmer with the waveform music synchronously all the time according to a kind of rhythm flicker, needs extra system timer Interrupt Process simultaneously, occupying system resources.
Two, by detecting voice data, the control information of output LED light utilizes the flicker of this information Control LED light.Wherein, utilize the pulse code modulation (pcm) data of decoding output as the voice data that is used to detect.Fig. 1 is the specific implementation method flow diagram of existing control LED lamp flicker.As shown in Figure 1, this method comprises:
Step 101 sets in advance a comparison threshold.
Step 102, each PCM data and comparison threshold that decoding is exported compare.
Step 103 is according to the comparative result output control signal of step 102, the flicker of control LED light.
When adopting aforesaid way to carry out LED light control, owing to need compare each PCM data and comparison threshold, so the sample rate of its comparison frequency that compares and PCM data is identical.Since can be a lot of by one section sampled voice point of ear recognition, therefore, general embedded audio playback system all can adopt higher sample rate, and sample rate is high more, and the reduction effect of sound (being auditory effect) is good more.Such as a sample rate is that the voice data of 150 milliseconds of length of 44.1KHz is made up of more than 6000 sampled points.Correspondingly, the comparison frequency that compares also can be than higher.Like this, will produce following problem:
1, because the comparison frequency that compares is very high, therefore higher for the performance requirement of hardware device, comparatively speaking, cost just can increase.
2, control information and the comparison frequency owing to output adapts, when voice data changes when very fast, that is to say, the control information of output changes very fast, correspondingly, the frequency of LED light flicker also can be very fast, because the vision of human eye stops effect, when the frequency of LED light flicker reach a certain height, human eye can't be distinguished its flicker at all.In addition, at present LED light normally is connected between the collector electrode and emitter-base bandgap grading of triode, and when control information changes very soon, promptly triode is very short conduction time, the brightness of LED light also can be a little less than.The decline that like this, all can bring human eye vision to experience.
3, owing to be the sampled data that promptly will play that in original Play System, extracts relatively, therefore after a series of processing of glimmering according to control signal through comparison process, output control signal, LED lamp, the LED light flicker effect of presenting to human eye must lag behind the broadcast of voice data, make synchronous effect not ideal enough, especially change when very fast for the amplitude of voice data, the sensation of human eye is more obvious.
Summary of the invention
In view of this, the invention provides a kind of control method and device of LED light, for the user brings better visual experience.
For achieving the above object, the present invention adopts following technical scheme:
A kind of control method of LED light comprises:
Set in advance the comparison threshold of audio file;
The pulse code modulation PCM data of audio file decoding output are obtained in grouping, and characterize the characteristic value of this group PCM data acoustic characteristic for every group of PCM data relative set;
The characteristic value of comparison threshold and every group of PCM data compared obtain comparative result, produce and the control signal of output LED light according to this comparative result.
Preferably, comprise identical data volume in described every group of PCM data.
Preferably, described grouping is obtained the PCM data and is: when current group of PCM data are carried out playback process, obtain next group PCM data.
Preferably, before the control signal of output LED light, this method further comprises: receive the PCM data are carried out the clock signal of fetching data before the playback process, and the data volume that comprises according to every group of PCM data is carried out frequency division to the clock signal that receives and handled and obtain sub-frequency clock signal;
The control signal of described output LED light is: the control signal of output LED light under the control of described sub-frequency clock signal.
Preferably, the described characteristic value that characterizes every group of PCM data acoustic characteristic that is provided with is:
For every group of PCM data take absolute value, and calculate mean value after this group PCM data take absolute value, with the characteristic value of this mean value as these group data.
Preferably, described characteristic value with comparison threshold and every group of PCM data compares and obtains comparative result and be: the characteristic value of comparison threshold and current group of PCM data is directly relatively obtained described comparative result.
Preferably, described characteristic value with comparison threshold and every group of PCM data compares and obtains comparative result and be: characteristic value poor that obtains last with it group of PCM data of characteristic value of current group of PCM data, this difference and comparison threshold are compared, obtain described comparative result.
Preferably, described control signal according to comparative result generation LED light is:
Set in advance the different comparative results and the corresponding relation of control signal;
According to comparative result,, produce control signal with reference to the corresponding relation of described comparative result and control signal.
Preferably, the described corresponding relation that is provided with is:
The span of comparative result is divided into N interval, for control signal is provided with the different values of N kind;
Set up the corresponding relation of N interval and control signal N kind value.
Preferably, described control signal according to comparative result generation LED light is:
Set in advance the corresponding relation whether different comparative results and control signal change; According to the control signal of last group of PCM data correspondence of comparative result and current group of PCM data,, produce the control signal of current group of PCM data correspondence with reference to the corresponding relation that sets in advance;
After producing described control signal, this method further comprises: the characteristic value and the corresponding control signal that write down current group of PCM data.
Preferably, when described current group of PCM data were first group of PCM data obtaining, the characteristic value of described last group of PCM data was the reference value that sets in advance;
The control signal of described last group of PCM data correspondence is the control signal of the reference value correspondence that sets in advance.
Preferably, the described comparison threshold that audio file is set is:
Set up the frequecy characteristic of different audio files and the corresponding relation of comparison threshold in advance; Determine the frequecy characteristic of audio file, and with reference to described correspondence setting comparison threshold;
Perhaps, for different audio files identical comparison threshold is set.
A kind of control device of LED light comprises: data pre-storage module, data processing module, data comparison module and output control module;
Described data pre-storage module is used to divide into groups to obtain the PCM data of audio file decoding output, and every group of PCM data are imported described data processing module successively;
Described data processing module is used to the every group of PCM data relative set that receives to characterize the characteristic value of this group PCM data acoustic characteristic, and the characteristic value that is provided with is sent to described data comparison module;
Data comparison module is used to set in advance the comparison threshold of audio file, receives the characteristic value that described data processing module sends, and the characteristic value of every group of PCM data and the comparison threshold of setting are compared, to described output control module transmission comparative result;
Described output control module is used for the control signal according to comparative result generation that receives and output LED light.
Preferably, described data pre-storage module is used for when audio system is carried out playback process to current group of PCM data, obtains next group PCM data.
Preferably, described output control module comprises control signal unit and clock unit;
Described control signal unit is used to write down the different comparative results and the corresponding relation of control signal; According to the comparative result that receives, the corresponding relation of reference record produces the control signal of a LED light, and under the control of described clock unit output clock, exports the control signal that produces;
Described clock unit, be used to receive voice data is carried out the clock signal of fetching data before the playback process, and the data volume that this clock signal is comprised according to every group of PCM data is carried out frequency division handle, obtain sub-frequency clock signal, this sub-frequency clock signal is sent to the control signal unit.
Preferably, described data processing module comprises absolute value element and equal value cell,
Described absolute value element is used to receive every group of PCM data that described data pre-storage module sends, and these group data is taken absolute value, and the result is sent to described equal value cell;
Described equal value cell is used to receive the data that described absolute value element sends, and gets the average of these group data, and its characteristic value as this group PCM data is sent to described data comparison module.
As seen from the above technical solution, among the present invention, at first the PCM data of audio file decoding output are obtained in grouping, and be the characteristic value that every group of PCM data relative set characterizes this group data sound property, this characteristic value and the comparison threshold of presetting are compared, produce the control signal of LED light according to this comparative result.In said process, owing to obtain one group of PCM data at every turn, and these group data once relatively produce a control signal with the comparison threshold of presetting, like this, the comparison frequency of signal, just the output frequency of control signal just must be lower than the sample rate of PCM data, reduced requirement, also be more suitable for the variation of eye-observation LED light, can bring better visual experience for the user to hardware performance.Simultaneously, the characteristic value that is used for comparison has been represented the sound property of these group data, can mate the experience of the sense of hearing and vision better.
Further, the present invention can be when carrying out playback process to any one group of PCM data, and the sampling time of one group of PCM data is obtained next group PCM data in advance, thereby avoids owing to carry out the hysteresis that data processing is brought in voice playing; And can before the control signal of output LED light, further receive the PCM data and carry out the clock signal of fetching data before the playback process, and the data volume that this clock signal comprises according to every group of PCM data is carried out frequency division handle, obtain sub-frequency clock signal; Then, under the control of this sub-frequency clock signal, export the control signal of the LED light corresponding with these PCM data.Realized the synchronous flicker of LED light and music rhythm like this, better.
Description of drawings
Fig. 1 is the particular flow sheet of existing LED light control method.
Fig. 2 is the control method overview flow chart of LED light among the present invention.
Fig. 3 is the control device overall construction drawing of LED light provided by the invention.
Fig. 4 is the particular flow sheet of LED light control method in the embodiment of the invention.
Fig. 5 is original PCM data waveform.
The characteristic value data waveform that Fig. 6 forms for the processing through the embodiment of the invention.
Fig. 7 is the annexation schematic diagram of miscellaneous equipment in LED light control device and the embedded audio playback system in the embodiment of the invention.
Embodiment
For making purpose of the present invention, technological means and advantage clearer, the specific embodiment of the present invention is described below in conjunction with the accompanying drawing embodiment that develops simultaneously.
Basic thought of the present invention is: when producing the control information of LED light according to voice data, reduce the frequency of this control information, thereby the flicker frequency of control LED light, and, guarantee the synchronous flicker of LED light and voice data by control to the output control signal.
Fig. 2 is the control method overview flow chart of LED light among the present invention.As shown in Figure 2, this method comprises:
Step 201 sets in advance the comparison threshold of audio file.
Step 202, grouping are obtained the PCM data of audio file decoding output, and characterize the characteristic value of this group PCM data acoustic characteristic for every group of PCM data relative set.
In this step, grouping is when obtaining the PCM data, and the data volume that every group of PCM data comprise is at least 2 PCM data.
Step 203 compares comparison threshold and characteristic value, produces and export the control signal of LED light according to comparative result.
So far, the control method overall procedure of LED light provided by the invention finishes.
Fig. 3 is the control device overall construction drawing of LED light provided by the invention.This device can be used to implement above-mentioned method shown in Figure 2.As shown in Figure 3, this device comprises: data pre-storage module, data processing module, data comparison module and output control module.
In this device, the data pre-storage module is used to divide into groups to obtain the PCM data of audio file decoding output, and every group of PCM data are imported data processing module successively.
Data processing module is used to the every group of data relative set that receives to characterize the characteristic value of this group data sound property, and this characteristic value is sent to data comparison module.
Data comparison module is used to set in advance the comparison threshold of audio file, receives the characteristic value that described data processing module sends, and the comparison threshold of this characteristic value and setting is compared, and sends to comparative result to output control module.
Output control module is used for producing and exporting according to the comparative result that receives the control signal of a LED light.
By as can be seen above-mentioned, utilize method and apparatus of the present invention, can reduce the comparison frequency of sampled data and comparison threshold, hardware requirement is reduced; Simultaneously, because the reduction of comparison frequency makes the control signal corresponding output frequency also decrease, be more suitable for observation, for the user brings better visual experience in human eye.
More than be the overview of control LED light method and apparatus provided by the invention, below by specific embodiment explanation the specific embodiment of the present invention.
Embodiment:
In the present embodiment, be example to play certain audio file A, the concrete grammar of control LED light is described.
Fig. 4 is the particular flow sheet of LED light control method in the embodiment of the invention.As shown in Figure 4, this method comprises:
Step 401 sets in advance the comparison threshold of audio file.
In this step, the comparison threshold when output LED light control signal being set for audio file A.Can dispose different methods to set up for different systems.
The most simply, a fixing comparison threshold is set in system, all adopts this comparison threshold to compare for all audio files; Such mode realizes simply, but can not adjust comparison threshold for different audio files, changes audio file faster for amplitude, and the visual experience that obtains is a bit weaker.
Perhaps, can also comparison threshold be set, so different comparison thresholds can be set for different audio files, to adapt to various types of audio files according to the characteristic of audio file A.Particularly, in system, set up the rhythm characteristic of audio file and the corresponding relation of comparison threshold in advance; Then, determine the rhythm characteristic of audio file A by modes such as user's inputs, and with reference to the correspondence setting comparison threshold of setting up.When setting up corresponding relation, for rhythm audio file faster, it is higher slightly that the comparison threshold corresponding with it can be provided with, and can avoid the variation of control signal fast especially like this, and human eye can't be differentiated; For the slower audio file of rhythm, it is low slightly that the comparison threshold corresponding with it can be provided with, and can accelerate the change frequency of control signal like this, avoids LED light to be in a kind of state for a long time.
Step 402 is obtained one group of PCM data in the PCM data of exporting of decoding.
In this step, can select according to the user, the sampled data output that comprises in one group of PCM data is set, for example 32,64 or 128 etc. again according to the sampled data output of this setting, obtain PCM data with this sampled data output equivalent as one group.In fact, for the audio file of a broadcast, after the PCM data of all decoding outputs all are acquired by the way when it, promptly realized purpose to numbers such as the PCM grouping of decoding output.
For realizing better synchronous effect, when every group of PCM data were carried out playback process, the follow-up PCM data of this group PCM data were obtained in grouping in advance.In the present embodiment, this playback process is specially carries out analog-to-digital conversion to pci data.Data volume of obtaining in advance and time are all depended on every group of data volume that comprises.Particularly, the data volume of obtaining in advance is one group of PCM data; Time in advance is at least the sampling time of one group of PCM data.Like this, just can guarantee during the broadcast of one group of PCM data, produce the control signal of next group PCM data correspondence, avoid in voice playing, carrying out the hysteresis that data processing is brought.
Step 403 is provided with the characteristic value that characterizes this group data sound property for one group of PCM data obtaining.
In this step, one group of PCM data obtaining are carried out preliminary treatment, obtain the characteristic value of these group data.Concrete pretreatment mode can for:
For the PCM data in this group take absolute value, the sampled point below the 0db is turned to more than the 0db, amplitude is constant, like this for the precision of sampled data without any loss; Result data after will taking absolute value is then averaged, and with the characteristic value of this mean value as these group data, it has represented the average tendency in this section sampled data in the time.
For original PCM data waveform as shown in Figure 5, its each grouped data has formed characteristic value data waveform as shown in Figure 6 after carrying out preliminary treatment through this step.As can be seen, be exactly the simple envelope of former data waveform through pretreated data waveform, represent the overall trend of former PCM data.And, because it is limited that people's ear can be differentiated the frequency of sound, data for some high frequencies, people's basal part of the ear originally be can't hear, the characteristic value of using the aforesaid way acquisition meets the characteristics of audio signal most, can play the effect of burr in the filtering audio signal, can play the effect of filtering, make the control signal that produces more meet the characteristic of people's sound that ear is heard.
Certainly, the one of ordinary skilled in the art also can expect, also has the multiple method of obtaining the characteristic value that characterizes sound property in the prior art.As, also can adopt common envelope, the line that peak obtained of the positive direction of original PCM data waveform vibration is envelope in the connection layout 5, because this envelope also can reflect sound characteristic substantially, therefore also can be used for this step obtains characteristic value.
Step 404 compares the characteristic value of current group of PCM data and the comparison threshold of setting, produces the control signal of a LED light according to comparative result.
In this step, comparative feature value and comparison threshold and the mode that produces control signal can have two kinds: absolute manner of comparison and difference manner of comparison.
One, absolute manner of comparison.
In this mode, characteristic value and comparison threshold carry out more specificly is: calculate the two difference or ratio, with its result as a comparison, and produce control signal on this basis.
When producing control signal, a comparative result produces a control signal, thereby guarantees that one group of data obtains a control signal, reduces the frequency of output control signal, adapting to the characteristic of human eye, and reduces the configuration requirement to hardware.
According to comparative result produce control signal mode can for: set in advance the different comparative results and the corresponding relation of different control signals; According to comparative result,, produce control signal with reference to the corresponding relation of comparative result and control signal.When corresponding relation is set, at first determine the control signal number of types N that system can export, span with comparative result is divided into N interval then, N interval is corresponding one by one with N control signal, and then this corresponding relation is the corresponding relation of comparative result and corresponding control signal.When producing control signal, determine that at first which of N interval comparative result be arranged in, then with reference to the corresponding relation that is provided with, determine the control signal of this interval correspondence, then this control signal is the control signal of corresponding this group data.For example, can produce four kinds of control signals in the system, be respectively 00,01,10,11; Comparative result is divided into four intervals, i.e. (∞ ,-3db), (3db, 0db), (0db, 3db), (3db ,+∞); The corresponding relation of setting up is as follows:
Comparative result (-∞,-3db〕 (-3db,0db〕 (0db,3db〕 (3db,+∞)
Control signal 00 01 10 11
Table 1
After obtaining comparative result, determine the control signal of generation with reference to the corresponding relation shown in the table 1.
By said process as seen, in absolute manner of comparison, the control signal of any one group of PCM data correspondence is only relevant with these group data itself, and is irrelevant with other group PCM data and its corresponding control signal; Under this mode, can produce control signal in addition more than two kinds.
Two, difference manner of comparison.
In this mode, comparison threshold and characteristic value compare and are specially: characteristic value poor that obtains last with it group of PCM data of characteristic value of current group of PCM data, this difference and comparison threshold are compared, with the two comparative result as the reference that produces control signal.
When producing control signal, be that a comparative result produces a control signal equally, thereby guarantee that one group of data obtains a control signal.
Producing control signal according to comparative result is specially: set in advance the corresponding relation whether different comparative results and control signal change; According to the control signal of comparative result and last group of PCM data correspondence,, produce the control signal of current group of PCM data correspondence with reference to the corresponding relation that sets in advance; And after producing control signal, further write down the characteristic value and the corresponding control signal of current group of PCM data.Wherein, when current group of PCM data are first group of PCM data, the characteristic value of last group of PCM data is made as the reference value that sets in advance; The control signal of last group of PCM data correspondence is made as the control signal of the reference value correspondence that sets in advance.
Utilize the difference manner of comparison to produce the specific implementation of any one group of PCM data institute corresponding control signal with a concrete example explanation below.Suppose the control signal that has set in advance reference value and reference value correspondence, and set up the corresponding relation that as shown in table 2 being used to produces control signal.
Comparative result Difference is less than or equal to comparison threshold Difference is greater than comparison threshold
Whether control signal changes Constant Change
Table 2
Step 404a judges whether current group of PCM data are first group of PCM data, if, execution in step 404b then, otherwise execution in step 404c;
Step 404b calculates the difference of current group of PCM data feature values and reference value, jumps to step 404d;
Step 404c calculates characteristic value poor of last with it group of PCM data of characteristic value of current group of PCM data, execution in step 404e;
Step 404d with the difference and the comparison threshold comparison of gained, and according to comparative result and the pairing control signal of reference value, produces also output synchronous control signal, execution in step 404f then.
Wherein, when comparative result is that the difference of gained is greater than by the predefined comparison threshold of user the time, exporting the control signal opposite control signal corresponding with reference value, is low level as the control signal of reference value correspondence, and the control signal that then produces and export is a high level; Otherwise the current control signal that will export is set to the pairing control signal of reference value, is low level as the pairing control signal of reference value, then produces the also control signal of output low level.
Step 404e with the difference of gained and comparison threshold relatively, and according to the control signal of comparative result and last group of PCM data correspondence, produces also output synchronous control signal, execution in step 404f then.
Wherein, according to aforesaid table 2 as can be known, when the comparison threshold that this difference is set greater than the user, then output and the last group of opposite control signal of the pairing control signal of PCM data; Otherwise will export and the last group of identical control signal of control signal that the PCM data are corresponding, promptly the retentive control signal is constant.
Step 404f saves as the characteristic value of last group of PCM data with the characteristic value of current group of PCM data, and the control signal of current group of PCM data correspondence is saved as the last group of pairing control signal of PCM data.
By said process as seen, in the difference manner of comparison, the control signal of generation is not only relevant with current group of PCM data itself, and is also relevant with corresponding control signal with its last group of PCM data, can reflect the variation of data better.But under this mode, the control signal of generation only is two kinds.
Certainly, it will be understood by those skilled in the art that the producing method of the producing method of comparative result in above-mentioned two kinds of manner of comparison and control signal can combination in any, thereby produce the control signal of current group of PCM data correspondence.Particularly, the mode that both can utilize comparison threshold and current group of PCM data feature values directly to compare produces comparative result, and the control signal of corresponding relation shown in the associative list 2 and last group of PCM data correspondence produces the control signal of current group of PCM data correspondence; Perhaps, also can utilize the difference of two adjacent groups PCM data feature values and mode that comparison threshold compares to produce comparative result, and the corresponding relation shown in the associative list 1 produce the control signal of current group of PCM data correspondence.
By above-mentioned several modes, promptly can produce the control signal of current group of PCM data correspondence according to characteristic value and comparison threshold.
Step 405, according to the playing progress rate of voice data, the control signal that produces in the output step 404.
In this step,, when the output control signal, export according to the playing progress rate of voice data for the music that realizes LED light and broadcast is glimmered synchronously.Particularly, playback process in the present embodiment is for to carry out analog-to-digital conversion to the PCM data as previously mentioned, therefore can will carry out the reference clock of clock that fetch data before the analog-to-digital conversion to the PCM data in the system as the output control signal, the data volume that comprises according to every group of PCM data, reference clock is carried out the frequency division processing obtain frequency-dividing clock, and export the control signal that produces according to this frequency-dividing clock.For example, when obtaining the PCM data, with 32 PCM data is one group, then when reference clock is carried out frequency division, carry out 32 frequency divisions, make and play per 32 PCM data and promptly export 1 control signal, so just can reach the output of analog-to-digital conversion and control signal synchronously, synchronous with final realization audio signal of hearing and the LED light flicker of seeing.
According to aforesaid way, can guarantee to obtain the clock synchronization that voice data carries out analog-to-digital clock and output control signal, can realize that therefore the flicker of the broadcast of audio signal and LED light is synchronous.
So far, the generation and the output of one group of PCM data corresponding control signal have just been finished.
Step 406 is returned step 402, plays up to current audio file A and finishes.
Above-mentioned steps 402 to 405 is carried out in circulation, produces and export the control signal of follow-up every group of PCM data correspondence, can realize that just the broadcast of LED light and voice data is glimmered synchronously.
The above-mentioned control method embodiment that is LED light in the embodiment of the invention.The embodiment of the invention also provides the device of control LED light, can be applied in the present embedded audio playback system, and in the present embodiment, the embedded audio playback system selects for use DAC to finish the playback process of PCM data, is specially the analog-to-digital conversion operation.Fig. 7 is the annexation schematic diagram of miscellaneous equipment in LED light control device that present embodiment provides and the embedded audio playback system.Control device among Fig. 7 is the control device of LED light in the embodiment of the invention, is a kind of embodiment of device shown in Figure 3.
As shown in Figure 7, decoder, control device and analog to digital converter (DAC) order links to each other.Wherein, possess in all original embedded audio playback of decoder and the DAC Play System.Concrete control device comprises: data pre-storage module, data processing module, data comparison module and output control module.Wherein, data processing module comprises absolute value element and equal value cell, and output control module comprises control signal unit and clock unit.
In system shown in Figure 5, decoder is used for audio file is decoded, and preserves decoded PCM data.
Data pre-storage module in the control device is used to divide into groups to obtain the PCM data of decoder output, and every group of PCM data are imported described data processing module successively.For obtaining preferable synchronous effect, when the data pre-storage module was obtained the PCM data in grouping, the process that can handle the PCM data with respect to DAC in advance one group of PCM data sampling time, was obtained one group of PCM data.Like this, promptly can avoid in voice playing, carrying out the hysteresis that data processing is brought.
DAC is used for obtaining the PCM data row cache of going forward side by side from decoder, obtains data in buffer according to clock and carries out output audio signal after the analog-to-digital conversion, and clock signal is sent to clock unit in the output control module.
Data processing module is used to the every group of data relative set that receives to characterize the characteristic value of this group data sound property, and the characteristic value that is provided with is sent to data comparison module.Particularly, in the present embodiment, data processing module comprises absolute value element and equal value cell.Wherein, absolute value element is used to receive every group of PCM data that the data pre-storage module sends, and these group data is taken absolute value, and the result is sent to equal value cell; All value cell is used to receive the data that absolute value element sends, and gets the average of these group data, and it is sent to data comparison module as characteristic value.The structure of data processing module can guarantee that the characteristic value that obtains therein reflects the average tendency of these group data in the present embodiment, make all characteristic values of whole audio file constitute the simple envelope of original audio file, adapt to the characteristic of audio signal and people's ear perceptibility well voice signal.
Data comparison module is used to set in advance comparison threshold, receives the characteristic value that data processing module sends, and the comparison threshold of this characteristic value and setting is compared, and sends to comparative result to output control module.Particularly, can carry out subtraction and division arithmetic to characteristic value and comparison threshold according to setting in advance, to obtain the comparative result of the two.
Output control module is used for producing control signal according to the comparative result that receives, and controls the synchronous output of this control signal.Particularly, in the present embodiment, output control module comprises control signal unit and clock unit.Wherein, the control signal unit is used to write down the different comparative results and the corresponding relation of control signal; According to the comparative result that receives, the corresponding relation of reference record produces the control signal of a LED light, and under the control of clock unit output clock, exports the control signal that produces.The corresponding relation of physical record is: relation one to one between the different values of N kind of the N of a comparative result span interval and control signal.Clock unit is used to receive the clock signal that DAC sends, and according to every group of data volume that the PCM data are included, this clock signal is carried out the frequency division processing obtain sub-frequency clock signal, and this sub-frequency clock signal is sent to the control signal unit.
In the present embodiment, because DAC obtains the clock synchronization that voice data carries out output control signal in analog-to-digital clock and the output control module, the broadcast that therefore can guarantee audio signal is synchronous with the flicker of LED light, and the flicker of the music heard of user and the LED light seen just promptly can realize synchronously.
When the above-mentioned concrete structure that is LED light control device in the embodiment of the invention and this device are applied in the system and the annexation of miscellaneous equipment.In said apparatus, describe the function of each module and the composition of data processing module in detail, certainly, also can adopt other data processing module of forming structure, as long as can produce the characteristic value of representing this group characteristics of signals.
By as can be seen above-mentioned, the present invention can produce the control signal of the lower LED light of output frequency, and, can guarantee that the broadcast of the flicker of LED light of its control and voice data is synchronous.Further, the characteristic value of utilizing the method for the foregoing description to produce can be mated the characteristic of audio signal and the people's ear perceptibility to audio signal better, thereby can make people's the sense of hearing and visual experience mate better.
The control signal of using the present invention's generation can be directly as the control signal of certain LED light, and for example, when control signal was two kinds, wherein a kind of was the high level indication, and another kind of is the low level indication; This control signal can also be as the input signal of LED light control circuit, the flicker of a plurality of LED light of Comprehensive Control, for example, at Granted publication number is in the utility model of CN 2640192Y, a kind of LED indicating device that is used for music equipment is disclosed, with using the input signal of the control signal of the present invention's generation, promptly can realize Comprehensive Control to a plurality of LED light as this LED indicating device.
Being preferred embodiment of the present invention only below, is not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (16)

1, a kind of control method of LED light is characterized in that, this method comprises:
Set in advance the comparison threshold of audio file;
The pulse code modulation PCM data of audio file decoding output are obtained in grouping, and characterize the characteristic value of this group PCM data acoustic characteristic for every group of PCM data relative set;
The characteristic value of comparison threshold and every group of PCM data compared obtain comparative result, produce and the control signal of output LED light according to this comparative result.
2, method according to claim 1 is characterized in that, comprises identical data volume in described every group of PCM data.
3, method according to claim 1 is characterized in that, described grouping is obtained the PCM data and is: when current group of PCM data are carried out playback process, obtain next group PCM data.
4, method according to claim 1, it is characterized in that, before the control signal of output LED light, this method further comprises: receive the PCM data are carried out the clock signal of fetching data before the playback process, and the data volume that comprises according to every group of PCM data is carried out frequency division to the clock signal that receives and handled and obtain sub-frequency clock signal;
The control signal of described output LED light is: the control signal of output LED light under the control of described sub-frequency clock signal.
5, method according to claim 1 is characterized in that, the described characteristic value that characterizes every group of PCM data acoustic characteristic that is provided with is:
For every group of PCM data take absolute value, and calculate mean value after this group PCM data take absolute value, with the characteristic value of this mean value as these group data.
6, method according to claim 1, it is characterized in that described characteristic value with comparison threshold and every group of PCM data compares and obtains comparative result and be: the characteristic value of comparison threshold and current group of PCM data is directly relatively obtained described comparative result.
7, method according to claim 1, it is characterized in that, described characteristic value with comparison threshold and every group of PCM data compares and obtains comparative result and be: characteristic value poor that obtains last with it group of PCM data of characteristic value of current group of PCM data, this difference and comparison threshold are compared, obtain described comparative result.
According to claim 6 or 7 described methods, it is characterized in that 8, described control signal according to comparative result generation LED light is:
Set in advance the different comparative results and the corresponding relation of control signal;
According to comparative result,, produce control signal with reference to the corresponding relation of described comparative result and control signal.
9, method according to claim 8 is characterized in that, the described corresponding relation that is provided with is:
The span of comparative result is divided into N interval, for control signal is provided with the different values of N kind;
Set up the corresponding relation of N interval and control signal N kind value.
According to claim 6 or 7 described methods, it is characterized in that 10, described control signal according to comparative result generation LED light is:
Set in advance the corresponding relation whether different comparative results and control signal change; According to the control signal of last group of PCM data correspondence of comparative result and current group of PCM data,, produce the control signal of current group of PCM data correspondence with reference to the corresponding relation that sets in advance;
After producing described control signal, this method further comprises: the characteristic value and the corresponding control signal that write down current group of PCM data.
11, method according to claim 10 is characterized in that, when described current group of PCM data were first group of PCM data obtaining, the characteristic value of described last group of PCM data was the reference value that sets in advance;
The control signal of described last group of PCM data correspondence is the control signal of the reference value correspondence that sets in advance.
According to arbitrary described method in the claim 1 to 11, it is characterized in that 12, the described comparison threshold that audio file is set is:
Set up the frequecy characteristic of different audio files and the corresponding relation of comparison threshold in advance; Determine the frequecy characteristic of audio file, and with reference to described correspondence setting comparison threshold;
Perhaps, for different audio files identical comparison threshold is set.
13, a kind of control device of LED light is characterized in that, this device comprises: data pre-storage module, data processing module, data comparison module and output control module;
Described data pre-storage module is used to divide into groups to obtain the PCM data of audio file decoding output, and every group of PCM data are imported described data processing module successively;
Described data processing module is used to the every group of PCM data relative set that receives to characterize the characteristic value of this group PCM data acoustic characteristic, and the characteristic value that is provided with is sent to described data comparison module;
Data comparison module is used to set in advance the comparison threshold of audio file, receives the characteristic value that described data processing module sends, and the characteristic value of every group of PCM data and the comparison threshold of setting are compared, to described output control module transmission comparative result;
Described output control module is used for the control signal according to comparative result generation that receives and output LED light.
14, device according to claim 13 is characterized in that, described data pre-storage module is used for when audio system is carried out playback process to current group of PCM data, obtains next group PCM data.
15, device according to claim 13 is characterized in that, described output control module comprises control signal unit and clock unit;
Described control signal unit is used to write down the different comparative results and the corresponding relation of control signal; According to the comparative result that receives, the corresponding relation of reference record produces the control signal of a LED light, and under the control of described clock unit output clock, exports the control signal that produces;
Described clock unit, be used to receive voice data is carried out the clock signal of fetching data before the playback process, and the data volume that this clock signal is comprised according to every group of PCM data is carried out frequency division handle, obtain sub-frequency clock signal, this sub-frequency clock signal is sent to the control signal unit.
According to arbitrary described device in the claim 13 to 15, it is characterized in that 16, described data processing module comprises absolute value element and equal value cell,
Described absolute value element is used to receive every group of PCM data that described data pre-storage module sends, and these group data is taken absolute value, and the result is sent to described equal value cell;
Described equal value cell is used to receive the data that described absolute value element sends, and gets the average of these group data, and its characteristic value as this group PCM data is sent to described data comparison module.
CNB2007100652679A 2007-04-09 2007-04-09 Method and apparatus for controlling LED indicating lamp Expired - Fee Related CN100508677C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007100652679A CN100508677C (en) 2007-04-09 2007-04-09 Method and apparatus for controlling LED indicating lamp

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007100652679A CN100508677C (en) 2007-04-09 2007-04-09 Method and apparatus for controlling LED indicating lamp

Publications (2)

Publication Number Publication Date
CN101043772A true CN101043772A (en) 2007-09-26
CN100508677C CN100508677C (en) 2009-07-01

Family

ID=38808889

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007100652679A Expired - Fee Related CN100508677C (en) 2007-04-09 2007-04-09 Method and apparatus for controlling LED indicating lamp

Country Status (1)

Country Link
CN (1) CN100508677C (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102186278A (en) * 2011-03-11 2011-09-14 广东威创视讯科技股份有限公司 Method and system for processing equipment indicating lamp
CN105634877A (en) * 2016-04-01 2016-06-01 浪潮电子信息产业股份有限公司 Server state information acquisition device, system and method
WO2016082334A1 (en) * 2014-11-24 2016-06-02 中兴通讯股份有限公司 Indicator light control method and apparatus
CN108449686A (en) * 2018-03-09 2018-08-24 福建捷联电子有限公司 A kind of display and its method fitted music and show ambient light
CN111258381A (en) * 2015-12-01 2020-06-09 三星电子株式会社 Display apparatus and control method thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102186278A (en) * 2011-03-11 2011-09-14 广东威创视讯科技股份有限公司 Method and system for processing equipment indicating lamp
WO2016082334A1 (en) * 2014-11-24 2016-06-02 中兴通讯股份有限公司 Indicator light control method and apparatus
CN111258381A (en) * 2015-12-01 2020-06-09 三星电子株式会社 Display apparatus and control method thereof
CN105634877A (en) * 2016-04-01 2016-06-01 浪潮电子信息产业股份有限公司 Server state information acquisition device, system and method
CN108449686A (en) * 2018-03-09 2018-08-24 福建捷联电子有限公司 A kind of display and its method fitted music and show ambient light

Also Published As

Publication number Publication date
CN100508677C (en) 2009-07-01

Similar Documents

Publication Publication Date Title
CN1119919C (en) Signal quality determining device and method
CN101043772A (en) Method and apparatus for controlling LED indicating lamp
CN1494353A (en) Sounder signal processor and its method
CN1741376A (en) AGC circuit
CN1700757A (en) System and method for high-quality variable speed playback of audio-visual media
CN1669074A (en) Voice intensifier
CN1669357A (en) Signal processing apparatus, signal processing method, program and recording medium
CN100347742C (en) Device for recovering missing frequency components
CN101067927A (en) Sound volume adjusting method and device
CN1901431A (en) Lost frame hiding method and device
CN1841899A (en) Switching device and related operating method
CN1787383A (en) Methods and apparatuses for transforming, adaptively encoding, inversely transforming and adaptively decoding an audio signal
CN1719517A (en) Dynamic noise eliminating method and digital filter
CN1245389A (en) Method for controlling forward power in honeycomb mobile communication system
CN1233112A (en) Digital-to-analog converter and digital-to-analog converting method
CN101068111A (en) Analog/digital converter circuit and method
CN1512823A (en) Sound device, method for changing sound property
CN1149534C (en) Sound decoding device and sound decoding method
CN1961611A (en) Acoustical signal processing apparatus
CN1808571A (en) Acoustical signal separation system and method
CN1831961A (en) Apparatus and method of updating filter tap coefficients of equalizer
CN100346577C (en) Signal coding device and signal decoding device, and signal coding method and signal decoding method
CN1783786A (en) Music delivering apparatus and music reproducing apparatus
CN1889724A (en) Adaptive multi-rate speech transmitting format configurating method
CN1598923A (en) Popular song key segment pick-up method for music listening

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090701

Termination date: 20120409