A kind of adaptive lamp light control method and system based on stage set sound
Technical field
The present invention relates to Stage Equipment Control fields, more specifically to a kind of adaptive lamp based on stage set sound
Light control method and system.
Background technique
Stage design is an important component of drama He other stage performances, including setting, light, makeup, clothes
Dress, stage property etc..Light is the important component of dance & art, and 104244529 A of patent CN discloses a kind of sound induction clock lamp
Photosystem, after controlling host and identifying the sound that certain stage properties (bell, drum, hammer, whistle and clicker) are issued, according to algorithm plus
The brightness of accent light special efficacy, or after collecting specific voice, realize the sound effect set in advance.The patent is based on sound
The control to lighting effects is realized, but can not achieve for different stage set atmosphere, different stage lightings is given
Light can not achieve control light of stage as the development of plot carries out the adaptive adjustment of color, brightness effects.Such as stage field
Scape needs dim cool colour light when performing sadness scene play, need bright warm colour when performing passionate acrobatic fighting play
Light is carrying out the general Neutral colour light modulation of brightness when daily talk, and above-mentioned 104244529 A of patent CN and the prior art are equal
Do not have and it is distinguished and provides the light for being suitble to different atmosphere.
Summary of the invention
The technical problem to be solved in the present invention is that can not achieve for the above-mentioned prior art for different stage sets
Atmosphere gives the technological deficiency of different lights of stage, provides a kind of adaptive signal light control based on stage set sound
Method and system.
Wherein one side according to the present invention, the present invention are to solve its technical problem, are provided a kind of based on stage set
The adaptive lamp light control system of sound, comprising:
Sound obtains module, the electric signal converted for obtaining stage set sound;
Signal conditioning module is improved for obtaining the electric signal that module obtains to sound;
Peak detection module, for detecting the size of the electric signal after improving;
Square wave generation module, for the electric signal after conditioning to be compared with the direct current signal of preset fixed amplitude,
Obtain square-wave signal;
Frequency measurement meter module, for counting the frequency of square-wave signal;
Control module, for the size of the electric signal after the frequency and conditioning according to square-wave signal, to adjust light of stage
Color and brightness.
Further, in the adaptive lamp light control system of the invention based on stage set sound, believed according to square wave
Number frequency and and conditioning after electric signal size adjustment light of stage color and brightness be specifically: by square-wave signal
Frequency is divided into default section with the value that merges of the electric signal after conditioning by size, and each section corresponds to a kind of color, according to
The locating section of fusion value generates control instruction and light of stage is made to be in the corresponding color in the section, and light of stage
Brightness in each section, increases respectively as result increases, and reduces as result reduces;Wherein, fusion value is logical
It crosses following formula and calculates gained:
Result=α * rhythm+ (1- α) * volume,
In formula, result is fusion value, and α is preset fusion coefficients, and rhythm is the frequency of square-wave signal, and volume is
The size of electric signal after conditioning.
Further, in the adaptive lamp light control system of the invention based on stage set sound, fusion value
Result is divided into three sections by two threshold value first thresholds and second threshold,
If result is less than first threshold, control module, which is generated, becomes cool colour for the color of lamp;
If result is greater than second threshold, control module, which is generated, becomes warm colour for the color of lamp.
If result is greater than first threshold and is less than second threshold, control module, which generates, becomes the color of lamp except cool colour
And other colors outside warm colour.
Further, in the adaptive lamp light control system of the invention based on stage set sound, signal condition mould
Block includes:
Amplifying circuit, the electric signal for obtaining voice input module are amplified to preset range;
Filter circuit, the noise in electric signal obtained for filtering sound input module.
Further, in the adaptive lamp light control system of the invention based on stage set sound, peak detection mould
Block includes:
Peak holding circuit, the size for the electric signal after improving carry out peak holding;
AD converter, for acquiring the peak value of peak holding circuit holding, obtained peak value size.
According to the another aspect of invention, the present invention also provides a kind of adaptive signal light controls based on stage set sound
Method includes the following steps:
Sound obtaining step: the electric signal that stage set sound converts is obtained;
Signal condition step: the electric signal obtained to sound obtaining step improves;
Peak detection step: the size of the electric signal after detection conditioning;
Square wave generation step: the electric signal after conditioning is compared with the direct current signal of preset fixed amplitude, is obtained
Square-wave signal;
Frequency measurement step: the frequency of square-wave signal is counted;
Rate-determining steps: according to the size of the electric signal after the frequency and conditioning of square-wave signal, to adjust the face of light of stage
Color and brightness.
Further, in the adaptive lamp light control method of the invention based on stage set sound, believed according to square wave
Number frequency and and conditioning after electric signal size adjustment light of stage color and brightness be specifically: by square-wave signal
Frequency is divided into default section with the value that merges of the electric signal after conditioning by size, and each section corresponds to a kind of color, according to
The locating section of fusion value generates control instruction and light of stage is made to be in the corresponding color in the section, and light of stage
Brightness in each section, increases respectively as result increases, and reduces as result reduces;Wherein, fusion value is logical
It crosses following formula and calculates gained:
Result=α * rhythm+ (1- α) * volume,
In formula, result is fusion value, and α is preset fusion coefficients, and rhythm is the frequency of square-wave signal, and volume is
The size of electric signal after conditioning.
Further, in the adaptive lamp light control method of the invention based on stage set sound, fusion value
Result is divided into three sections by two threshold value first thresholds and second threshold,
If result is less than first threshold, control module, which is generated, becomes cool colour for the color of lamp;
If result is greater than second threshold, control module, which is generated, becomes warm colour for the color of lamp.
If result is greater than first threshold and is less than second threshold, control module, which generates, becomes the color of lamp except cool colour
And other colors outside warm colour.
Further, in the adaptive lamp light control method of the invention based on stage set sound, signal condition step
Suddenly include:
Amplification procedure: the electric signal that voice input step obtains is amplified to preset range;
Filter step: the noise in electric signal that filtering sound input step obtains.
Further, in the adaptive lamp light control system of the invention based on stage set sound, the peak value inspection
Surveying module includes:
Peak holding step: the size of the electric signal after conditioning is subjected to peak holding;
AD conversion step: the peak value that acquisition peak holding circuit is kept, obtained peak value size.
Adaptive lamp light control method and system based on stage set sound of the invention, first signal conditioning module pair
Sound electric signal simultaneously amplifies, filters conditioning, after conditioning after signal send square wave generation module and frequency measurement meter module to go out sound
Rhythmic appearance, and send to peak detection module the loudness feature for extracting sound simultaneously, be then two kinds of spies of comprehensive sound
Sign carries out accurate decision, is merged using data fusion means, and fusion results are transferred to control module decision and form control
System order, the order are issued through signal transmitting module.After lamp effect realizes that module receives, lamp imitates control module according to instruction to lamp
Color, intensity modulation are regulated and controled.The present invention, as characteristic information, can accurately react the variation of plot using scene sound,
For different stage set atmosphere, different lights of stage is given, and algorithm complexity can be reduced, improves the speed of service, drop
Low cost.
Detailed description of the invention
Present invention will be further explained below with reference to the attached drawings and examples, in attached drawing:
Fig. 1 is that the circuit of adaptive lamp light control system one preferred embodiment of the invention based on stage set sound is former
Reason figure;
Fig. 2 is the process of adaptive lamp light control method one preferred embodiment of the invention based on stage set sound
Figure.
Specific embodiment
For a clearer understanding of the technical characteristics, objects and effects of the present invention, now control attached drawing is described in detail
A specific embodiment of the invention.
In stage performance, sound is a kind of important expression way for expressing the plot introduction, elucidation of the theme, such as performer's sound of speech, song
Hand singing sound, background sound music, footsteps of dancer etc..When plot is nervous or high water time, sound rhythm can tend to it is close,
Loudness will increase;When plot is more gentle, sound rhythm can tend to releive, loudness reduces.In short, different pictures, difference
Scene can be expressed by the rhythm and loudness of sound.The present invention is exactly the rhythm and loudness spy by identifying sound
Property, realize that control light of stage carries out the adaptive adjustment of color, brightness effects with the development of plot.
As shown in Figure 1, it is preferably implemented for the adaptive lamp light control system one of the invention based on stage set sound
The circuit diagram of example.The present embodiment adaptive lamp light control system have sound obtain module 1, signal conditioning module 2,
Peak detection module 3, square wave generation module 4, frequency measurement meter module 5 and control module 6, the output end that sound obtains module 1 connect
The input terminal of signal conditioning module 2 is connect, the output end of signal conditioning circuit 2 is respectively connected to peak detection module 3 and square wave is raw
At the input terminal of module 4, the output end of peak detection module 3 is connected to the input terminal of control module 6, square wave generation module 4
The input terminal of control module 6 is connected to after output end one frequency measurement meter module 5 of connection.
Sound obtains module 1 and obtains the electric signal that stage set sound converts first, can be microphone, tone frequency channel wire
Any one in connector, audio file reading device is also possible to the combination of these types.Wherein, audio file reading device is
The reading device for the electric signal that the stage set sound conversion stored in read/write memory medium (such as USB flash disk, TF card) comes.
Signal conditioning circuit 2 obtains the electric signal that module 1 obtains to sound and improves, and filters out noise and amplifies.This reality
It applies in example comprising amplifying circuit 21 and filter circuit 22.Amplifying circuit 21 connects sound and obtains module 1, and sound is obtained
The electric signal that module 1 obtains is amplified to preset OK range, electricity after the filter circuit 22 connecting with amplifying circuit 21 will amplify
Noise in signal is filtered out, and is preferably low-pass filter circuit.Preferably, amplifying circuit 21 is adaptive amplifying circuit,
It can automatically adjust amplification factor, and electric signal is amplified to preset range.
3 connection signal conditioning module 2 of peak detection module, with peak holding circuit 31 and AD converter 32, peak
Value holding circuit 31 is connect with filter circuit 22, and the filtered electric signal of filter circuit 22 is carried out peak holding, AD (analog/digital)
Converter 32 is connect with peak holding circuit 31, the size for the peak value that acquisition peak holding circuit 31 is kept, size reaction dance
The loudness of platform scene sound.
4 connection signal conditioning module 2 of square wave generation module, by the preset fixed width of the filtered electric signal of filter circuit 22
The direct current signal of value is compared, and obtains square-wave signal, that is, is high electric when the amplitude of electric signal is greater than the fixed amplitude after filtering
It is flat, it is otherwise low level.Certainly, in order to when reaching the 4 of square wave generation module through the filtered electric signal of filter circuit 22
Still have compared with high s/n ratio, can be filtered again, being filtered again can be using the signal tune with filter circuit
Reason module 2 is individually added into filter circuit again, and filtered electric signal enters square wave generation module 4 and handled again.
Frequency measurement meter module 5 connects square wave generation module 4, counts the frequency of above-mentioned square-wave signal, i.e. square wave in the unit time
The number that square wave occurs in signal.Frequency measurement meter module 5 can be realized by frequency measurement meter.The frequency response stage set sound it is fast
Slow rhythm.
Control module 6 is separately connected frequency measurement meter module 5 and peak detection module 3, according to the frequency and tune of square-wave signal
The size of electric signal after reason, to adjust the color and brightness of light of stage.Specifically, first by the frequency of square-wave signal and tune
The fusion value of electric signal after reason is divided into default section, the corresponding a kind of color in each section, then according to fusion by size
The locating section of value generates control instruction and light of stage is made to be in the corresponding color in the section, and the brightness of light of stage
Respectively in each section, increase as result increases, reduces as result reduces.Wherein, under fusion value passes through
It states formula and calculates gained:
Result=α * rhythm+ (1- α) * volume
In formula, result is fusion value, and α is preset fusion coefficients, and rhythm is the frequency of square-wave signal, and volume is
The size of electric signal after conditioning.
In the present embodiment, fusion value result is divided into three sections by two threshold value first thresholds and second threshold,
If result is less than first threshold, control module, which is generated, becomes cool colour for the color of lamp;If result is greater than second threshold,
Control module, which is generated, becomes warm colour for the color of lamp, if result is greater than first threshold and is less than second threshold, control module
Generate the color that the color of lamp is become to middle tone, i.e., other colors in addition to cool colour and warm colour.It so can be for difference
Stage set atmosphere, give different lights of stage (color and brightness).
After control module generates the brightness of control light and the instruction of color, sent out by signal transmitting module connected to it
See off, the signal receiving module of stage lighting receives above-metioned instruction, and lamp imitates control module and executes above-metioned instruction, to the color of lamp,
Brightness is regulated and controled.Signal transmitting module and signal receiving module can be the communication module of all wired and wireless agreements, than
Such as RS232/RS485/RS422/SPI/IIC/ bluetooth/Zigbee/2.4GHzNRF communication module.
It is adaptive lamp light control method one preferred embodiment of the invention based on stage set sound with reference to Fig. 2, Fig. 2
Flow chart.In the present embodiment, a kind of adaptive lamp light control method based on stage set sound, includes the following steps.
Sound obtaining step obtains the electric signal that stage set sound converts.
Signal condition step, the electric signal obtained to sound obtaining step improve.The step is wrapped in the present embodiment
Containing putting
Big step and filter step, are amplified to preset range for the electric signal that voice input module obtains, then filter
Except putting
The noise in electric signal after big.
Peak detection step, the size of the electric signal after detection conditioning.The step includes peak holding in the present embodiment
The size of electric signal after conditioning is carried out peak holding, AD conversion step by step and AD conversion step, peak holding step
Acquire the peak value that peak holding circuit is kept, obtained peak value size.
Square wave generation step: the electric signal after conditioning is compared with the direct current signal of preset fixed amplitude, is obtained
Square-wave signal is high level when electric signal is greater than the fixed amplitude after filtering, is otherwise low level.
Frequency measurement step: the frequency of square-wave signal is counted.
Rate-determining steps: according to the size of the electric signal after the frequency and conditioning of square-wave signal, to adjust the face of light of stage
Color and brightness.In particular: the frequency of square-wave signal is divided into default with the value that merges of the electric signal after conditioning by size
Section, the corresponding a kind of color in each section generate control instruction and light of stage are according to the locating section of fusion value
The corresponding color in the section, and the brightness of light of stage increases as result increases respectively in each section, with
Result reduces and reduces;Wherein, fusion value is as obtained by the calculating of following formula:
Result=α * rhythm+ (1- α) * volume,
In formula, result is fusion value, and α is preset fusion coefficients, and rhythm is the frequency of square-wave signal, and volume is
The size of electric signal after conditioning.
In the present embodiment, fusion value result is divided into three sections by two threshold value first thresholds and second threshold,
If result is less than first threshold, control module, which is generated, becomes cool colour for the color of lamp;
If result is greater than second threshold, control module, which is generated, becomes warm colour for the color of lamp.
If result is greater than first threshold and is less than second threshold, control module, which is generated, becomes Neutral colour for the color of lamp
The color of tune, other colors as in addition to cool colour and warm colour.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific
Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art
Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much
Form, all of these belong to the protection of the present invention.