A gain sharing mixing system based on ping-pong timing control

The gain-sharing mixing system controlled by ping-pong timing utilizes two maximum value registers to store the maximum value of the audio source data, reducing storage and computation load. This solves the storage and computation burden of existing gain-sharing mixing methods and achieves efficient audio data processing.

CN121645078BActive Publication Date: 2026-07-10广州市迪士普音响科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
广州市迪士普音响科技有限公司
Filing Date
2025-12-19
Publication Date
2026-07-10

Smart Images

  • Figure CN121645078B_ABST
    Figure CN121645078B_ABST
Patent Text Reader

Abstract

The application discloses a gain sharing mixing system based on ping-pong timing control, which adopts two maximum value registers to save the maximum values in two continuous time segments with overlap, avoids the storage requirement of the data of the whole time segment of the audio source data, and can greatly reduce the use of storage resources; meanwhile, the maximum value is updated every time new data is obtained, and only the previous maximum value and the current input value need to be compared, and all the data of the time segment does not need to be traversed, so that the operation amount can be greatly reduced. The application solves the technical problems of large audio data storage and large operation amount of the existing gain sharing mixing method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of audio processing technology, and in particular to a gain-sharing mixing system based on ping-pong timing control. Background Technology

[0002] In conference systems, it's common to encounter scenarios where multiple microphone units are simultaneously activated for audio pickup, but there's only one on-site sound reinforcement system. This necessitates the conference host mixing the multiple audio sources before sending them to the on-site sound reinforcement system. Currently, there are three mixing methods: direct mixing, average mixing, and gain mixing. Direct mixing adds the multiple audio sources together to obtain the mixed audio. When there are many audio sources involved in the mixing, overflow and feedback issues are prone to occur. Average mixing first reduces the audio by a factor of 1 / N (where N is the number of audio sources involved in the mixing), and then adds the reduced audio sources together to obtain the mixed audio. While this avoids overflow issues, each audio source needs to be reduced by 1 / N, resulting in very low volume when there are many audio sources involved in the mixing. Gain-sharing mixing dynamically adjusts the weight of each audio source based on the size of the audio being mixed to adapt to different scenarios. The current implementation of gain-sharing mixing involves calculating the maximum value Si of each audio source within a certain time period, then summing the maximum values ​​of each source to obtain a sum S. The weight of each audio source is then obtained by dividing the maximum value Si by the sum S. This implementation requires storing all audio data for each source within the calculated time period, and recalculating the maximum value of each source within that time period for each batch of data. When mixing a large number of audio sources, this results in a large amount of data storage and computation. Therefore, reducing the storage and computational load of audio data in gain-sharing mixing is a pressing technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0003] This invention provides a gain-sharing mixing system based on ping-pong timing control, which solves the technical problems of large audio data storage and large computational load in existing gain-sharing mixing methods.

[0004] In view of this, the present invention provides a gain-sharing mixing system based on ping-pong timing control, including at least two audio source processing circuits, a summer and a mixer;

[0005] Each audio source processing circuit includes an input register, a first comparator, a second comparator, a first selector, a second selector, a third selector, a first maximum value register, a second maximum value register, a ping-pong timing controller, a weight calculation module, and a mixing preprocessing module;

[0006] The input register is used to acquire and store audio source data;

[0007] The first comparator is used to obtain sound source data from the input register and output first specified data to the first selector based on the sound source data and the value of the first maximum value register.

[0008] The first selector is used to control the output according to the first specified data and the initial value by the first control instruction of the ping-pong timing controller, and output the first output result to the first maximum value register. The initial value is the initial value of a time segment defined in the ping-pong timing controller.

[0009] The first comparator is used to obtain sound source data from the input register, and output the second specified data to the second selector based on the sound source data and the value of the second maximum value register;

[0010] The second selector, based on the second specified data and the initial value, is controlled by the second control instruction of the ping-pong timing controller to output the second output result to the second maximum value register;

[0011] The third selector is used to control the output by the third control instruction of the ping-pong timing controller based on the first and second output results, and outputs the third output result to the summer.

[0012] The summer is used to sum the third output of each audio source processing circuit to obtain the summation result;

[0013] The weighting module is used to calculate the mixing weights of each audio source processing circuit based on the summation results;

[0014] The mixing preprocessing module is used to obtain audio data from the input register, multiply the audio data by the mixing weights, and obtain preprocessed audio data.

[0015] The mixer is used to add the preprocessed audio data output from each audio source processing circuit to obtain the target mixed data and output it.

[0016] Optionally, the weight calculation module is specifically used for:

[0017] Divide the third output by the summation result to obtain the mixing weight of each audio source processing circuit.

[0018] Optionally, the initial value configured in the ping-pong timing controller is adjustable.

[0019] Optionally, the initial value configured in the ping-pong timing controller is adjusted according to the rate of change of the sound source data; the greater the rate of change of the sound source data, the smaller the initial value.

[0020] Optionally, the first control command is ping_pong_init1. When ping_pong_init1=1, the first output result is the initial value. When ping_pong_init1=0, the first output result is the first specified data.

[0021] Optionally, the second control command is ping_pong_init2. When ping_pong_init2=1, the second output result is the initial value, and when ping_pong_init2=0, the second output result is the second specified data.

[0022] Optionally, the third control command is ping_pong_ch. When ping_pong_ch=1, the third output result is the first output result, and when ping_pong_ch=0, the third output result is the second output result.

[0023] Optionally, after the ping-pong timing controller completes the reset, it assigns the initial value to the current value of the built-in counter register. The current value of the counter register is decremented by 1 in each clock cycle. When it reaches 0, the current value of the counter register is reassigned to the initial value.

[0024] Optionally, when the current value of the counter register of the ping-pong timing controller is equal to half of the initial value, ping_pong_init1=1; when the current value of the counter register of the ping-pong timing controller is equal to 0, ping_pong_init2=1; when the current value of the counter register of the ping-pong timing controller is greater than half of the initial value, ping_pong_ch=1; and when the current value of the counter register of the ping-pong timing controller is less than half of the initial value, ping_pong_ch=0.

[0025] Optionally, the initial value is 0.

[0026] As can be seen from the above technical solutions, the gain-sharing mixing system based on ping-pong timing control provided by the present invention has the following advantages:

[0027] The gain-sharing mixing system based on ping-pong timing control provided by this invention includes at least two audio source processing circuits, a summer, and a mixer. Each audio source processing circuit includes an input register, a first comparator, a second comparator, a first selector, a second selector, a third selector, a first maximum value register, a second maximum value register, a ping-pong timing controller, a weight calculation module, and a mixing preprocessing module. By using two maximum value registers to store the maximum values ​​within two consecutive and overlapping time segments, the storage requirement for the entire audio source data time segment is avoided, significantly reducing storage resource usage. Furthermore, the maximum value is updated each time new data is available; only the previous maximum value needs to be compared with the current input value, without iterating through all data in the time segment, greatly reducing computational load. This significantly saves storage resources and logical operations required to implement the gain-sharing mixing algorithm, solving the technical problems of large audio data storage and computational load in existing gain-sharing mixing methods. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 This is a schematic diagram of a gain-sharing mixing system based on ping-pong timing control provided in an embodiment of the present invention;

[0030] Figure 2 This is a schematic diagram illustrating the overlap of time segment data between two maximum value registers provided in an embodiment of the present invention;

[0031] The attached figures are labeled as follows:

[0032] 100, Input Register; 200, First Comparator; 300, Second Comparator; 400, First Selector; 500, Second Selector; 600, Ping-Pong Timing Controller; 700, First Maximum Value Register; 800, Second Maximum Value Register; 900, Third Selector; 1010, Summer; 1020, Weight Solver Module; 1030, Mixing Preprocessing Module; 1040, Mixer; TIME_INIT, Initial Value. Detailed Implementation

[0033] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0034] For easier understanding, please refer to Figure 1 The present invention provides an embodiment of a gain-sharing mixing system based on ping-pong timing control, including at least two audio source processing circuits, a summer 1010 and a mixer 1040;

[0035] Each audio source processing circuit includes an input register 100, a first comparator 200, a second comparator 300, a first selector 400, a second selector 500, a third selector 900, a first maximum value register 700, a second maximum value register 800, a ping-pong timing controller 600, a weight calculation module 1020, and a mixing preprocessing module 1030.

[0036] Input register 100 is used to acquire and store audio source data;

[0037] The first comparator 200 is used to obtain sound source data from the input register 100, and output the first specified data to the first selector 400 according to the sound source data and the value of the first maximum value register 700;

[0038] The first selector 400 is used to control the output of the ping-pong timing controller 600 according to the first specified data and the initial value, and output the first output result to the first maximum value register 700. The initial value is the initial value of a time segment defined in the ping-pong timing controller 600.

[0039] The first comparator 200 is used to obtain sound source data from the input register 100, and output the second specified data to the second selector 500 according to the sound source data and the value of the second maximum value register 800.

[0040] The second selector 500 outputs according to the second specified data and the initial value, controlled by the second control instruction of the ping-pong timing controller 600, and outputs the second output result to the second maximum value register 800.

[0041] The third selector 900 is used to control the output according to the first output result and the second output result, by the third control instruction of the ping-pong timing controller 600, and output the third output result to the summer 1010.

[0042] The summer 1010 is used to sum the third output of each audio source processing circuit to obtain the summation result;

[0043] The weighting module 1020 is used to calculate the mixing weights of each audio source processing circuit based on the summation result;

[0044] The mixing preprocessing module 1030 is used to obtain audio data from the input register 100, multiply the audio data by the mixing weight, and obtain preprocessed audio data.

[0045] Mixer 1040 is used to add the preprocessed audio data output from each audio source processing circuit to obtain the target mixed data and output it.

[0046] It should be noted that the gain-sharing mixing system based on ping-pong timing control provided in this embodiment of the invention includes at least two audio source processing circuits. One such circuit will be used as an example for explanation. Input register 100 acquires audio source data D1 and stores it in the input register 100. Audio source data D1 is then sent to the first comparator 200. The first comparator 200 acquires audio source data D1 and obtains the value MAX1 of the first maximum value register 700. Audio source data D1 is compared with the value MAX1 of the first maximum value register 700. If audio source data D1 is greater than the value MAX1 of the first maximum value register 700, the first comparator 200 outputs audio source data D1; otherwise, it outputs the value MAX1 of the first maximum value register 700. The value output from the first comparator 200 enters the first selector 400, which is controlled by the first control instruction ping_pong_init1 of the ping-pong timing controller 600. The ping-pong timing controller 600 has a defined initial value TIME_INIT for a time segment. When the first control instruction ping_pong_init1=1, the first selector 400 selects the initial value TIME_INIT as its output. When the first control instruction ping_pong_init1=0, the first selector 400 selects the output of the first comparator 200 as its output. The output value of the first selector 400 is stored in the first maximum value register 700. Similarly, the sound source data D1 is compared with the value MAX2 of the second maximum register in the second comparator 300. If the sound source data D1 is greater than the value MAX2 of the second maximum register, the second comparator 300 outputs the sound source data D1; otherwise, the second comparator 300 outputs the value MAX2 of the second maximum register. The output value of the second comparator 300 is fed into the second selector 500. The second selector 500 is controlled by the second control instruction ping_pong_init2 of the ping-pong timing controller 600. When the second control instruction ping_pong_init2 = 1, the second selector 500 selects the initial value TIME_INIT as its output. When the second control instruction ping_pong_init2 = 0, the second selector 500 selects the output result of the second comparator 300 as its output. The output of the second selector 500 is stored in the second maximum value register 800.The data from the first maximum value register 700 and the second maximum value register 800 will enter the third selector 900. The third selector 900 is controlled by the third control instruction ping_pong_ch of the ping-pong timing controller 600. When the third control instruction ping_pong_ch=1, the third selector 900 selects the output result of the first maximum value register 700 (i.e., the maximum value stored in the first maximum value register 700) as the output. When the third control instruction ping_pong_ch=0, the third selector 900 selects the output result of the second maximum value register 800 (i.e., the maximum value stored in the second maximum value register 800) as the output.

[0047] After each audio source data participating in the mixing is processed as described above, it yields MAXi (where i represents the audio source data of the i-th channel participating in the mixing, and MAXi is the output of the third selector 900). MAXi is output to the summer 1010, which sums all MAXi values ​​to obtain the summation result SUM. Then, the weighting module 1020 calculates the proportion of MAXi in SUM for each channel, obtaining the mixing weight Wi for each audio source processing circuit, Wi = (MAXi / SUM). After obtaining the weight Wi for each audio source, mixing preprocessing is performed. When the mixing preprocessing module 1030 performs mixing preprocessing, it retrieves the latest acquired audio source data Di (i.e., the audio source data of the i-th channel participating in the mixing) from the input register 100, and then multiplies it with the weight Wi of that channel to obtain the preprocessed audio data D_NEWi for that channel, D_NEWi = Di * Wi. After obtaining the preprocessed audio data D_NEWi of all the audio sources involved in the mixing, the preprocessed audio data D_NEWi output by each audio source processing circuit is added together in the mixer 1040 to obtain the target mixing data and output it.

[0048] The Ping Pong Timing Controller 600 is a loop counter used to process input data in time segments. The Ping Pong Timing Controller 600 defines an initial value TIME_INIT for each time segment. After a reset, the initial value TIME_INIT is assigned to the current value cnt_time in the built-in counter register. In one embodiment, the initial value TIME_INIT is 0. The counter register cnt_time decrements by 1 each clock cycle. When cnt_time reaches 0, it is reassigned to TIME_INIT, and this process repeats. The value of TIME_INIT determines the amount of audio data covered by the audio segmentation. In practice, this value can be adjusted as needed; a smaller value is needed when the input audio data changes rapidly, and a larger value is needed when the input audio data changes slowly. During the counting process, cnt_time generates three signals: a first control instruction ping_pong_init1, a second control instruction ping_pong_init2, and a third control instruction ping_pong_ch. When cnt_time = (TIME_INIT / 2), ping_pong_init1 will be set high (ping_pong_init1 = 1); otherwise, ping_pong_init1 will be set low (ping_pong_init1 = 0). When cnt_time = 0, ping_pong_init2 will be set high (ping_pong_init2 = 1); otherwise, ping_pong_init2 will be set low (ping_pong_init2 = 0). When cnt_time is greater than or equal to (TIME_INIT / 2), ping_pong_ch will be set high (ping_pong_ch = 1); when cnt_time is less than (TIME_INIT / 2), ping_pong_ch will be set low (ping_pong_ch = 0). Figure 2As shown, when the first maximum value register 700 stores the maximum value within half of the time segment, the value of register 1 (selected when ping_pong_ch = 1) is used as the maximum value of that audio source. Simultaneously, the second maximum value register 800 is initialized to its initial value (initialized when ping_pong_init2 = 1). Then, both registers 700 and 800 store the maximum value within their respective time segments. When the first maximum value register 700 reaches the end of the time segment, the value of the second maximum value register 800 (selected when ping_pong_ch = 0) is used as the maximum value of that audio source. Simultaneously, the first maximum value register 700 is initialized to its initial value (initialized when ping_pong_init1 = 1). Then, both registers 700 and 800 store the maximum value within their respective time segments. When the second maximum value register 800 reaches the end of the time segment, the first maximum value register 700 has already reached half of the time segment, and the above process is repeated. The maximum value obtained for each channel can reflect the status of that audio channel in the current time segment in real time, providing a basis for subsequent mixing weight allocation. Two maximum value registers are used to store the maximum values ​​within two consecutive time segments that overlap by half, avoiding the need to store data for the entire time segment and significantly reducing storage resource usage. Furthermore, the maximum value is updated each time new data is available; only the previous maximum value needs to be compared with the current input value. This avoids iterating through all the data in the time segment, greatly reducing the computational load.

[0049] The gain-sharing mixing system based on ping-pong timing control provided by this invention includes at least two audio source processing circuits, a summer 1010, and a mixer 1040. Each audio source processing circuit includes an input register 100, a first comparator 200, a second comparator 300, a first selector 400, a second selector 500, a third selector 900, a first maximum value register 700, a second maximum value register 800, a ping-pong timing controller 600, a weight calculation module 1020, and a mixing preprocessing module 1030. By using two maximum value registers to store the maximum values ​​within two consecutive and overlapping time segments, the storage requirement for the entire audio source data time segment is avoided, greatly reducing the use of storage resources. Furthermore, the maximum value is updated each time new data is available; only the previous maximum value needs to be compared with the current input value, without iterating through all the data in the time segment, significantly reducing the computational load. It greatly saves the storage resources and logical operations required to implement the gain-sharing mixing algorithm, and solves the technical problems of large storage and computational requirements of existing gain-sharing mixing methods.

[0050] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A gain-sharing mixing system based on ping-pong timing control, characterized in that, Includes at least two audio source processing circuits, a summer, and a mixer; Each audio source processing circuit includes an input register, a first comparator, a second comparator, a first selector, a second selector, a third selector, a first maximum value register, a second maximum value register, a ping-pong timing controller, a weight calculation module, and a mixing preprocessing module; The input register is used to acquire and store audio source data; The first comparator is used to obtain sound source data from the input register and output first specified data to the first selector based on the sound source data and the value of the first maximum value register. The first selector is used to control the output according to the first specified data and the initial value by the first control instruction of the ping-pong timing controller, and output the first output result to the first maximum value register. The initial value is the initial value of a time segment defined in the ping-pong timing controller. The first comparator is used to obtain sound source data from the input register, and output the second specified data to the second selector based on the sound source data and the value of the second maximum value register; The second selector, based on the second specified data and the initial value, is controlled by the second control instruction of the ping-pong timing controller to output the second output result to the second maximum value register; The third selector is used to control the output by the third control instruction of the ping-pong timing controller based on the first and second output results, and outputs the third output result to the summer. The summer is used to sum the third output of each audio source processing circuit to obtain the summation result; The weighting module is used to calculate the mixing weights of each audio source processing circuit based on the summation results; The mixing preprocessing module is used to obtain audio data from the input register, multiply the audio data by the mixing weights, and obtain preprocessed audio data. The mixer is used to add the preprocessed audio data output from each audio source processing circuit to obtain the target mixed data and output it.

2. The gain-sharing mixing system based on ping-pong timing control according to claim 1, characterized in that, The weight calculation module is specifically used for: Divide the third output by the summation result to obtain the mixing weight of each audio source processing circuit.

3. The gain-sharing mixing system based on ping-pong timing control according to claim 1, characterized in that, The initial value configured in the ping-pong timing controller is adjustable.

4. The gain-sharing mixing system based on ping-pong timing control according to claim 3, characterized in that, The initial value configured in the ping-pong timing controller is adjusted according to the rate of change of the sound source data. The faster the sound source data changes, the smaller the initial value becomes.

5. The gain-sharing mixing system based on ping-pong timing control according to claim 3, characterized in that, The first control command is ping_pong_init1. When ping_pong_init1=1, the first output result is the initial value. When ping_pong_init1=0, the first output result is the first specified data.

6. The gain-sharing mixing system based on ping-pong timing control according to claim 5, characterized in that, The second control command is ping_pong_init2. When ping_pong_init2=1, the second output result is the initial value. When ping_pong_init2=0, the second output result is the second specified data.

7. The gain-sharing mixing system based on ping-pong timing control according to claim 6, characterized in that, The third control command is ping_pong_ch. When ping_pong_ch=1, the third output result is the first output result. When ping_pong_ch=0, the third output result is the second output result.

8. The gain-sharing mixing system based on ping-pong timing control according to claim 7, characterized in that, After the ping-pong timing controller completes the reset, it assigns the initial value to the current value of the built-in counter register. The current value of the counter register is decremented by 1 in each clock cycle. When it reaches 0, the current value of the counter register is reassigned to the initial value.

9. The gain-sharing mixing system based on ping-pong timing control according to claim 8, characterized in that, When the current value of the ping-pong timing controller's counter register is equal to half of the initial value, ping_pong_init1=1; when the current value of the ping-pong timing controller's counter register is equal to 0, ping_pong_init2=1; when the current value of the ping-pong timing controller's counter register is greater than half of the initial value, ping_pong_ch=1; and when the current value of the ping-pong timing controller's counter register is less than half of the initial value, ping_pong_ch=0.

10. The gain-sharing mixing system based on ping-pong timing control according to claim 1, characterized in that, The initial value is 0.

Citation Information

Patent Citations

  • Electronic musical instrument, method, and storage medium

    CN110299128A

  • Digital automatic gain control device and control method based on double caches

    CN113992170A