Multi-channel mixing processing method and device, and electronic equipment

By sampling and normalizing the audio channel and adopting appropriate mixing processing rules, the mixing results are within the range of -1.0 to 1.0, the problems of audio distortion, noise and sound silence in the prior art are solved, and the problems of audio distortion, noise and sound silence in the prior art are improved. Audio processing quality of professional call systems.

CN118865999BActive Publication Date: 2024-12-17中央广播电视总台 +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411337044.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-17
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

The existing mixing processing methods are prone to response lag, overflow cutoff in the processing of audio signals, resulting in audio distortion and noise. When the phases of the audio signals are opposite, they will cancel each other and even silence, affecting the audio processing effect of professional call systems.

Method used

By performing audio sampling and normalization processing on the audio channel, different mixing processing rules are used to perform mixing processing, so that the normalized value of the mixing results is within the range of -1.0 to 1.0, avoiding saturation or clamping processing, and being flexible Handle different positive and negative conditions of audio signals.

Benefits of technology

Effectively avoid audio distortion and noise problems caused by saturation or clamping processing, and avoid cancellation of each other when the audio signals are inverted, ensuring that the audio normalized value after mixing is within the range of the input audio, improving the quality of audio processing and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118865999B_ABST
    Figure CN118865999B_ABST
Patent Text Reader

Abstract

The present invention discloses a multi-channel mixing processing method and device, and an electronic device, wherein the method comprises: performing audio sampling on each audio channel to obtain an audio sample corresponding to each audio channel; performing normalization processing on each audio sample to obtain a target audio sample; using a mixing processing rule matched by each target audio sample, performing mixing processing on each target audio sample one by one to obtain a target mixing result, so that the normalized value of the mixing result generated by the mixing processing can be within the range of ‑1.0 to 1.0. The multi-channel mixing processing scheme provided by the present application can effectively avoid the audio distortion and noise caused by saturation or clamping processing, as well as the problem of mutual cancellation or even silencing when the audio signal is inverted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of audio processing, and in particular to a multi-channel mixing processing method and device, and electronic equipment. Background Art

[0002] In the field of radio and television technology, professional call systems are important technical systems for coordinating communication in real-time production and broadcasting applications. They usually use call matrices as core call equipment to schedule and process professional call audio signals, meeting the high-quality, low-latency audio processing and output requirements for program production and broadcasting. Among them, a core function of audio processing is to achieve mixed output of audio input from different channels in the same call group according to production and broadcasting requirements. Audio mixing and volume adjustment need to change dynamically with the addition and exit of signals, so it is necessary to have adaptability to dynamic changes in multiple channels. The main mixing processing methods used in the prior art are as follows:

[0003] The first method is to adjust the weights by averaging: linearly add each audio signal and divide it by the total number of channels to achieve average weighting of the sound. The second method is to add each audio signal linearly and then perform saturation processing or threshold detection on the mixed audio. If the audio is saturated or exceeds the maximum threshold or is lower than the minimum threshold, the audio is truncated.

[0004] The existing mixing processing method uses an attenuation factor, which is essentially a feedback control method. It is inevitable that there will be response lags and overflow truncation. On the one hand, audio distortion and noise will occur; on the other hand, when the phases of the audio signals are opposite, the audio signals will cancel each other out or even be muted, affecting the normal use of audio by professional call systems during the production and broadcasting process. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide a multi-channel audio mixing processing method and device, and electronic equipment, which can solve the problems of audio distortion, noise and noise elimination existing in the prior art.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] An embodiment of the present invention provides a multi-channel mixing processing method, the method comprising:

[0008] Performing audio sampling on each audio channel to obtain an audio sample corresponding to each audio channel;

[0009] Performing normalization processing on each of the audio samples to obtain a target audio sample;

[0010] Using the mixing processing rules matched by each of the target audio samples, each of the target audio samples is mixed one by one to obtain a target mixing result;

[0011] The mixing processing rule matching a single target audio sample is determined as follows:

[0012] Based on the positive or negative normalized value of the target audio sample and the positive or negative normalized value of the first mix generated by the mixing process in the current audio sampling, a mixing processing rule matching the target audio sample is determined, and the mixing processing rule can make the normalized value of the mixing result generated by the mixing process be between -1.0 and 1.0.

[0013] Optionally, the step of normalizing each of the audio samples to obtain a target audio sample includes:

[0014] determining the number of data bits of the audio sample;

[0015] Calculating a signed integer range based on the number of data bits;

[0016] Determining a normalized reference value according to the signed integer range;

[0017] Each of the audio samples is normalized according to the normalization reference value to obtain a target audio sample.

[0018] Optionally, the step of determining a mixing processing rule that matches the target audio sample based on the positive or negative normalized value of the target audio sample and the positive or negative normalized value of a first mix generated by mixing processing in the current audio sampling includes:

[0019] When the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing are both positive, determining that the target audio sample matches the first mix processing rule;

[0020] When the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing are both negative, determining that the target audio sample matches the second mix processing rule;

[0021] When the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing have different signs, determining that the target audio sample matches the third mix processing rule;

[0022] The first mixing processing rule, the second mixing processing rule and the third mixing processing rule are all different.

[0023] Optionally, the first mixing processing rule is:

[0024] Calculating a difference between a normalized value of the target audio sample and a normalized value of the first mix to obtain a first difference;

[0025] Calculating the product of the normalized value of the first mix and the first difference to obtain a first product value;

[0026] The sum of the first product value and the normalized value of the first mixed sound is determined as the normalized value of the newly generated first mixed sound.

[0027] Optionally, the second mixing processing rule is:

[0028] Calculating an absolute value of a normalized value of the first mix;

[0029] Calculating a difference between a normalized value of the first mix and a normalized value of the target audio sample to obtain a second difference;

[0030] Calculating the product of the second difference and the absolute value of the normalized value of the first mix to obtain a second product value;

[0031] The sum of the second product value and the normalized value of the target audio sample is determined as the normalized value of the newly generated first mix.

[0032] Optionally, the third mixing processing rule is:

[0033] Calculating the product of the normalized value of the target audio sample and the normalized value of the first mix to obtain a third product value;

[0034] The sum of the normalized value of the first sound mix, the normalized value of the target audio sample, and the negative number of the third product value is determined as the normalized value of the newly generated first sound mix.

[0035] An embodiment of the present invention provides a multi-channel audio mixing processing device, wherein the device comprises:

[0036] The sampling module is used to perform audio sampling on each audio channel to obtain an audio sample corresponding to each audio channel;

[0037] A normalization module, used to perform normalization processing on each of the audio samples to obtain a target audio sample;

[0038] A fusion module, configured to adopt a mixing processing mechanism matching each of the target audio samples, perform mixing processing on each of the target audio samples one by one, and obtain a target mixing result;

[0039] Among them, the mixing processing mechanism matching a single target audio sample is determined in the following way:

[0040] Based on the positive and negative normalized value of the target audio sample and the positive and negative normalized value of the first mix generated by the mix processing in the current audio sampling, a mix processing rule matching the target audio sample is determined.

[0041] Optionally, the normalization module includes:

[0042] A quantity determination submodule, used to determine the number of data bits of the audio sample;

[0043] A range determination submodule, for calculating a signed integer range based on the number of data bits;

[0044] A reference value determination submodule, used to determine a normalized reference value according to the signed integer number range;

[0045] The normalization processing submodule is used to perform normalization processing on each of the audio samples according to the normalization reference value to obtain a target audio sample.

[0046] Optionally, when the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing are both positive, it is determined that the target audio sample matches the first mix processing rule;

[0047] When the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing are both negative, determining that the target audio sample matches the second mix processing rule;

[0048] When the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing have different signs, determining that the target audio sample matches the third mix processing rule;

[0049] The first mixing processing rule, the second mixing processing rule and the third mixing processing rule are all different.

[0050] In another aspect of the implementation of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor is used to implement any of the above-mentioned multi-channel mixing processing methods when executing the program stored in the memory.

[0051] The multi-channel mixing processing scheme disclosed in the present invention performs audio sampling on each audio channel to obtain an audio sample corresponding to each audio channel; performs normalization processing on each audio sample to obtain a target audio sample; uses a mixing processing rule that matches each target audio sample to perform mixing processing on each target audio sample one by one to obtain a target mixing result so that the normalized value of the mixing result generated by the mixing processing is between -1.0 and 1.0. This multi-channel mixing processing scheme, on the first hand, can effectively avoid audio distortion and noise problems caused by saturation or clamping processing because it can make the normalized value of the mixing result between -1.0 and 1.0. On the second hand, when performing mixing processing, different mixing processing rules are flexibly used according to the different positive and negative values ​​of the audio signal sample values, which can effectively avoid the situation where the audio signals cancel each other out or even mute when they are inverted. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 is a flowchart showing a multi-channel mixing processing method according to an embodiment of the present application;

[0053] Figure 2 It is a structural block diagram of a multi-channel mixing processing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0055] In view of the various problems existing in the use of current mixing processing algorithms, this application proposes a multi-channel dynamic equalization adaptive mixing algorithm to achieve high-quality and high-precision mixing processing for professional calls. This algorithm abandons the complex processing methods such as finding the attenuation factor in the adaptive mixing weighted algorithm, and adopts the method of comparing the relative size of the normalized values ​​of each audio signal in the call group at the current moment to automatically select the mixing factor of each audio channel to ensure that the normalized value of the mixed audio is always between the normalized values ​​of all input audios, avoiding problems such as audio distortion and noise caused by saturation or clamping. Different mixing processing rules are used when mixing audio with different phases, which can effectively avoid the chronic problem of sound cancellation or even silencing, and can also ensure that the normalized value of the mixed audio is between the normalized values ​​of the input audio, and there is no need for saturation and clamping.

[0056] The multi-channel mixing processing solution provided by the embodiment of the present application is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.

[0057] As attached Figure 1 As shown, the multi-channel mixing processing method of the embodiment of the present application includes the following steps:

[0058] Step 101: Perform audio sampling on each audio channel to obtain an audio sample corresponding to each audio channel.

[0059] The multi-channel sound mixing processing method provided in the embodiment of the present application can be applied to an electronic device. A computer program related to the multi-channel sound mixing processing is stored on the electronic device, and a processor of the electronic device executes the computer program to perform the multi-channel sound mixing processing.

[0060] The sampling frequency when performing audio sampling on the audio channel can be flexibly set by those skilled in the art, and no specific restrictions are imposed on this in the embodiments of the present application. After each audio sampling is completed, the multi-channel mixing processing method shown in the embodiments of the present application will be executed to generate a target mixing result. In the embodiments of the present application, the mixing processing of the audio sample after one audio sampling is taken as an example for explanation. In the actual implementation process, the method can be repeatedly executed to mix the audio sample after each audio sampling.

[0061] Step 102: normalize each audio sample to obtain a target audio sample.

[0062] In an optional embodiment, a method for performing normalization processing on each audio sample to obtain a target audio sample may be:

[0063] First, determine the number of data bits of the audio sample;

[0064] Secondly, the signed integer range is calculated based on the number of data bits;

[0065] Again, determine the normalized reference value based on the signed integer range;

[0066] Finally, each audio sample is normalized according to the normalization reference value to obtain the target audio sample.

[0067] For example, the data bit of each audio sampling point recording the audio sample S[i] is 16 bits, and the range of a 16-bit signed integer is: -32768~32767. In this way, the normalized sample value of each audio channel, i.e., the target audio sample, is:

[0068] X[i]=S[i] / 32768 (where: -1≤X[i]<1)

[0069] If there are N audio channels that need to be mixed, the target audio samples obtained after the current N normalization processes are:

[0070] X[1],X[2],X[3],....x[N](i=1,2,...N,-1<=X[i]<1)

[0071] Step 103: using the mixing processing rules matched by each target audio sample, performing mixing processing on each target audio sample one by one to obtain a target mixing result.

[0072] The mixing processing rule matching a single target audio sample is determined as follows:

[0073] Based on the positive and negative normalized value of the target audio sample and the positive and negative normalized value of the first mix generated by the mixing process in the current audio sampling, a mixing processing rule matching the target audio sample is determined; the mixing processing rule can make the normalized value of the mixing result generated by the mixing process be between -1.0 and 1.0.

[0074] In the embodiment of the present application, when performing multi-channel mixing processing, the target audio samples of two audio channels are mixed to obtain a first mixing processing result, and then the first mixing processing result is mixed with the target audio sample of the third audio channel to obtain a second mixing processing result, and then the second mixing processing result is mixed with the target audio sample of the fourth audio channel to obtain a third mixing processing result, and so on until the target audio samples of all audio channels sampled this time are mixed to obtain the target mixing result.

[0075] More specifically, when the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing are both positive, it is determined that the target audio sample matches the first mix processing rule; when the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing are both negative, it is determined that the target audio sample matches the second mix processing rule; when the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing have opposite signs, it is determined that the target audio sample matches the third mix processing rule;

[0076] Among them, the first mixing processing rule, the second mixing processing rule and the third mixing processing rule are all different.

[0077] The first mixing processing rule may be:

[0078] The method further comprises: calculating a difference between a normalized value of the target audio sample and a normalized value of the first mix to obtain a first difference; calculating a product of the normalized value of the first mix and the first difference to obtain a first product value; and determining a sum of the first product value and the normalized value of the first mix as a newly generated normalized value of the first mix.

[0079] The second mix processing rule is: calculate the absolute value of the normalized value of the first mix; calculate the difference between the normalized value of the first mix and the normalized value of the target audio sample to obtain a second difference; calculate the product of the second difference and the absolute value of the normalized value of the first mix to obtain a second product value; and determine the sum of the second product value and the normalized value of the target audio sample as the newly generated normalized value of the first mix.

[0080] The third mix processing rule is: calculate the product of the normalized value of the target audio sample and the normalized value of the first mix to obtain a third product value; and determine the sum of the normalized value of the first mix, the normalized value of the target audio sample, and the negative of the third product value as the normalized value of the newly generated first mix.

[0081] The normalized sample Y after mixing, i.e. the target mixing result, can be expressed in C language pseudo code as follows:

[0082] Y=X[1];

[0083] for (i = 2; i<= N; i++)

[0084] {

[0085] if ((Y>0.0)== (X[i]>0.0))

[0086] {

[0087] double py=fabs(Y);

[0088] double px=fabs(X[i]);

[0089] if ((py + px<1.0) == (py>px))

[0090] Y = Y + px (X[i]-Y);

[0091] else

[0092] Y = X[i] + py (YX[i]);

[0093] }

[0094] else

[0095] Y=Y+ X[i]-Y X[i];

[0096] }

[0097] The output Y is the normalized value of the current N-channel audio mixing, i.e., the target mixing result; fabs(Y) is the absolute value function of Y. Note: Y = Y + px (X[i]-Y) is the first mixing processing rule; Y = X[i]+ py (YX[i]) is the second mixing processing rule; Y=Y+ X[i]-Y X[i] is the third mixing processing rule.

[0098] From the above algorithm, we know that the range of Y value is: Min (fabs (X [i])) ≤ fabs (Y) ≤ Max (fabs (X [i])), and saturation will not occur when mixing any number of audio channels.

[0099] The so-called saturation processing means that when Y>1.0 or Y<-1.0, due to the limitation of the sampling accuracy of the audio sample, the final output audio sample value needs to be limited to between -32768 and 32767 (taking 16-bit sampling accuracy as an example). If Y>1.0, the output audio PCM value should be 32767, if Y<-1.0, the output audio PCM value should be -32768.

[0100] The so-called clamping processing is based on the actual audio usage. It is usually stipulated that the peak level of the output audio is generally less than -3.0dBFS. The normalized audio value corresponding to this peak level is 0.708, that is, Ymax=0.708, Ymin=-0.708; if the normalized audio value of the mixed output exceeds this range, it needs to be truncated to 0.708 or -0.708.

[0101] The above-mentioned algorithm provided in the embodiment of the present application does not require saturation and clamping processing after mixing, which means that when the normalized values ​​of all input audios are between -1.0 and 1.0, the normalized values ​​of the mixed audios will definitely be between -1.0 and 1.0, and no saturation processing is required; when the normalized values ​​of all input audios are between -0.708 and 0.708, the normalized values ​​of the mixed audios will definitely be between -0.708 and 0.708, and no clamping processing is required.

[0102] The multi-channel mixing processing method provided by the embodiments of the present application samples audio for each audio channel to obtain an audio sample corresponding to each audio channel; performs normalization processing on each audio sample to obtain a target audio sample; and uses the mixing processing rules matching each target audio sample to perform mixing processing on each target audio sample one by one to obtain a target mixing result, so that the normalization value of the mixing result generated by the mixing processing is within the range of -1.0 to 1.0. For this multi-channel mixing processing method, on the one hand, since the normalization value of the mixing result can be within the range of -1.0 to 1.0, audio distortion and noise problems caused by saturation or clamping processing can be effectively avoided. On the other hand, different mixing processing rules are flexibly used according to the different positive and negative natures of the audio signal sample values during the mixing processing, which can effectively avoid the situation where the audio signals cancel each other out or even mute when they are out of phase.

[0103] The following uses a specific example to illustrate the multi-channel mixing processing method of the embodiments of the present application.

[0104] In this specific example, two-channel mixing is used for illustration. According to the previous algorithm for multi-channels, taking the mixing result of the previous channel as the intermediate input channel, it can be classified as two-channel mixing. Therefore, the nature of two-channel mixing is the same as that of any multi-channel mixing.

[0105] Suppose the normalized target audio samples after the current audio sampling are X[1]=0.7 and X[2]=0.4 respectively; the two input audios are in phase and both are positive:

[0106] 1) According to the traditional algorithm: Y = X[1] + X[2] = 0.7 + 0.4 = 1.1. If the attenuation factor is 1.0, this value is already saturated and saturation and clamping processing are required.

[0107] 2) Using the mixing algorithm provided by the embodiments of the present application (specifically using the first mixing processing rule): Y = 0.4 + 0.7 ×(0.7 - 0.4) = 0.61; 0.4 < Y < 0.7; no saturation or clamping processing is required.

[0108] Suppose the normalized target audio samples after the current audio sampling are X[1]= -0.7 and X[2]= -0.5 respectively; the two input audios are in phase and both are negative:

[0109] 1) According to the traditional algorithm: Y = X[1] + X[2] = -0.7 - 0.4 = -1.2. If the attenuation factor is 1.0, this value is already saturated and saturation and clamping processing are required.

[0110] 2) Using the mixing algorithm provided by the embodiments of the present application (specifically using the second mixing processing rule): Y = -0.5 + 0.7 (-0.7 + 0.5) = -0.64; -0.7 < Y < -0.5 requires no saturation or clamping processing.

[0111] Assume that the normalized target audio samples after current audio sampling are X[1] = 0.6 and X[2] = -0.6 respectively, and the two input audios are inverted:

[0112] 1) If according to the traditional algorithm: Y = X[1] + X[2] = 0.6 - 0.6 = 0; the audios cancel each other out and there is a phenomenon of sound cancellation.

[0113] 2) Using the mixing algorithm provided in the embodiment of the present application (specifically using the third mixing processing rule): Y = 0.6 - 0.6 + 0.6 0.6 = 0.36; -0.6 < Y < 0.6, there is no sound cancellation, and no saturation or clamping processing is required.

[0114] For the multi-channel mixing method provided in the embodiment of the present application, on the one hand, the mixing weight of each audio sample is determined by the absolute value of the normalized value of the audio signal relative to the current moment of other audio samples, and has nothing to do with all other factors. Therefore, the usage requirements of dynamic equalization and adaptive adjustment can be achieved;

[0115] On the second hand, when the normalized values of each audio channel are relatively close, the volume after mixing approaches the average volume; when the normalized values of each audio channel are quite different, the volume after mixing approaches the audio channel with a high normalized value, meeting the usage requirements in general Party-Line and other scenarios in the audio call system (in this scenario, the director usually has a large volume and everyone needs to hear clearly when he speaks);

[0116] On the third hand, each audio sample within the call group is equally important and has nothing to do with the order of participation in mixing, which is applicable to the scenarios of various audio channels used in professional call systems;

[0117] On the fourth hand, the algorithm logic is simple, eliminating the process of finding a dynamic attenuation factor in advance, avoiding the response delay caused by logical judgment processing in the current adaptive algorithm, and enabling better call quality;

[0118] On the fifth hand, the normalized value of the mixed audio is between the maximum and minimum values of the normalized values of the audio signals of all channels, and there will be no situations such as audio saturation or overflow. Therefore, no saturation or clamping processing is required after mixing, and thus there will be no audio distortion and noise.

[0119] Figure 2 It is a structural block diagram of a multi-channel mixing processing device for implementing the embodiment of the present application.

[0120] The multi-channel mixing processing device provided in the embodiment of the present application includes the following functional modules:

[0121] The sampling module 201 is used to perform audio sampling on each audio channel to obtain an audio sample corresponding to each audio channel;

[0122] A normalization module 202, configured to perform normalization processing on each of the audio samples to obtain a target audio sample;

[0123] A fusion module 203 is used to adopt a mixing processing mechanism matching each of the target audio samples to perform mixing processing on each of the target audio samples one by one to obtain a target mixing result;

[0124] Among them, the mixing processing mechanism matching a single target audio sample is determined in the following way:

[0125] Based on the positive and negative normalized value of the target audio sample and the positive and negative normalized value of the first mix generated by the mix processing in the current audio sampling, a mix processing rule matching the target audio sample is determined.

[0126] Optionally, the normalization module includes:

[0127] A quantity determination submodule, used to determine the number of data bits of the audio sample;

[0128] A range determination submodule, for calculating a signed integer range based on the number of data bits;

[0129] A reference value determination submodule, used to determine a normalized reference value according to the signed integer number range;

[0130] The normalization processing submodule is used to perform normalization processing on each of the audio samples according to the normalization reference value to obtain a target audio sample.

[0131] Optionally, when the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing are both positive, it is determined that the target audio sample matches the first mix processing rule;

[0132] When the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing are both negative, determining that the target audio sample matches the second mix processing rule;

[0133] When the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing have different signs, determining that the target audio sample matches the third mix processing rule;

[0134] The first mixing processing rule, the second mixing processing rule and the third mixing processing rule are all different.

[0135] Optionally, the first mixing processing rule is:

[0136] Calculating a difference between a normalized value of the target audio sample and a normalized value of the first mix to obtain a first difference;

[0137] Calculating the product of the normalized value of the first mix and the first difference to obtain a first product value;

[0138] The sum of the first product value and the normalized value of the first mixed sound is determined as the normalized value of the newly generated first mixed sound.

[0139] Optionally, the second mixing processing rule is:

[0140] Calculating an absolute value of a normalized value of the first mix;

[0141] Calculating a difference between a normalized value of the first mix and a normalized value of the target audio sample to obtain a second difference;

[0142] Calculating the product of the second difference and the absolute value of the normalized value of the first mix to obtain a second product value;

[0143] The sum of the second product value and the normalized value of the target audio sample is determined as the normalized value of the newly generated first mix.

[0144] Optionally, the third mixing processing rule is:

[0145] Calculating the product of the normalized value of the target audio sample and the normalized value of the first mix to obtain a third product value;

[0146] The sum of the normalized value of the first sound mix, the normalized value of the target audio sample, and the negative number of the third product value is determined as the normalized value of the newly generated first sound mix.

[0147] The embodiments of the present application provide Figure 2 The multi-channel mixing processing device shown can realize Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0148] The multi-channel mixing processing device provided in the embodiment of the present application, on the one hand, can effectively avoid audio distortion and noise problems caused by saturation or clamping processing because the normalized value of the mixing result can be made to be between -1.0 and 1.0. On the other hand, different mixing processing rules can be flexibly used according to the different positive and negative values ​​of the audio signal sample values ​​during the mixing processing, which can effectively avoid the situation where the audio signals cancel each other out or even mute each other when they are inverted.

[0149] An embodiment of the present invention further provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus.

[0150] Memory, used to store computer programs;

[0151] The processor is used to implement the multi-channel mixing processing methods shown in the above method embodiments when executing the program stored in the memory.

[0152] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0153] The communication interface is used for communication between the above terminal and other devices.

[0154] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0155] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0156] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer implements the multi-channel mixing processing method described in any of the above embodiments.

[0157] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is executed on a computer, the computer implements the multi-channel mixing processing method described in any one of the above embodiments.

[0158] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0159] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A multi-channel mixing processing method, characterized in that: The method comprises: Performing audio sampling on each audio channel to obtain an audio sample corresponding to each audio channel; Performing normalization processing on each of the audio samples to obtain a target audio sample; Using the mixing processing rules matched by each of the target audio samples, each of the target audio samples is mixed one by one to obtain a target mixing result; The mixing processing rule matching a single target audio sample is determined as follows: Determine a mixing processing rule that matches the target audio sample based on the positive or negative normalized value of the target audio sample and the positive or negative normalized value of the first mix generated by the mixing process in the current audio sampling; the mixing processing rule can make the normalized value of the mixing result generated by the mixing process be between -1.0 and 1.0; The step of normalizing each of the audio samples to obtain a target audio sample comprises: determining the number of data bits of the audio sample; Calculating a signed integer range based on the number of data bits; Determining a normalized reference value according to the signed integer range; Normalizing each of the audio samples according to the normalization reference value to obtain a target audio sample; The step of determining a mixing processing rule that matches the target audio sample based on the positive or negative normalized value of the target audio sample and the positive or negative normalized value of the first mix generated by mixing processing in the current audio sampling includes: When the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing are both positive, determining that the target audio sample matches the first mix processing rule; When the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing are both negative, determining that the target audio sample matches the second mix processing rule; When the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing have different signs, determining that the target audio sample matches the third mix processing rule; The first mixing processing rule, the second mixing processing rule and the third mixing processing rule are all different; The first mixing processing rule is: Calculating a difference between a normalized value of the target audio sample and a normalized value of the first mix to obtain a first difference; Calculating the product of the normalized value of the first mix and the first difference to obtain a first product value; Determine the sum of the first product value and the normalized value of the first mixed sound as the normalized value of the newly generated first mixed sound; The second mixing processing rule is: Calculating an absolute value of a normalized value of the first mix; Calculating a difference between a normalized value of the first mix and a normalized value of the target audio sample to obtain a second difference; Calculating the product of the second difference and the absolute value of the normalized value of the first mix to obtain a second product value; Determine the sum of the second product value and the normalized value of the target audio sample as the normalized value of the newly generated first mix; The third mixing processing rule is: Calculating the product of the normalized value of the target audio sample and the normalized value of the first mix to obtain a third product value; The sum of the normalized value of the first sound mix, the normalized value of the target audio sample, and the negative number of the third product value is determined as the normalized value of the newly generated first sound mix.

2. A multi-channel mixing processing device, characterized in that: The device comprises: The sampling module is used to perform audio sampling on each audio channel to obtain an audio sample corresponding to each audio channel; A normalization module, used to perform normalization processing on each of the audio samples to obtain a target audio sample; A fusion module, configured to perform mixing processing on each of the target audio samples one by one using a mixing processing rule matched with each of the target audio samples to obtain a target mixing result; The mixing processing rule matching a single target audio sample is determined as follows: Determine a mixing processing rule that matches the target audio sample based on the positive or negative normalized value of the target audio sample and the positive or negative normalized value of the first mix generated by the mixing process in the current audio sampling; the mixing processing rule can make the normalized value of the mixing result generated by the mixing process be between -1.0 and 1.0; The normalization module comprises: A quantity determination submodule, used to determine the number of data bits of the audio sample; A range determination submodule, for calculating a signed integer range based on the number of data bits; A reference value determination submodule, used to determine a normalized reference value according to the signed integer number range; A normalization processing submodule, used for performing normalization processing on each of the audio samples according to the normalization reference value to obtain a target audio sample; When the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing are both positive, determining that the target audio sample matches the first mix processing rule; When the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing are both negative, determining that the target audio sample matches the second mix processing rule; When the normalized value of the target audio sample and the normalized value of the first mix generated by the mix processing have different signs, determining that the target audio sample matches the third mix processing rule; The first mixing processing rule, the second mixing processing rule and the third mixing processing rule are all different; the first mixing processing rule, the second mixing processing rule and the third mixing processing rule can all make the normalized value of the mixing result generated by the mixing processing be between -1.0 and 1.0; The first mixing processing rule is: calculating the difference between the normalized value of the target audio sample and the normalized value of the first mixing to obtain a first difference; calculating the product of the normalized value of the first mixing and the first difference to obtain a first product value; and determining the sum of the first product value and the normalized value of the first mixing as the normalized value of the newly generated first mixing; The second sound mixing processing rule is: calculating the absolute value of the normalized value of the first sound mixing; calculating the difference between the normalized value of the first sound mixing and the normalized value of the target audio sample to obtain a second difference; calculating the product of the second difference and the absolute value of the normalized value of the first sound mixing to obtain a second product value; determining the sum of the second product value and the normalized value of the target audio sample as the normalized value of the newly generated first sound mixing; The third mixing processing rule is: calculate the product of the normalized value of the target audio sample and the normalized value of the first mixing to obtain a third product value; determine the sum of the normalized value of the first mixing, the normalized value of the target audio sample and the negative number of the third product value as the normalized value of the newly generated first mixing.

3. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the multi-channel mixing processing method as claimed in claim 1 when executing the program stored in the memory.

Citation Information

Patent Citations

  • Multi-microphone audio mixing method and device

    CN102056053A

  • Multichannel sound mixing method, device and medium

    CN116962955A

  • Display equipment and sound mixing processing method for multiple paths of voice signals

    CN117133296A

  • Multi-channel audio data sound mixing method, system and device and storage medium

    CN117476026A

  • Multi-channel wet-listening and dry-recording system and sound box equipment

    CN118413767A