A kind of multi-channel audio signal contract mixing method and system
Technical field
The present invention relates to the processing of audio signal, relate in particular to a kind of multi-channel audio signal contract mixing method and system.
Background technology
At the audio editing playout software, and in the various multimedia application software, all can run into the situation that multi-channel audio signal (like 5.1 sound channels) is become monophonic signal, i.e. DownMix (it is mixed to contract, and abbreviation contracts mixed) algorithm downwards.DownMix is that audio frequency and video are play and software for editing, and rudimentary algorithm in the various application such as various audio frequency and video chats, can obtain the dual results on computational efficiency and the auditory effect, has very important meaning.
Following situation need become monophonic signal with multi-channel signal:
1, in the encoding and decoding; Such as AAC (Advanced Audio Coding; Advanced Audio Coding) in the encoding and decoding; In order to reduce amount of coded data, usually multi-channel signal is become monophonic signal, be reduced to multichannel (this process still is reversible) according to the corresponding relation of frequency again more afterwards;
2, under the more single situation of playback equipment, for example have only under the situation of a sound equipment;
3, in network transmission process, especially insensitive in order to save data quantity transmitted for as online audio signal, sound channel being required, but under the very strong situation of data volume size restriction;
4, in multi-person speech, a plurality of people converge in a minute, and unification is felt what a sound channel was come during broadcast in a sound card, rather than a lot of sound channels are come one by one.
A more typical DownMix is arranged, but this algorithm needs the computing formula of more complicated in the AAC encoding and decoding, and effect is not outstanding.And mostly some other algorithms are the multiple signals addition is averaged, and algorithm is very dogmatic, poor.
Summary of the invention
The technical problem that the present invention will solve is, to the above-mentioned DownMix complex algorithm of prior art, the defective of weak effect, the simple effective again multi-channel audio signal of a kind of algorithm mixing method that contracts is provided.
The technical solution adopted for the present invention to solve the technical problems is: construct a kind of multi-channel audio signal mixing method that contracts, comprising:
The audio signal that receives in advance from two different sound channels;
Calculate the monophonic audio signal that contracts after mixing according to following formula:
y(t)=?w*s1(t)+w*s2(t)
Wherein, the monophonic audio signal of y (t) for contracting after mixing, s1 (t) is the audio signal of first sound channel, and s2 (t) is the audio signal of second sound channel, and w is weights, and satisfies 0.58≤w≤0.7.
In multi-channel audio signal of the present invention contracts mixing method, when surpassing two sound channels, will be converted into the audio signal of two sound channels above the audio signal of two sound channels, and this step is specially in the audio signal that is received:
Sound channel ground judges that the audio signal that is received is for having sound audio signals or for no acoustical signal, having filtered out sound audio signals and neglected no acoustical signal one by one;
Analyze there being sound audio signals to carry out the primary and secondary road, with the audio signal of main road audio signal as first sound channel, and with averaging again after all times road audio signal addition, to form the audio signal of second sound channel.
In multi-channel audio signal of the present invention contracts mixing method, said w=0.618.
In multi-channel audio signal of the present invention contracted mixing method, the amplitude of the audio signal of the audio signal of said first sound channel and second sound channel all was no more than 0.81 times of amplitude of the maximum-amplitude signal that can store.
The present invention also constructs a kind of multi-channel audio signal mixing system that contracts, and comprising:
Receiver module, the audio signal that is used for receiving in advance from two different sound channels;
Computing module is used for calculating the monophonic audio signal that contracts after mixing according to following formula:
y(t)=?w*s1(t)+w*s2(t)
Wherein, the monophonic audio signal of y (t) for contracting after mixing, s1 (t) is the audio signal of first sound channel, and s2 (t) is the audio signal of second sound channel, and w is weights, and satisfies 0.58≤w≤0.7.
In multi-channel audio signal of the present invention contracted mixing system, said hybrid system also comprised:
Two channel audio signal obtain module, are used in the audio signal that is received will being converted into the audio signal of two sound channels above the audio signal of two sound channels when surpassing two sound channels;
Wherein, said two channel audio signal acquisition module comprises:
Judge and screening unit, be used for the said audio signal that surpasses two sound channels of sound channel ground judgement one by one, filtered out sound audio signals and neglected no acoustical signal for sound audio signals being arranged or being no acoustical signal;
Primary and secondary road analytic unit is used for analyzing there being sound audio signals to carry out the primary and secondary road, with the audio signal of main road audio signal as first sound channel, and with averaging again after all times road audio signal addition, to form the audio signal of second sound channel.
In multi-channel audio signal of the present invention contracts mixing system, said w=0.618.
In multi-channel audio signal of the present invention contracted mixing system, the amplitude of the audio signal of the audio signal of said first sound channel and second sound channel all was no more than 0.81 times of amplitude of the maximum-amplitude signal that can store.
The technical scheme of embodiment of the present invention; Through multiply by behind the weights monophonic audio signal after mixing that just can obtain contracting of addition more respectively from the audio signal of two different sound channels; Therefore algorithm complex is low; Be easy to realize, and since weights between 0.58 and 0.7, mixed sound is sounded more has aesthetic feeling.
Description of drawings
To combine accompanying drawing and embodiment that the present invention is described further below, in the accompanying drawing:
Fig. 1 is the contract flow chart of mixing method embodiment one of a kind of multi-channel audio signal of the present invention;
Fig. 2 is the contract flow chart of mixing method embodiment two of a kind of multi-channel audio signal of the present invention;
Fig. 3 is the contract flow chart of mixing system embodiment one of a kind of multi-channel audio signal of the present invention;
Fig. 4 is the contract flow chart of mixing system embodiment two of a kind of multi-channel audio signal of the present invention.
Embodiment
As shown in Figure 1, in a kind of multi-channel audio signal of the present invention contracted the flow chart of mixing method embodiment one, this mixed method may further comprise the steps:
S100. the audio signal that receives in advance from two different sound channels;
S200. calculate the monophonic audio signal that contracts after mixing according to following formula:
y(t)=?w*s1(t)+w*s2(t)
Wherein, the monophonic audio signal of y (t) for contracting after mixing, s1 (t) is the audio signal of first sound channel, and s2 (t) is the audio signal of second sound channel, and w is weights, and satisfies 0.58≤w≤0.7.
Suppose that s1 (t) and s2 (t) are the two-way audio signal from dual track; Because s1 (t) and s2 (t) are two sound channels that belong to a signal; Therefore, s1 (t) and s2 (t) have very strong correlation, such as an accompaniment and a Chinese musical telling; Therefore, key is to find out suitable weights to come balance this two-way audio signal s1 (t) and s2 (t) in the signal that final minification mixes, to contribute.Consider the characteristic of people's ear, and the correlation of binaural signal, for two-way audio signal s1 (t) and s2 (t) distribute a weight w respectively; And 0.58≤w≤0.7; After this two-way audio signal s1 (t) and s2 (t) multiply each other with weights respectively, addition again, monophonic audio signal after mixing just obtains contracting.Therefore, this multi-channel audio signal mixing method algorithm complex that contracts is low, be easy to realize, and since weights between 0.58 and 0.7, mixed sound is sounded more has aesthetic feeling.
The mixed method of the foregoing description has been primarily aimed at the situation that binaural audio signal is converted into monophonic audio signal, transfers the situation of monophonic audio signal to for 5.1 channel audio signal, for example; Among the actual VOIP (Voice over Internet Protocol, the networking telephone) 100 road audio mixings time, the part that sound often arranged just wherein a tunnel; Other road is in the stage of listening to; Or alternately speak the stage, at this moment, to carry out contracting of audio signal mixed for the flow chart of mixing method embodiment two can to combine a kind of multi-channel audio signal of the present invention shown in Figure 2 to contract; Promptly; When surpassing two sound channels, the audio signal that at first will surpass two sound channels is converted into the audio signal of two sound channels, and then contracts mixed according to the method for embodiment shown in Figure 1 in the audio signal that is received.The mixing method that contracts of this embodiment specifically may further comprise the steps:
S001. sound channel ground judges that the audio signal that is received is for having sound audio signals or for no acoustical signal, having filtered out sound audio signals and neglected no acoustical signal one by one;
S002. analyze there being sound audio signals to carry out the primary and secondary road, with the audio signal of main road audio signal as first sound channel, and with averaging again after all times road audio signal addition, to form the audio signal of second sound channel;
S100. the audio signal that receives in advance from two different sound channels;
S200. calculate the monophonic audio signal that contracts after mixing according to following formula:
y(t)=?w*s1(t)+w*s2(t)
Wherein, the monophonic audio signal of y (t) for contracting after mixing, s1 (t) is the audio signal of first sound channel, and s2 (t) is the audio signal of second sound channel, and w is weights, and satisfies 0.58≤w≤0.7.
Multi-channel audio signal in above-mentioned two embodiment contracts in the mixing method, the preferred golden section point of weights, i.e. w=0.618.
Multi-channel audio signal in above-mentioned two embodiment contracts in the mixing method, and the amplitude of the audio signal of the audio signal of said first sound channel and second sound channel all is no more than 0.81 times of amplitude of the maximum-amplitude signal that can store.Should be noted that according to thinking that to the analysis of audio signal it is small probability event that these weights cause overflowing of signal.Suppose that the maximum-amplitude signal that can store is the 16bit quantized signal; Amplitude is positioned at [32768,32767], supposes actual margin maximum x/32768=p; Then under the situation of two-way audio signal, do not overflow in order to guarantee; 2*p*0.618=1 (at this moment, weights get 0.618) is then arranged, solve an equation to such an extent that p is about 0.81.The amplitude peak that is the two-way audio signal only need be 32768 0.81 times and can guarantee not overflow.And the branch of primary and secondary is generally arranged for music signal, and it is also littler to reach maximum possibility simultaneously, and therefore overflowing is small probability event.And when overflowing generation, only with solving under the saturation arithmetic.
In multi-channel audio signal shown in Figure 3 contracted mixing system, this mixing system that contracts comprised the receiver module 100 and computing module 200 that links to each other successively.Wherein, receiver module 100 the audio signal that is used for receiving in advance from two different sound channels; Computing module 200 is used for calculating the monophonic audio signal that contracts after mixing according to following formula:
y(t)=?w*s1(t)+w*s2(t)
Wherein, the monophonic audio signal of y (t) for contracting after mixing, s1 (t) is the audio signal of first sound channel, and s2 (t) is the audio signal of second sound channel, and w is weights, and satisfies 0.58≤w≤0.7.
In multi-channel audio signal shown in Figure 4 contracted mixing system, this mixing system that contracts comprised that two channel audio signal that link to each other successively obtain module 000, receiver module 100 and computing module 200.Wherein, The logical construction of the corresponding module among receiver module 100 and computing module 200 and the embodiment shown in Figure 3 is identical; Do not do at this and to give unnecessary details; Only explain that below two channel audio signal obtain module 000, this two channel audio signal obtains module 000 and is used in the audio signal that is received will being converted into the audio signal of two sound channels above the audio signal of two sound channels when surpassing two sound channels.Wherein, said two channel audio signal acquisition module 000 further comprises judgement and the screening unit 001 and primary and secondary road analytic unit 002 that links to each other successively.And judgement and screening unit 001 are used for the said audio signal that surpasses two sound channels of sound channel ground judgement one by one for sound audio signals being arranged or being no acoustical signal, have filtered out sound audio signals and have neglected no acoustical signal; Primary and secondary road analytic unit 002 is used for analyzing there being sound audio signals to carry out the primary and secondary road, with the audio signal of main road audio signal as first sound channel, and with averaging again after all times road audio signal addition, to form the audio signal of second sound channel.
In the mixing system that contracts of the multi-channel audio signal of the foregoing description, preferably, weight w=0.618.
In the mixing system that contracts of the multi-channel audio signal of the foregoing description, preferably, the amplitude of the audio signal of the audio signal of said first sound channel and second sound channel all is no more than 0.81 times of amplitude of the maximum-amplitude signal that can store.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within the claim scope of the present invention.