CN112133267B - Audio effect processing method, device and storage medium - Google Patents
Audio effect processing method, device and storage medium Download PDFInfo
- Publication number
- CN112133267B CN112133267B CN202010923205.2A CN202010923205A CN112133267B CN 112133267 B CN112133267 B CN 112133267B CN 202010923205 A CN202010923205 A CN 202010923205A CN 112133267 B CN112133267 B CN 112133267B
- Authority
- CN
- China
- Prior art keywords
- frequency point
- parameter
- effect
- effect parameter
- audio
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000000694 effects Effects 0.000 title claims abstract description 344
- 238000003672 processing method Methods 0.000 title description 2
- 230000007704 transition Effects 0.000 claims abstract description 104
- 238000012545 processing Methods 0.000 claims abstract description 74
- 238000000034 method Methods 0.000 claims abstract description 53
- 238000005192 partition Methods 0.000 claims description 17
- 230000000875 corresponding effect Effects 0.000 description 161
- 230000002093 peripheral effect Effects 0.000 description 10
- 230000001133 acceleration Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 230000035772 mutation Effects 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 230000000903 blocking effect Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 239000000919 ceramic Substances 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 239000010409 thin film Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10H—ELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
- G10H1/00—Details of electrophonic musical instruments
- G10H1/02—Means for controlling the tone frequencies, e.g. attack or decay; Means for producing special musical effects, e.g. vibratos or glissandos
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10H—ELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
- G10H1/00—Details of electrophonic musical instruments
- G10H1/02—Means for controlling the tone frequencies, e.g. attack or decay; Means for producing special musical effects, e.g. vibratos or glissandos
- G10H1/06—Circuits for establishing the harmonic content of tones, or other arrangements for changing the tone colour
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10H—ELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
- G10H2210/00—Aspects or methods of musical processing having intrinsic musical character, i.e. involving musical theory or musical parameters or relying on musical knowledge, as applied in electrophonic musical tools or instruments
- G10H2210/155—Musical effects
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Circuit For Audible Band Transducer (AREA)
Abstract
The application discloses a method, a device, equipment and a storage medium for processing audio effects, and belongs to the technical field of computers. The method comprises the following steps: determining an effect parameter switching time point in the target audio, acquiring a first effect parameter before the effect parameter switching time point and a second effect parameter after the effect parameter switching time point, and determining a transition effect parameter based on the second effect parameter; determining at least one transitional audio frame based on the effect parameter switching time point; each transition audio frame is subjected to time domain, a plurality of corresponding blocks are obtained for each transition audio frame, and at least one target block is selected from the plurality of blocks; for each target block, performing effect processing on the target block based on a parameter segment corresponding to the frequency band of the target block in the transition effect parameter, and for each block except the target block, performing effect processing on the block based on a parameter segment corresponding to the frequency band of the block in the first effect parameter. The hearing experience can be improved through the method and the device.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing an audio effect.
Background
In daily life, a user may request an audio data and select an effect to perform an effect process on the audio data, for example, a pop, classical, jazz, etc. effect process. Before playing the audio data, the terminal may input the audio data into a filter, where the filter includes an effect parameter, and further multiply each audio frame in the audio data with the corresponding effect parameter to obtain filtered audio data.
In carrying out the present application, the inventors have found that the prior art has at least the following problems:
the user can set different effects on different audio segments of the audio data, so that at the effect parameter switching time point, the hearing effect between the front audio frame and the rear audio frame can be suddenly changed, and the hearing experience is poor.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for processing audio effects, which can solve the problem of poor hearing experience. The technical scheme is as follows:
in one aspect, a method of audio effect processing is provided, the method comprising:
determining an effect parameter switching time point in target audio, acquiring a first effect parameter before the effect parameter switching time point and a second effect parameter after the effect parameter switching time point, and determining a transition effect parameter based on the second effect parameter;
Determining at least one transitional audio frame based on the effect parameter switching time point;
each transition audio frame is subjected to time domain, a plurality of corresponding blocks are obtained for each transition audio frame, and at least one target block is selected from the plurality of blocks, wherein the at least one target block is a part of all blocks corresponding to all transition audio frames;
and for each target block, performing effect processing on the target block based on a parameter segment corresponding to the frequency band of the target block in the transition effect parameter, and for each block except the target block, performing effect processing on the block based on a parameter segment corresponding to the frequency band of the block in the first effect parameter.
Optionally, the determining the effect parameter switching time point in the target audio includes:
when an effect adjustment instruction is received, determining a time point when the effect adjustment instruction is received as an effect parameter switching time point in target audio; or,
an effect parameter switching time point in the pre-stored target audio is determined.
Optionally, the determining at least one transitional audio frame based on the effect parameter switching time point includes:
And selecting a continuous preset number of transition audio frames from the effect parameter switching time point backwards.
Optionally, the number of target blocks selected from the nth transition audio frame selected backward from the effect parameter switching time point is N.
Optionally, the number of the transition audio frames is the same as the number of the blocks corresponding to each transition audio frame.
Optionally, the determining a transitional effect parameter based on the second effect parameter includes:
and determining the second effect parameter as a transitional effect parameter.
Optionally, the determining a transitional effect parameter based on the second effect parameter includes:
and determining an average value of the first effect parameter and the second effect parameter as a transition effect parameter.
Optionally, the performing effect processing on the target block based on the parameter segment corresponding to the frequency band of the target block in the transition effect parameter includes:
and for each frequency point in the frequency band of the target block, determining an adjusted amplitude value corresponding to the frequency point based on amplitude values corresponding to the frequency point and adjacent frequency points of the frequency point in the target block, parameter values corresponding to the frequency point in the transition effect parameter, parameter values corresponding to the adjacent frequency point in the first effect parameter and parameter values corresponding to the adjacent frequency point in the second effect parameter.
Optionally, the determining, based on the amplitude values corresponding to the frequency point and the adjacent frequency point of the frequency point in the target block, the parameter values corresponding to the frequency point in the transition effect parameter, the parameter values corresponding to the adjacent frequency point in the first effect parameter, and the parameter values corresponding to the adjacent frequency point in the second effect parameter, the adjusted amplitude value corresponding to the frequency point includes:
if the frequency point is the minimum frequency point of the audio frame frequency range, the method is based on a formula Y nk =X k *(A 1k +A 2k )/2+X k+1 *(A 1(k+1) -A 2(k+1) And/4 determining the adjusted amplitude value corresponding to the frequency point, wherein X k For the amplitude value corresponding to the kth frequency point, X k+1 A is the amplitude value corresponding to the next frequency point of the kth frequency point, A 1k For the corresponding parameter value of the kth frequency point in the first effect parameter, A 2k For the parameter value corresponding to the kth frequency point in the second effect parameter, A 1(k+1) For the corresponding parameter value of the next frequency point of the kth frequency point in the first effect parameter, A 2(k+1) For the corresponding parameter value of the next frequency point of the kth frequency point in the second effect parameter, Y nk The adjusted amplitude value corresponding to the kth frequency point in the nth audio frame; and/or
If the frequency point is the maximum frequency point of the audio frame frequency range, the method is based on a formula Y nk =X k *(A 1k +A 2k )/2+X k-1 *(A 1(k-1) -A 2(k-1) ) And/4, determining an adjusted amplitude value corresponding to the frequency point, wherein X k For the amplitude value corresponding to the kth frequency point, X k-1 A is the amplitude value corresponding to the last frequency point of the kth frequency point, A 1k For the corresponding parameter value of the kth frequency point in the first effect parameter, A 2k For the parameter value corresponding to the kth frequency point in the second effect parameter, A 1(k-1) For the corresponding parameter value of the last frequency point of the kth frequency point in the first effect parameter, A 2(k-1) For the corresponding parameter value of the last frequency point of the kth frequency point in the second effect parameter, Y nk The adjusted amplitude value corresponding to the kth frequency point in the nth audio frame; and/or
If the frequency point is not the minimum frequency point or the maximum frequency point of the audio frequency range, the method is based on a formula Y nk =X k *(A 1k +A 2k )/2+X k-1 *(A 1(k-1) -A 2(k-1) )/4+X k+1 *(A 1(k+1) -A 2(k+1) ) And/4, determining an adjusted amplitude value corresponding to the frequency point, wherein X k For the amplitude value corresponding to the kth frequency point, X k+1 A is the amplitude value corresponding to the next frequency point of the kth frequency point, A 1k For the corresponding parameter value of the kth frequency point in the first effect parameter, A 2k For the parameter value corresponding to the kth frequency point in the second effect parameter, A 1(k+1) For the corresponding parameter value of the next frequency point of the kth frequency point in the first effect parameter, A 2(k+1) For the kth frequency pointCorresponding parameter value of the next frequency point in the second effect parameter, A 1(k-1) For the corresponding parameter value of the last frequency point of the kth frequency point in the first effect parameter, A 2(k-1) For the corresponding parameter value of the last frequency point of the kth frequency point in the second effect parameter, Y nk And the adjusted amplitude value corresponding to the kth frequency point in the nth audio frame.
In another aspect, there is provided an apparatus for audio effect processing, the apparatus comprising:
the device comprises a determining module, a calculating module and a calculating module, wherein the determining module is used for determining an effect parameter switching time point in target audio, acquiring a first effect parameter before the effect parameter switching time point and a second effect parameter after the effect parameter switching time point, and determining a transition effect parameter based on the second effect parameter;
the determining module is further used for determining at least one transition audio frame based on the effect parameter switching time point;
the acquisition module is used for acquiring a plurality of corresponding blocks of each transition audio frame in a time domain, and selecting at least one target block from the plurality of blocks, wherein the at least one target block is a part of all blocks corresponding to all transition audio frames;
and the processing module is used for carrying out effect processing on the target blocks based on the parameter segments corresponding to the frequency bands of the target blocks in the transition effect parameters, and carrying out effect processing on the blocks based on the parameter segments corresponding to the frequency bands of the blocks in the first effect parameters for each block except the target blocks.
Optionally, the determining module is configured to:
when an effect adjustment instruction is received, determining a time point when the effect adjustment instruction is received as an effect parameter switching time point in target audio; or,
an effect parameter switching time point in the pre-stored target audio is determined.
Optionally, the determining module is configured to:
and selecting a continuous preset number of transition audio frames from the effect parameter switching time point backwards.
Optionally, the number of target blocks selected from the nth transition audio frame selected backward from the effect parameter switching time point is N.
Optionally, the number of the transition audio frames is the same as the number of the blocks corresponding to each transition audio frame.
Optionally, the determining module is configured to:
and determining the second effect parameter as a transitional effect parameter.
Optionally, the determining module is configured to:
and determining an average value of the first effect parameter and the second effect parameter as a transition effect parameter.
Optionally, the processing module is configured to:
and for each frequency point in the frequency band of the target block, determining an adjusted amplitude value corresponding to the frequency point based on amplitude values corresponding to the frequency point and adjacent frequency points of the frequency point in the target block, parameter values corresponding to the frequency point in the transition effect parameter, parameter values corresponding to the adjacent frequency point in the first effect parameter and parameter values corresponding to the adjacent frequency point in the second effect parameter.
Optionally, the processing module is configured to:
if the frequency point is the minimum frequency point of the audio frame frequency range, the method is based on a formula Y nk =X k *(A 1k +A 2k )/2+X k+1 *(A 1(k+1) -A 2(k+1) ) And/4, determining an adjusted amplitude value corresponding to the frequency point, wherein X k For the amplitude value corresponding to the kth frequency point, X k+1 A is the amplitude value corresponding to the next frequency point of the kth frequency point, A 1k For the corresponding parameter value of the kth frequency point in the first effect parameter, A 2k For the parameter value corresponding to the kth frequency point in the second effect parameter, A 1(k+1) For the corresponding parameter value of the next frequency point of the kth frequency point in the first effect parameter, A 2(k+1) For the corresponding parameter value of the next frequency point of the kth frequency point in the second effect parameter, Y nk The adjusted amplitude value corresponding to the kth frequency point in the nth audio frame; and/or
If the frequency point is the maximum frequency point of the audio frame frequency range, the method is based on a formula Y nk =X k *(A 1k +A 2k )/2+X k-1 *(A 1(k-1) -A 2(k-1) ) And/4, determining an adjusted amplitude value corresponding to the frequency point, wherein X k For the amplitude value corresponding to the kth frequency point, X k-1 A is the amplitude value corresponding to the last frequency point of the kth frequency point, A 1k For the corresponding parameter value of the kth frequency point in the first effect parameter, A 2k For the parameter value corresponding to the kth frequency point in the second effect parameter, A 1(k-1) For the corresponding parameter value of the last frequency point of the kth frequency point in the first effect parameter, A 2(k-1) For the corresponding parameter value of the last frequency point of the kth frequency point in the second effect parameter, Y nk The adjusted amplitude value corresponding to the kth frequency point in the nth audio frame; and/or
If the frequency point is not the minimum frequency point or the maximum frequency point of the audio frequency range, the method is based on a formula Y nk =X k *(A 1k +A 2k )/2+X k-1 *(A 1(k-1) -A 2(k-1) )/4+X k+1 *(A 1(k+1) -A 2(k+1) ) And/4, determining an adjusted amplitude value corresponding to the frequency point, wherein X k For the amplitude value corresponding to the kth frequency point, X k+1 A is the amplitude value corresponding to the next frequency point of the kth frequency point, A 1k For the corresponding parameter value of the kth frequency point in the first effect parameter, A 2k For the parameter value corresponding to the kth frequency point in the second effect parameter, A 1(k+1) For the corresponding parameter value of the next frequency point of the kth frequency point in the first effect parameter, A 2(k+1) For the corresponding parameter value of the next frequency point of the kth frequency point in the second effect parameter, A 1(k-1) For the corresponding parameter value of the last frequency point of the kth frequency point in the first effect parameter, A 2(k-1) Corresponding parameter value in the second effect parameter for the last frequency point of the kth frequency point,Y nk And the adjusted amplitude value corresponding to the kth frequency point in the nth audio frame.
In yet another aspect, a computer device is provided that includes a processor and a memory having instructions stored therein that, when executed by the processor, cause the computer device to implement a method of the audio effect processing.
In yet another aspect, a computer-readable storage medium storing instructions that are executed by a computer device to cause the computer device to implement a method of the audio effect processing is provided.
The beneficial effects that technical scheme that this application embodiment provided brought are:
according to the scheme, the transition effect parameters and the transition audio frames are determined based on the second effect parameters, then the transition audio frames are segmented, and then the transition audio frames are segmented based on the transition effect parameters, so that the auditory effect mutation generated during effect parameter switching is relieved through the transition audio frames, and the auditory experience of a user can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic illustration of an implementation environment provided by an embodiment of the present application;
FIG. 2 is a flow chart of a method for audio effect processing provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of a transitional audio frame provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of an apparatus for audio effect processing according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a terminal structure provided in an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The application provides a method for processing audio effects, which can be realized by a terminal, wherein the terminal can be a mobile phone, a desktop computer, a tablet computer, a notebook computer, an intelligent wearable device and the like, and the terminal can be provided with a data receiving and transmitting part, an audio output part, an audio input part and a filter. The terminal may have a function of playing audio and a function of processing audio, and may be installed with an audio playing application, an audio recording application, and an audio editing application.
As shown in fig. 1, after the terminal acquires audio (the audio may be a complete audio or an audio stream), the terminal may decode the audio to obtain decoded audio. Then, the terminal can input the decoded audio into the filter, and the filter can perform effect processing on the decoded audio according to the setting of a user to obtain the processed audio.
Fig. 2 is a flowchart of an audio effect processing provided in an embodiment of the present application. Referring to fig. 2, the process includes:
step 201, determining an effect parameter switching time point in the target audio, acquiring a first effect parameter before the effect parameter switching time point and a second effect parameter after the effect parameter switching time point, and determining a transition effect parameter based on the second effect parameter.
In implementation, first, when determining an effect parameter switching time point in the target audio, the scheme may have different processing manners for different scenes:
first, when an effect adjustment instruction is received, a time point at which the effect adjustment instruction is received is determined as an effect parameter switching time point in the target audio.
In implementation, when a user uses an audio playing application program, the user can request a song, and then the server can send audio corresponding to the song (i.e. target audio) to the terminal in the form of an audio stream, and then the terminal decodes the audio stream and inputs the audio stream into the filter, so that an audio stream after effect processing is obtained. When the above processing is performed, the user may trigger the effect adjustment control to adjust the effect, for example, when the user triggers the effect adjustment control to adjust the playing effect from popular to classical, after the user triggers the corresponding control, an effect adjustment instruction is generated, and then the terminal may determine the time point when the terminal receives the effect adjustment instruction as the time point when the effect parameter in the target audio is switched.
Optionally, when the user uses the audio playing application, the user may request a song, if the audio corresponding to the song is stored in the terminal or is cached in the terminal, the terminal may directly obtain the stored or cached audio (i.e. the target audio), and then the terminal decodes the audio and inputs the decoded audio into the filter, thereby obtaining the audio after the effect processing. When playing the audio after the effect processing, the user can trigger the effect adjusting control to adjust the effect, for example, when the user triggers the effect adjusting control to adjust the playing effect from popular to classical, after the user triggers the corresponding control, an effect adjusting instruction is generated, and then the terminal can determine the time point when the terminal receives the effect adjusting instruction as the effect parameter switching time point in the target audio.
Optionally, when the user uses the audio recording application, the user may record a section of audio using the audio recording application, and in the recording process, the user may trigger an effect adjustment control to adjust an effect, for example, the user triggers the effect adjustment control to adjust a playing effect from popular to classical, after the user triggers the corresponding control, an effect adjustment instruction is generated, and then the terminal may determine a time point when the terminal receives the effect adjustment instruction as an effect parameter switching time point in the target audio.
Second, an effect parameter switching time point in the target audio stored in advance is determined.
In implementation, when a user uses an audio playing application program, the user can order a song, the audio corresponding to the song can be stored in the terminal or cached in the terminal, the corresponding terminal can store the effect parameter switching time point in the target audio, and then the terminal can directly acquire the effect parameter switching time point in the pre-stored target audio.
Alternatively, when the user uses the audio editing application, the user may load the target audio through the above-mentioned audio editing application, and further the user may adjust the effect of the target audio through the audio editing application, for example, adjust the effect of the first 1 minute of the audio to be popular and adjust the effect of the last 1 minute of the audio to be classical. When the editing of the target audio is completed, the terminal can save the effect parameter switching time point in the target audio. Further, before playing the target audio, the terminal may acquire an effect parameter switching time point in the pre-stored target audio.
Secondly, after determining the effect parameter switching time point in the target audio, the terminal may acquire a first effect parameter before the effect parameter switching time point and a second effect parameter after the effect parameter switching time point.
For example, after determining the effect parameter switching time point in the target audio, the terminal may acquire a first effect parameter corresponding to the "no" effect before the effect parameter switching time point and a second effect parameter corresponding to the "popular" effect after the effect parameter switching time point.
Then, a transitional effect parameter is determined based on the second effect parameter, which can be determined in several ways:
in the first mode, the second effect parameter is directly determined as the transition effect parameter.
In a second mode, an average value of the first effect parameter and the second effect parameter is determined as the transition effect parameter.
It should be noted that the transition effect parameter may be a vector, which may correspond to each frequency point in each audio frame in the target audio.
Step 202, determining at least one transition audio frame based on the effect parameter switching time point.
In implementation, after the processing in step 201, the terminal may obtain an effect parameter switching time point, and then the terminal may select a continuous preset number of audio frames from the effect parameter switching time point as transition audio frames.
Step 203, each transition audio frame is time-domain processed, a plurality of corresponding blocks are obtained for each transition audio frame, and at least one target block is selected from the plurality of blocks.
Wherein the at least one target block is part of all blocks corresponding to all transition audio frames.
In implementation, the above-mentioned transition audio frames are obtained, and each transition audio frame is combined with the previous transition audio frame, where the length of each transition audio frame is n, so as to generate a vector with length of 2n, and then the terminal may obtain a block of the vector with length of 2 n. And then obtaining a plurality of blocks corresponding to each transition audio frame. At least one of the plurality of partitions corresponding to each transition audio frame is then determined as a target partition.
The number of target blocks selected from the Nth transition audio frame selected from the effect parameter switching time point is N.
For example, as shown in fig. 3, one transition audio frame is divided into 3 partitions, any one of the 3 partitions may be determined as a target partition in the first transition audio frame, any two of the 3 partitions may be determined as target partitions in the second transition audio frame, and all 3 partitions may be determined as target partitions in the third transition audio frame.
It should be noted that the number of transition audio frames is the same as the number of blocks corresponding to each transition audio frame.
Optionally, before performing the above processing, the terminal may perform a blocking processing on the audio frame and the corresponding parameter in the target audio.
In implementation, the terminal may acquire the time domain data of the audio frame, then the terminal may divide the time domain data of the audio frame and the corresponding parameters into a preset number of blocks according to the setting of a technician, and then convert the blocks of the time domain data into the blocks of the frequency domain data through inverse fast fourier transform.
Then, the terminal may perform zero padding processing on the blocks of each parameter, so that the length of the parameter is changed from n to 2n to obtain blocks of the parameter subjected to zero padding processing, and combine the blocks of each audio frame with the corresponding blocks of the previous audio frame, where the length of each audio frame is n, so as to generate a block of a vector with the length of 2 n.
The parameters may be a first effect parameter, a second effect parameter, and a transition effect parameter. The above parameters may actually be a vector.
It should be noted that, because the calculation amount is great when the processing is performed in the time domain, the above scheme can be adopted to perform the circumferential convolution (i.e. multiplication of each frequency point by point and the corresponding parameter) operation processing on the audio frame and the parameter in the target audio in the frequency domain, i.e. all the audio frames are converted into the frequency domain data to perform the calculation, and the algorithm complexity can be calculated by O (N 2 Down to O (N log (N)).
And 204, for each target block, performing effect processing on the target block based on the parameter segment corresponding to the frequency band of the target block in the transition effect parameter, and for each block except the target block, performing effect processing on the block based on the parameter segment corresponding to the frequency band of the block in the first effect parameter.
In implementation, after determining the target block, the terminal may perform the following several different effect processes on the target block based on the two different transitional effect parameter determining manners in the step 201:
first, if the transition effect parameter is a second effect parameter. And for each frequency point in the frequency band of the target block, determining the parameter value corresponding to the frequency point in the second effect parameter as the adjusted amplitude value corresponding to the frequency point.
In practice, based on formula Y nk =X k *A 2k And determining an adjusted amplitude value corresponding to the frequency point.
Wherein n in the formula is the identification of the audio frame, k is the identification of each frequency point in the audio frame, A 2 And the parameter value corresponding to the frequency point in the transition effect parameter is obtained.
For example, the target block of the first transitional video frame shown in fig. 3 is processed, and the target block contains 32 frequency points, then based on the formula Y 1k =X k *A 2k And calculating the adjusted amplitude values of the 32 frequency points according to the amplitude value of each frequency point and the parameter value corresponding to the frequency point in the second effect parameter.
Second, if the transition effect parameter is determined by calculating an average value of the first effect parameter and the second effect parameter, for each frequency point in the frequency band of the target block, the adjusted amplitude value corresponding to the frequency point is determined based on the amplitude value corresponding to the frequency point and the adjacent frequency point of the frequency point in the target block, the parameter value corresponding to the frequency point in the transition effect parameter, the parameter value corresponding to the adjacent frequency point in the first effect parameter, and the parameter value corresponding to the adjacent frequency point in the second effect parameter.
In implementation, the terminal may perform different processing according to different audio frame frequency ranges where the frequency points are located:
if the frequency point is the minimum frequency point of the audio frame frequency range, the method is based on the formula Y nk =X k *(A 1k +A 2k )/2+X k+1 *(A 1(k+1) -A 2(k+1) ) And/4, determining the adjusted amplitude value corresponding to the frequency point.
Wherein X is k For the amplitude value corresponding to the kth frequency point, X k+1 A is the amplitude value corresponding to the next frequency point of the kth frequency point, A 1k For the corresponding parameter value of the kth frequency point in the first effect parameter, A 2k For the parameter value corresponding to the kth frequency point in the second effect parameter, A 1(k+1) For the corresponding parameter value of the next frequency point of the kth frequency point in the first effect parameter, A 2(k+1) For the corresponding parameter value of the next frequency point of the kth frequency point in the second effect parameter, Y nk And the adjusted amplitude value corresponding to the kth frequency point in the nth audio frame.
If the frequency pointIs the maximum frequency point of the audio frame frequency range, then based on formula Y nk =X k *(A 1k +A 2k )/2+X k-1 *(A 1(k-1) -A 2(k-1) ) And/4, determining the adjusted amplitude value corresponding to the frequency point.
Wherein X is k For the amplitude value corresponding to the kth frequency point, X k-1 A is the amplitude value corresponding to the last frequency point of the kth frequency point, A 1k For the corresponding parameter value of the kth frequency point in the first effect parameter, A 2k For the parameter value corresponding to the kth frequency point in the second effect parameter, A 1(k-1) For the corresponding parameter value of the last frequency point of the kth frequency point in the first effect parameter, A 2(k-1) For the corresponding parameter value of the last frequency point of the kth frequency point in the second effect parameter, Y nk And the adjusted amplitude value corresponding to the kth frequency point in the nth audio frame.
If the frequency point is not the minimum frequency point or the maximum frequency point of the audio frequency range, based on the formula Y nk =X k *(A 1k +A 2k )/2+X k-1 *(A 1(k-1) -A 2(k-1) )/4+X k+1 *(A 1(k+1) -A 2(k+1) ) And/4, determining the adjusted amplitude value corresponding to the frequency point.
Wherein X is k For the amplitude value corresponding to the kth frequency point, X k+1 A is the amplitude value corresponding to the next frequency point of the kth frequency point, A 1k For the corresponding parameter value of the kth frequency point in the first effect parameter, A 2k For the parameter value corresponding to the kth frequency point in the second effect parameter, A 1(k+1) For the corresponding parameter value of the next frequency point of the kth frequency point in the first effect parameter, A 2(k+1) For the corresponding parameter value of the next frequency point of the kth frequency point in the second effect parameter, A 1(k-1) For the corresponding parameter value of the last frequency point of the kth frequency point in the first effect parameter, A 2(k-1) For the corresponding parameter value of the last frequency point of the kth frequency point in the second effect parameter, Y nk And the adjusted amplitude value corresponding to the kth frequency point in the nth audio frame.
It should be noted that, in order to make the frequency points relatively flatSlide, the proposal increases the adjustment value (A 1(k+1) -A 2(k+1) )/4、(A 1(k-1) -A 2(k-1) ) And/4, taking into account the influence between adjacent frequency points.
Alternatively, the terminal may not block the transition audio frame, and directly pass through formula Y nk =X k *(A 1k +A 2k )/2+X k-1 *(A 1(k-1) -A 2(k-1) )/4+X k+1 *(A 1(k+1) -A 2(k+1) ) And/4 processing the audio frames.
For example, when the user uses the audio playing application, the user requests audio stored locally at the terminal, the terminal determines the transitional effect parameters based on the method of step 201 described above, and determines at least one audio frame based on the method of step 202 described above. The terminal then bases on the formula, Y nk =X k *(A 1k +A 2k )/2+X k-1 *(A 1(k-1) -A 2(k-1) )/4+X k+1 *(A 1(k+1) -A 2(k+1) ) And/4, calculating the adjusted amplitude value corresponding to each frequency point by the transition effect parameter and at least one audio frame.
Accordingly, the processing of each partition other than the target partition may be as follows:
and for each block except the target block, performing effect processing on the block based on the corresponding parameter segment of the frequency band of the block in the first effect parameter.
For example, as shown in fig. 3, there are two blocks other than the target block in the first transition frame, and there is one block other than the target block in the second transition frame, then the parameter segment corresponding to the frequency band of each of the several blocks in the first effect parameter is obtained, and then based on the formula Y nk =X k *A 1k And processing each block.
Optionally, if the blocking processing is performed on all the audio frames to reduce the computational complexity, performing the effect processing on each block before the effect parameter switching time point in the target audio based on the parameter segment corresponding to the segmented frequency band in the first effect parameter. And carrying out effect processing on each block before the effect parameter switching time point in the target audio based on the corresponding parameter segment of the frequency band of the block in the second effect parameter.
Optionally, after each transition audio frame finishes the above processing, the terminal may perform inverse fast fourier transform on the frequency domain data corresponding to each transition audio frame, and then intercept and reserve the second half part (the length is changed from 2N to N) of the vector, to obtain time domain data of the transition audio frame after the effect processing.
According to the scheme, the transition effect parameters and the transition audio frames are determined based on the second effect parameters, then the transition audio frames are segmented, and then the transition audio frames are segmented based on the transition effect parameters, so that the auditory effect mutation generated during effect parameter switching is relieved through the transition audio frames, and the auditory experience of a user can be improved.
Any combination of the above-mentioned optional solutions may be adopted to form an optional embodiment of the present disclosure, which is not described herein in detail.
An embodiment of the present application provides an apparatus for processing an audio effect, where the apparatus may be a first terminal in the foregoing embodiment, as shown in fig. 4, and the apparatus includes:
a determining module 410, configured to determine an effect parameter switching time point in the target audio, obtain a first effect parameter before the effect parameter switching time point and a second effect parameter after the effect parameter switching time point, and determine a transitional effect parameter based on the second effect parameter;
A determining module 410, further configured to determine at least one transitional audio frame based on the effect parameter switching time point;
an obtaining module 420, configured to obtain, for each transition audio frame in a time domain, a plurality of corresponding partitions, and select at least one target partition from the plurality of partitions, where the at least one target partition is a part of all partitions corresponding to all transition audio frames;
and the processing module 430 is configured to perform, for each target block, effect processing on the target block based on a parameter segment corresponding to the frequency band of the target block in the transition effect parameter, and for each block other than the target block, perform effect processing on the block based on a parameter segment corresponding to the frequency band of the block in the first effect parameter.
Optionally, the determining module 410 is configured to:
when an effect adjustment instruction is received, determining a time point when the effect adjustment instruction is received as an effect parameter switching time point in target audio; or,
an effect parameter switching time point in the pre-stored target audio is determined.
Optionally, the determining module 410 is configured to:
And selecting a continuous preset number of transition audio frames from the effect parameter switching time point backwards.
Optionally, the number of target blocks selected from the nth transition audio frame selected backward from the effect parameter switching time point is N.
Optionally, the number of the transition audio frames is the same as the number of the blocks corresponding to each transition audio frame.
Optionally, the determining module 410 is configured to:
and determining the second effect parameter as a transitional effect parameter.
Optionally, the determining module 410 is configured to:
and determining an average value of the first effect parameter and the second effect parameter as a transition effect parameter.
Optionally, the processing module 430 is configured to:
and for each frequency point in the frequency band of the target block, determining an adjusted amplitude value corresponding to the frequency point based on amplitude values corresponding to the frequency point and adjacent frequency points of the frequency point in the target block, parameter values corresponding to the frequency point in the transition effect parameter, parameter values corresponding to the adjacent frequency point in the first effect parameter and parameter values corresponding to the adjacent frequency point in the second effect parameter.
Optionally, the processing module 430 is configured to:
If the frequency point is the minimum frequency point of the audio frame frequency range, the method is based on a formula Y nk =X k *(A 1k +A 2k )/2+X k+1 *(A 1(k+1) -A 2(k+1) ) And/4, determining an adjusted amplitude value corresponding to the frequency point, wherein n in the formula is the identification of the audio frame, k is the identification of each frequency point in the audio frame, and A 1 For the corresponding parameter value of the frequency point in the first effect parameter, A 2 The method is characterized in that the method is a parameter value corresponding to a frequency point in the transition effect parameters, and X is an amplitude value corresponding to the frequency point;
if the frequency point is the maximum frequency point of the audio frame frequency range, the method is based on a formula Y nk =X k *(A 1k +A 2k )/2+X k-1 *(A 1(k-1) -A 2(k-1) ) And/4, determining an adjusted amplitude value corresponding to the frequency point, wherein n in the formula is the identification of the audio frame, k is the identification of each frequency point in the audio frame, and A 1 For the corresponding parameter value of the frequency point in the first effect parameter, A 2 The method is characterized in that the method is a parameter value corresponding to a frequency point in the transition effect parameters, and X is an amplitude value corresponding to the frequency point;
if the frequency point is not the minimum frequency point or the maximum frequency point of the audio frequency range, the method is based on a formula Y nk =X k *(A 1k +A 2k )/2+X k-1 *(A 1(k-1) -A 2(k-1) )/4+X k+1 *(A 1(k+1) -A 2(k+1) ) And/4, determining an adjusted amplitude value corresponding to the frequency point, wherein n in the formula is the identification of the audio frame, k is the identification of each frequency point in the audio frame, and A 1 For the corresponding parameter value of the frequency point in the first effect parameter, A 2 And X is the amplitude value corresponding to the frequency point.
According to the scheme, the transition effect parameters and the transition audio frames are determined based on the second effect parameters, then the transition audio frames are segmented, and then the transition audio frames are segmented based on the transition effect parameters, so that the auditory effect mutation generated during effect parameter switching is relieved through the transition audio frames, and the auditory experience of a user can be improved.
It should be noted that: in the device for processing audio effects provided in the above embodiment, only the division of the above functional modules is used for illustrating the processing of the audio effect model, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatus for processing an audio effect provided in the above embodiment and the method embodiment for processing an audio effect belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not repeated here.
Fig. 5 shows a block diagram of a terminal 500 according to an exemplary embodiment of the present application. The terminal may be the terminal in the above embodiment, and the terminal 500 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3), an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook computer, or a desktop computer. The terminal 500 may also be referred to by other names of user devices, portable terminals, laptop terminals, desktop terminals, etc.
In general, the terminal 500 includes: a processor 501 and a memory 502.
Processor 501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 501 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 501 may also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 501 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 501 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 502 may include one or more computer-readable storage media, which may be non-transitory. Memory 502 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 502 is used to store at least one instruction for execution by processor 501 to implement the method of audio effect processing provided by the method embodiments herein.
In some embodiments, the terminal 500 may further optionally include: a peripheral interface 503 and at least one peripheral. The processor 501, memory 502, and peripheral interface 503 may be connected by buses or signal lines. The individual peripheral devices may be connected to the peripheral device interface 503 by buses, signal lines or circuit boards. Specifically, the peripheral device includes: at least one of radio frequency circuitry 504, touch display 505, camera 506, audio circuitry 507, positioning component 508, and power supply 509.
Peripheral interface 503 may be used to connect at least one Input/Output (I/O) related peripheral to processor 501 and memory 502. In some embodiments, processor 501, memory 502, and peripheral interface 503 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 501, memory 502, and peripheral interface 503 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 504 is configured to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuitry 504 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 504 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 504 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuitry 504 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuitry 504 may also include NFC (Near Field Communication ) related circuitry, which is not limited in this application.
The display 505 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 505 is a touch display, the display 505 also has the ability to collect touch signals at or above the surface of the display 505. The touch signal may be input as a control signal to the processor 501 for processing. At this time, the display 505 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display 505 may be one, providing a front panel of the terminal 500; in other embodiments, the display 505 may be at least two, respectively disposed on different surfaces of the terminal 500 or in a folded design; in still other embodiments, the display 505 may be a flexible display disposed on a curved surface or a folded surface of the terminal 500. Even more, the display 505 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The display 505 may be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 506 is used to capture images or video. Optionally, the camera assembly 506 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera assembly 506 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuitry 507 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and environments, converting the sound waves into electric signals, and inputting the electric signals to the processor 501 for processing, or inputting the electric signals to the radio frequency circuit 504 for voice communication. For the purpose of stereo acquisition or noise reduction, a plurality of microphones may be respectively disposed at different portions of the terminal 500. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 501 or the radio frequency circuit 504 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, audio circuitry 507 may also include a headphone jack.
The location component 508 is used to locate the current geographic location of the terminal 500 to enable navigation or LBS (Location Based Service, location-based services). The positioning component 508 may be a positioning component based on the United states GPS (Global Positioning System ), the Beidou system of China, the Granati system of Russia, or the Galileo system of the European Union.
A power supply 509 is used to power the various components in the terminal 500. The power supply 509 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 509 comprises a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal 500 further includes one or more sensors 510. The one or more sensors 510 include, but are not limited to: an acceleration sensor 511, a gyro sensor 512, a pressure sensor 513, a fingerprint sensor 514, an optical sensor 515, and a proximity sensor 516.
The acceleration sensor 511 can detect the magnitudes of accelerations on three coordinate axes of the coordinate system established with the terminal 500. For example, the acceleration sensor 511 may be used to detect components of gravitational acceleration on three coordinate axes. The processor 501 may control the touch display 505 to display a user interface in a landscape view or a portrait view according to a gravitational acceleration signal acquired by the acceleration sensor 511. The acceleration sensor 511 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 512 may detect a body direction and a rotation angle of the terminal 500, and the gyro sensor 512 may collect a 3D motion of the user to the terminal 500 in cooperation with the acceleration sensor 511. The processor 501 may implement the following functions based on the data collected by the gyro sensor 512: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
The pressure sensor 513 may be disposed at a side frame of the terminal 500 and/or at a lower layer of the touch display 505. When the pressure sensor 513 is disposed at a side frame of the terminal 500, a grip signal of the user to the terminal 500 may be detected, and the processor 501 performs left-right hand recognition or quick operation according to the grip signal collected by the pressure sensor 513. When the pressure sensor 513 is disposed at the lower layer of the touch display screen 505, the processor 501 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 505. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 514 is used for collecting the fingerprint of the user, and the processor 501 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 514, or the fingerprint sensor 514 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the user is authorized by the processor 501 to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 514 may be provided on the front, back or side of the terminal 500. When a physical key or a vendor Logo is provided on the terminal 500, the fingerprint sensor 514 may be integrated with the physical key or the vendor Logo.
The optical sensor 515 is used to collect the ambient light intensity. In one embodiment, the processor 501 may control the display brightness of the touch screen 505 based on the ambient light intensity collected by the optical sensor 515. Specifically, when the intensity of the ambient light is high, the display brightness of the touch display screen 505 is turned up; when the ambient light intensity is low, the display brightness of the touch display screen 505 is turned down. In another embodiment, the processor 501 may also dynamically adjust the shooting parameters of the camera assembly 506 based on the ambient light intensity collected by the optical sensor 515.
A proximity sensor 516, also referred to as a distance sensor, is typically provided on the front panel of the terminal 500. The proximity sensor 516 serves to collect a distance between the user and the front surface of the terminal 500. In one embodiment, when the proximity sensor 516 detects that the distance between the user and the front of the terminal 500 gradually decreases, the processor 501 controls the touch display 505 to switch from the bright screen state to the off screen state; when the proximity sensor 516 detects that the distance between the user and the front surface of the terminal 500 gradually increases, the processor 501 controls the touch display 505 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the structure shown in fig. 5 is not limiting and that more or fewer components than shown may be included or certain components may be combined or a different arrangement of components may be employed.
In an exemplary embodiment, a computer readable storage medium, such as a memory comprising instructions executable by a processor in a terminal to perform the method of audio effect processing in the above embodiment is also provided. For example, the computer readable storage medium may be Read-only Memory (ROM), random-access Memory (Random Access Memory, RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments is merely exemplary in nature and is in no way intended to limit the invention, since it is intended that all modifications, equivalents, improvements, etc. that fall within the spirit and scope of the invention.
Claims (11)
1. A method of audio effect processing, the method comprising:
determining an effect parameter switching time point in target audio, acquiring a first effect parameter before the effect parameter switching time point and a second effect parameter after the effect parameter switching time point, and determining a transition effect parameter based on the second effect parameter;
Determining at least one transitional audio frame based on the effect parameter switching time point;
each transition audio frame is subjected to time domain, a plurality of corresponding blocks are obtained for each transition audio frame, and at least one target block is selected from the plurality of blocks, wherein the at least one target block is a part of all blocks corresponding to all transition audio frames;
and for each target block, performing effect processing on the target block based on a parameter segment corresponding to the frequency band of the target block in the transition effect parameter, and for each block except the target block, performing effect processing on the block based on a parameter segment corresponding to the frequency band of the block in the first effect parameter.
2. The method of claim 1, wherein determining an effect parameter switch time point in the target audio comprises:
when an effect adjustment instruction is received, determining a time point when the effect adjustment instruction is received as an effect parameter switching time point in target audio; or,
an effect parameter switching time point in the pre-stored target audio is determined.
3. The method of claim 1, wherein the determining at least one transitional audio frame based on the effect parameter switching time point comprises:
And selecting a continuous preset number of transition audio frames from the effect parameter switching time point backwards.
4. A method according to claim 3, wherein the number of target segments selected from the nth transitional audio frame selected backward from the effect parameter switching time point is N.
5. The method of claim 1, wherein the number of transition audio frames is the same as the number of partitions corresponding to each transition audio frame.
6. The method of claim 1, wherein the determining a transitional effect parameter based on the second effect parameter comprises:
and determining the second effect parameter as a transitional effect parameter.
7. The method of claim 1, wherein the determining a transitional effect parameter based on the second effect parameter comprises:
and determining an average value of the first effect parameter and the second effect parameter as a transition effect parameter.
8. The method according to claim 1, wherein the performing effect processing on the target block based on the parameter segment corresponding to the frequency band of the target block in the transition effect parameter includes:
And for each frequency point in the frequency band of the target block, determining an adjusted amplitude value corresponding to the frequency point based on amplitude values corresponding to the frequency point and adjacent frequency points of the frequency point in the target block, parameter values corresponding to the frequency point in the transition effect parameter, parameter values corresponding to the adjacent frequency point in the first effect parameter and parameter values corresponding to the adjacent frequency point in the second effect parameter.
9. The method of claim 8, wherein the determining the adjusted amplitude value corresponding to the frequency bin based on the amplitude values corresponding to the frequency bin and the frequency bin adjacent to the frequency bin in the target block, the parameter values corresponding to the frequency bin in the transition effect parameter, the parameter values corresponding to the adjacent frequency bin in the first effect parameter, and the parameter values corresponding to the adjacent frequency bin in the second effect parameter, comprises:
if the frequency point is the minimum frequency point of the audio frame frequency range, the method is based on a formula Y nk =X k *(A 1k +A 2k )/2+X k+1 *(A 1(k+1) -A 2(k+1) ) And/4, determining an adjusted amplitude value corresponding to the frequency point, wherein X k For the amplitude value corresponding to the kth frequency point, X k+1 A is the amplitude value corresponding to the next frequency point of the kth frequency point, A 1k For the corresponding parameter value of the kth frequency point in the first effect parameter, A 2k For the parameter value corresponding to the kth frequency point in the second effect parameter, A 1(k+1) For the corresponding parameter value of the next frequency point of the kth frequency point in the first effect parameter, A 2(k+1) For the corresponding parameter value of the next frequency point of the kth frequency point in the second effect parameter, Y nk The adjusted amplitude value corresponding to the kth frequency point in the nth audio frame; and/or
If the frequency point is the maximum frequency point of the audio frame frequency range, the method is based on a formula Y nk =X k *(A 1k +A 2k )/2+X k-1 *(A 1(k-1) -A 2(k-1) ) And/4, determining an adjusted amplitude value corresponding to the frequency point, wherein X k For the amplitude value corresponding to the kth frequency point, X k-1 A is the amplitude value corresponding to the last frequency point of the kth frequency point, A 1k For the corresponding parameter value of the kth frequency point in the first effect parameter, A 2k For the parameter value corresponding to the kth frequency point in the second effect parameter, A 1(k-1) For the corresponding parameter value of the last frequency point of the kth frequency point in the first effect parameter, A 2(k-1) For the corresponding parameter value of the last frequency point of the kth frequency point in the second effect parameter, Y nk The adjusted amplitude value corresponding to the kth frequency point in the nth audio frame; and/or
If the frequency point is not the minimum frequency point or the maximum frequency point of the audio frequency range, the method is based on a formula Y nk =X k *(A 1k +A 2k )/2+X k-1 *(A 1(k-1) -A 2(k-1) )/4+X k+1 *(A 1(k+1) -A 2(k+1) ) And/4, determining an adjusted amplitude value corresponding to the frequency point, wherein X k For the amplitude value corresponding to the kth frequency point, X k+1 A is the amplitude value corresponding to the next frequency point of the kth frequency point, A 1k For the corresponding parameter value of the kth frequency point in the first effect parameter, A 2k For the parameter value corresponding to the kth frequency point in the second effect parameter, A 1(k+1) For the corresponding parameter value of the next frequency point of the kth frequency point in the first effect parameter, A 2(k+1) For the corresponding parameter value of the next frequency point of the kth frequency point in the second effect parameter, A 1(k-1) For the corresponding parameter value of the last frequency point of the kth frequency point in the first effect parameter, A 2(k-1) For the corresponding parameter value of the last frequency point of the kth frequency point in the second effect parameter, Y nk And the adjusted amplitude value corresponding to the kth frequency point in the nth audio frame.
10. A computer device comprising a processor and a memory having stored therein at least one instruction that is loaded and executed by the processor to perform the operations performed by the method of audio effect processing of any of claims 1 to 9.
11. A computer readable storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement operations performed by the method of audio effect processing of any of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010923205.2A CN112133267B (en) | 2020-09-04 | 2020-09-04 | Audio effect processing method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010923205.2A CN112133267B (en) | 2020-09-04 | 2020-09-04 | Audio effect processing method, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112133267A CN112133267A (en) | 2020-12-25 |
CN112133267B true CN112133267B (en) | 2024-02-13 |
Family
ID=73847988
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010923205.2A Active CN112133267B (en) | 2020-09-04 | 2020-09-04 | Audio effect processing method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112133267B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101227763A (en) * | 2007-01-15 | 2008-07-23 | 上海杰得微电子有限公司 | Method and device for processing sound effect |
CN102790933A (en) * | 2011-05-17 | 2012-11-21 | 芬德乐器公司 | Audio system and method using adaptive intelligence to distinguish information content of audio signals and to control signal processing function |
CN108182930A (en) * | 2017-12-18 | 2018-06-19 | 福建星网视易信息系统有限公司 | Sound effect treatment method, equipment and audio/video on-demand system |
CN108196813A (en) * | 2017-12-27 | 2018-06-22 | 广州酷狗计算机科技有限公司 | The method and apparatus for adding audio |
US10062367B1 (en) * | 2017-07-14 | 2018-08-28 | Music Tribe Global Brands Ltd. | Vocal effects control system |
CN109346111A (en) * | 2018-10-11 | 2019-02-15 | 广州酷狗计算机科技有限公司 | Data processing method, device, terminal and storage medium |
CN109545174A (en) * | 2018-12-26 | 2019-03-29 | 广州华多网络科技有限公司 | A kind of audio-frequency processing method, device and equipment |
CN109686347A (en) * | 2018-11-30 | 2019-04-26 | 北京达佳互联信息技术有限公司 | Sound effect treatment method, sound-effect processing equipment, electronic equipment and readable medium |
CN110767203A (en) * | 2018-07-27 | 2020-02-07 | 北京达佳互联信息技术有限公司 | Audio processing method and device, mobile terminal and storage medium |
CN111081271A (en) * | 2019-11-29 | 2020-04-28 | 福建星网视易信息系统有限公司 | Music rhythm detection method based on frequency domain and time domain and storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120294457A1 (en) * | 2011-05-17 | 2012-11-22 | Fender Musical Instruments Corporation | Audio System and Method of Using Adaptive Intelligence to Distinguish Information Content of Audio Signals and Control Signal Processing Function |
CN106155623B (en) * | 2016-06-16 | 2017-11-14 | 广东欧珀移动通信有限公司 | A kind of audio collocation method, system and relevant device |
-
2020
- 2020-09-04 CN CN202010923205.2A patent/CN112133267B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101227763A (en) * | 2007-01-15 | 2008-07-23 | 上海杰得微电子有限公司 | Method and device for processing sound effect |
CN102790933A (en) * | 2011-05-17 | 2012-11-21 | 芬德乐器公司 | Audio system and method using adaptive intelligence to distinguish information content of audio signals and to control signal processing function |
US10062367B1 (en) * | 2017-07-14 | 2018-08-28 | Music Tribe Global Brands Ltd. | Vocal effects control system |
CN108182930A (en) * | 2017-12-18 | 2018-06-19 | 福建星网视易信息系统有限公司 | Sound effect treatment method, equipment and audio/video on-demand system |
CN108196813A (en) * | 2017-12-27 | 2018-06-22 | 广州酷狗计算机科技有限公司 | The method and apparatus for adding audio |
CN110767203A (en) * | 2018-07-27 | 2020-02-07 | 北京达佳互联信息技术有限公司 | Audio processing method and device, mobile terminal and storage medium |
CN109346111A (en) * | 2018-10-11 | 2019-02-15 | 广州酷狗计算机科技有限公司 | Data processing method, device, terminal and storage medium |
CN109686347A (en) * | 2018-11-30 | 2019-04-26 | 北京达佳互联信息技术有限公司 | Sound effect treatment method, sound-effect processing equipment, electronic equipment and readable medium |
CN109545174A (en) * | 2018-12-26 | 2019-03-29 | 广州华多网络科技有限公司 | A kind of audio-frequency processing method, device and equipment |
CN111081271A (en) * | 2019-11-29 | 2020-04-28 | 福建星网视易信息系统有限公司 | Music rhythm detection method based on frequency domain and time domain and storage medium |
Non-Patent Citations (1)
Title |
---|
数字音频实时延时处理器的应用和发展;李文亮;;电子技术与软件工程(22);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112133267A (en) | 2020-12-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110764730B (en) | Method and device for playing audio data | |
CN111050250B (en) | Noise reduction method, device, equipment and storage medium | |
CN111402913B (en) | Noise reduction method, device, equipment and storage medium | |
CN111048111B (en) | Method, device, equipment and readable storage medium for detecting rhythm point of audio | |
CN111445901B (en) | Audio data acquisition method and device, electronic equipment and storage medium | |
CN111142838B (en) | Audio playing method, device, computer equipment and storage medium | |
CN108320756B (en) | Method and device for detecting whether audio is pure music audio | |
CN108922506A (en) | Song audio generation method, device and computer readable storage medium | |
CN112133332B (en) | Method, device and equipment for playing audio | |
CN111813367B (en) | Method, device, equipment and storage medium for adjusting volume | |
CN110619614B (en) | Image processing method, device, computer equipment and storage medium | |
CN109102811B (en) | Audio fingerprint generation method and device and storage medium | |
CN110797042B (en) | Audio processing method, device and storage medium | |
CN111613213B (en) | Audio classification method, device, equipment and storage medium | |
CN110808021B (en) | Audio playing method, device, terminal and storage medium | |
CN110152309B (en) | Voice communication method, device, electronic equipment and storage medium | |
CN112133319B (en) | Audio generation method, device, equipment and storage medium | |
CN113963707A (en) | Audio processing method, device, equipment and storage medium | |
CN108196813B (en) | Method and device for adding sound effect | |
CN112738606B (en) | Audio file processing method, device, terminal and storage medium | |
CN112086102B (en) | Method, apparatus, device and storage medium for expanding audio frequency band | |
CN109448676B (en) | Audio processing method, device and storage medium | |
CN109360577B (en) | Method, apparatus, and storage medium for processing audio | |
CN108231091B (en) | Method and device for detecting whether left and right sound channels of audio are consistent | |
CN111063364B (en) | Method, apparatus, computer device and storage medium for generating audio |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |