CN112333336B - Audio editing method and device, electronic equipment and storage medium - Google Patents

Audio editing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112333336B
CN112333336B CN202011154182.XA CN202011154182A CN112333336B CN 112333336 B CN112333336 B CN 112333336B CN 202011154182 A CN202011154182 A CN 202011154182A CN 112333336 B CN112333336 B CN 112333336B
Authority
CN
China
Prior art keywords
audio
waveform
input
target audio
target
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
Application number
CN202011154182.XA
Other languages
Chinese (zh)
Other versions
CN112333336A (en
Inventor
叶灵军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Shenzhen Co Ltd
Original Assignee
Vivo Mobile Communication Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Shenzhen Co Ltd filed Critical Vivo Mobile Communication Shenzhen Co Ltd
Priority to CN202011154182.XA priority Critical patent/CN112333336B/en
Publication of CN112333336A publication Critical patent/CN112333336A/en
Application granted granted Critical
Publication of CN112333336B publication Critical patent/CN112333336B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC 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/00Details of electrophonic musical instruments
    • G10H1/0008Associated control or indicating means
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC 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/00Details of electrophonic musical instruments
    • G10H1/02Means for controlling the tone frequencies, e.g. attack or decay; Means for producing special musical effects, e.g. vibratos or glissandos
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC 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
    • G10H2250/00Aspects of algorithms or signal processing methods without intrinsic musical character, yet specifically adapted for or used in electrophonic musical processing
    • G10H2250/541Details of musical waveform synthesis, i.e. audio waveshape processing from individual wavetable samples, independently of their origin or of the sound they represent
    • G10H2250/615Waveform editing, i.e. setting or modifying parameters for waveform synthesis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The application discloses an audio editing method, an audio editing device, electronic equipment and a storage medium, wherein the method is applied to the electronic equipment, the electronic equipment comprises an extensible or contractible screen, and the method comprises the following steps: receiving a first input of a user to the electronic equipment under the condition that a waveform of a target audio is displayed on a screen, wherein the first input is used for controlling the screen to extend or contract; in response to the first input, a waveform of the target audio is edited. According to the method and the device, the audio waveform can be edited, the audio editing mode is enriched, and the audio editing mode is prevented from being too single.

Description

Audio editing method and device, electronic equipment and storage medium
Technical Field
The application belongs to the field of electronic equipment, and particularly relates to an audio editing method and device, electronic equipment and a storage medium.
Background
In daily work and life, a user listens to audio such as songs, photos, articles, lessons, etc. In order to make the audio more user-friendly, the audio needs to be edited. Such as cutting out audio pieces from the audio data or adding background music, etc.
However, the audio editing methods in the related art are limited, so that the audio editing methods are relatively single.
Disclosure of Invention
An embodiment of the present application provides an audio editing method and apparatus, an electronic device, and a storage medium, which can solve the problem that an audio editing mode is relatively single.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides an audio editing method, which is applied to an electronic device including an extendable or retractable screen, and includes:
receiving a first input of a user to the electronic device under the condition that a waveform of target audio is displayed on the screen, wherein the first input is used for controlling the screen to extend or contract;
editing a waveform of the target audio in response to the first input.
In a second aspect, an embodiment of the present application provides an audio editing apparatus, where the apparatus is applied to an electronic device, where the electronic device includes an extendable or retractable screen, and the apparatus includes:
the receiving module is used for receiving a first input of a user to the electronic equipment under the condition that the waveform of the target audio is displayed on the screen, wherein the first input is used for controlling the screen to extend or contract;
and the editing module is used for responding to the first input and editing the waveform of the target audio.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the present application, in the case where the waveform of the target audio is displayed on the screen, if the first input for controlling the expansion or contraction of the screen is received, the waveform of the target audio is edited. Therefore, the waveform of the target audio is edited, the audio editing mode is enriched, and the audio editing mode is prevented from being too single.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating one embodiment of an audio editing method provided herein;
FIG. 2 is a schematic view of one embodiment of a stretched screen provided herein;
FIG. 3 is a schematic flow chart diagram illustrating another embodiment of an audio editing method provided herein;
FIG. 4 is a schematic diagram of one embodiment of audio track separation provided herein;
FIG. 5 is a schematic diagram illustrating one embodiment of adjusting the volume of a track provided herein;
FIG. 6 is a schematic diagram of another embodiment of adjusting the volume of a track provided herein;
FIG. 7 is a schematic diagram illustrating one embodiment of an amplified audio waveform provided herein;
FIG. 8 is a schematic diagram illustrating one embodiment of deleting a target waveform segment as provided herein;
FIG. 9 is a schematic diagram illustrating one embodiment of adjusting the frequency of a waveform provided herein;
FIG. 10 is a schematic diagram of another embodiment of adjusting the frequency of a waveform provided herein;
FIG. 11 is a schematic diagram illustrating one embodiment of adjusting the frequency of a partial waveform provided herein;
FIG. 12 is a schematic diagram illustrating one embodiment of adjusting the amplitude of a waveform provided herein;
FIG. 13 is a schematic diagram of another embodiment of a regulated waveform amplitude provided herein;
FIG. 14 is a schematic diagram illustrating one embodiment of adjusting the amplitude of a partial waveform provided herein;
FIG. 15 is a schematic structural diagram of an embodiment of an audio editing apparatus provided in the present application;
fig. 16 is a hardware structure diagram of an embodiment of an electronic device provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The following describes in detail the audio editing method provided in the embodiments of the present application with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Fig. 1 is a schematic flowchart of an embodiment of an audio editing method provided in the present application. The audio editing method is applied to an electronic device including a screen that can be expanded or contracted. As shown in fig. 1, the audio editing method includes:
s102, receiving a first input of a user to the electronic equipment under the condition that the waveform of the target audio is displayed on a screen, wherein the first input is used for controlling the screen to extend or contract;
and S104, responding to the first input, and editing the waveform of the target audio.
Next, S102 and S104 will be described.
In S102, the target audio may be audio in an audio file or may be audio in a video file.
The extendable or retractable screen is explained below by way of an example of fig. 2.
As shown in fig. 2, the direction in which the screen extends or contracts may be a positive direction of the Y axis (e.g., upward direction), a negative direction of the Y axis (e.g., downward direction), a positive direction of the X axis (e.g., right direction), or a negative direction of the X axis (e.g., left direction). For example, the screen is stretched in the positive direction of the Y axis to increase the size of the screen in the Y axis direction.
In S104, the waveform of the target audio may be edited according to the direction in which the screen is expanded or contracted. The extending or contracting directions of the screen are different, and the editing modes of the waveform of the target audio are also different. Accordingly, the waveform of the target audio can be edited according to the editing manner corresponding to the direction in which the screen is expanded or contracted. The waveform of the target audio may be edited in the following manner: adjusting the volume of the target audio, scaling the waveform of the target audio, clipping the waveform of the target audio, adjusting the amplitude of the waveform of the target audio, or adjusting the frequency of the waveform of the target audio.
As one example, in addition to editing the waveform of the target audio according to the direction in which the screen is stretched or contracted, the waveform of the target audio may be edited according to at least one of the magnitude of the screen expansion or the speed of the screen expansion. For example, the audio waveform may be edited according to the direction of screen expansion or contraction and the magnitude of screen expansion or contraction.
In the embodiment of the present application, in the case where the waveform of the target audio is displayed on the screen, if the first input for controlling the expansion or contraction of the screen is received, the waveform of the target audio is edited. Therefore, the waveform of the target audio is edited, the audio editing mode is enriched, and the audio editing mode is prevented from being too single.
In one or more embodiments of the present application, the target audio includes a first audio track and a second audio track. In this case, as shown in fig. 3, S104 may include:
s1042, in response to the first input, separating a first audio waveform corresponding to a first audio track and a second audio waveform corresponding to a second audio track from waveforms of the target audio;
s1044, displaying the first audio waveform and the second audio waveform on the extended or contracted screen, respectively.
It should be noted that, in the embodiment of the present application, the target audio includes the first track and the second track, and of course, the target audio may include a third track other than the first track and the second track, in which case, in addition to separating the first audio waveform corresponding to the first track and the second audio waveform corresponding to the second track from the waveform of the target audio, a third audio waveform corresponding to the third track may also be separated from the waveform of the target audio.
S1042 and S1044 described above are explained below by way of an example of fig. 4.
As shown in fig. 4, in the case where the audio waveform includes two tracks, for example, the two tracks are an accompaniment track and a vocal track. For another example, the two tracks are tracks of two voices, and the waveforms of the two tracks are separated from the audio waveform when the screen is stretched in the positive direction of the Y axis or in the negative direction of the Y axis.
In the embodiment of the application, by controlling the expansion or contraction of the screen, the audio waveform of each track can be separated from the waveform of the target audio, so that a user can conveniently analyze each track according to the audio waveform of each track. For example, the volume of each track at different points in time may be analyzed based on the audio waveform of each track.
In one or more embodiments of the present application, after S1042, the audio editing method may further include:
adjusting the volume of the first audio track according to the input parameter of the first input; wherein the input parameters of the first input comprise at least one of stretch length, shrink length, stretch speed, and shrink speed.
It should be noted that, in the embodiment of the present application, the volume of the first audio track is adjusted. Of course, in the case that the target audio includes the second audio track, the volume of the second audio track may also be adjusted according to the input parameters of the first input.
As an example, in the case of adjusting the volume level of the first track and the volume level of the second track, the adjustment magnitudes of the volume levels may not be consistent between the first track and the second track.
In the embodiment of the application, when the audio waveform of the first track is separated from the waveform of the target audio, the volume of the first track can be adjusted according to the expansion and contraction amplitude or the expansion and contraction speed of the screen, so that the requirement of a user on adjusting the volume of a single track in the target audio is met.
In one or more embodiments of the present application, adjusting the volume of the first audio track according to the input parameter of the first input may include:
determining a first volume adjustment amplitude of the first audio track according to a preset relation between the volume adjustment amplitude of the first audio track and the input parameter;
and adjusting the volume of the first audio track according to the first volume adjustment amplitude, wherein the adjustment amplitude of the volume of the first audio track is the first volume adjustment amplitude.
In the case of adjusting the volume level of the second track, the volume level of the second track may be adjusted similarly to the adjustment of the volume level of the first track, and the adjustment of the volume level of the second track is a second volume adjustment level.
As an example, the volume of one of the first and second tracks may be adjusted up and the volume of the other track may be adjusted down.
The low volume track and the high volume track of the first track and the second track may be determined according to the direction in which the screen is extended or retracted.
The following description will be made for separating tracks and adjusting the volume of the tracks, taking the first track as a vocal track and the second track as an accompaniment track as examples.
As one example, as shown in fig. 5, in the case where the direction in which the screen is extended or contracted is the positive direction of the Y axis, the accompaniment waveform 202 and the vocal waveform 204 are separated.
For an accompaniment track corresponding to the accompaniment waveform 202, the preset relationship between the volume adjustment amplitude of the accompaniment track and the input parameters (the input parameters include the stretching speed and the stretching length of the screen) may be a functional relationship of the following formula (1):
volm=γ*a*b (1)
for the voice track corresponding to the voice waveform 204, the preset relationship between the volume adjustment amplitude of the voice track and the input parameter may be a functional relationship of the following formula (2):
volv=(1-γ)*a*b (2)
in the above formula (1) and formula (2), volmIndicating volume adjustment amplitude, vol, of an accompaniment trackvRepresents the volume adjustment amplitude of the human voice track, a represents the stretching speed of the screen, b represents the stretching length of the screen, gamma is a preset coefficient, and gamma is between 0 and 1. The stretching speed is stretching speed or shrinking speed, and the stretching length can be stretching length or shrinking length.
After obtaining the volume control range of the accompaniment track and the volume control range of the vocal track, the volume of the accompaniment track can be adjusted up according to the volume control range of the accompaniment track, and the volume of the vocal track is adjusted down according to the volume control range of the vocal track.
With continued reference to fig. 5, it can be seen from the waveform changes in (a), (b), and (c) of fig. 5 that as the screen stretches in the positive Y-axis direction, the volume of the accompaniment track corresponding to the accompaniment waveform 202 gradually increases, and the volume of the vocal track corresponding to the vocal waveform 204 gradually decreases. When the screen is stretched to the maximum size, the volume of the vocal track corresponding to the vocal waveform 204 is reduced to zero, i.e. the vocal is muted.
As another example, as shown in fig. 6, in the case where the direction in which the screen is extended or contracted is the negative direction of the Y-axis, the accompaniment waveform 202 and the vocal waveform 204 are separated.
For an accompaniment track corresponding to the accompaniment waveform 202, the preset relationship between the volume adjustment amplitude of the accompaniment track and the input parameters (the input parameters include the stretching speed and the stretching length of the screen) may be a functional relationship as shown in the following formula (3):
volm=(1-γ)*a*b (3)
for the vocal track corresponding to the vocal waveform 204, the preset relationship between the volume adjustment amplitude of the vocal track and the input parameter may be a functional relationship as shown in the following formula (4):
volv=γ*a*b (4)
in the above formula (3) and formula (4), volmVolume tone representing accompaniment tracksPitch amplitude, volvRepresenting the volume adjustment amplitude of the human voice track, a representing the stretching speed of the screen, b representing the stretching length of the screen, gamma being a preset coefficient, and gamma being between 0 and 1.
After obtaining the volume adjustment range for the accompaniment tracks and the volume adjustment range for the vocal tracks, the volume in the accompaniment waveform 202 can be adjusted down according to the volume adjustment range for the accompaniment tracks and the volume in the vocal waveform 204 can be adjusted up according to the volume adjustment range for the vocal tracks.
With continuing reference to fig. 6, it can be seen from the waveform variations in (a), (b), and (c) of fig. 6 that as the screen stretches in the negative direction along the Y-axis, the volume of the accompaniment track corresponding to the accompaniment waveform 202 gradually increases, and the volume of the vocal track corresponding to the vocal waveform 204 gradually decreases. When the screen is stretched to the maximum, the volume in the accompaniment waveform 202 is reduced to zero, i.e., the accompaniment is muted.
In an alternative embodiment, adjusting the volume level of the first audio track and the volume level of the second audio track comprises:
determining a target volume ratio corresponding to the input parameter of the first input according to a preset relation between the input parameter and the volume ratio;
the ratio of volume magnitudes between the first audio track and the second audio track is adjusted to a target volume ratio.
The following describes an embodiment of the present application with an example of the screen expansion and contraction speed as an input parameter.
Assume that the preset relationship between the screen expansion and contraction speed and the volume ratio is the following relationship in table 1:
TABLE 1
Speed of expansion and contraction of screen Volume ratio of first audio track to second audio track
V1 M1
V2 M2
V3 M3
Wherein M1, M2 and M3 are all values between 0 and 1.
And assume that the screen has a contraction speed V0 when the first input is received. In this case, if the contraction speed V0 has the smallest difference from V1 among the three preset speeds V1, V2, and V3, M1 corresponding to V1 is determined as the target volume ratio. Then, the ratio between the volume levels of the first and second audio tracks is adjusted to M1.
The manner of adjusting the volume in the waveforms of the two tracks when the input parameter is the stretching length of the screen is similar to the manner of adjusting the volume in the waveforms of the two tracks when the input parameter is the stretching speed of the screen, and thus, the detailed description thereof is omitted.
In one or more embodiments of the present application, before receiving the first input of the user to the electronic device, the audio editing method may further include:
receiving a second input selecting a target reference point in the audio waveform;
in response to a second input, a target reference point is displayed on the audio waveform.
S104 may include:
the waveform of the target audio is enlarged or reduced centering on the target reference point.
The following describes embodiments of the present application by way of example in fig. 7.
As shown in fig. 7, a second input to select a target reference point 206 in the waveform of the target audio is first received, and then the target reference point 206 is displayed on the waveform of the target audio. Then, the first input for stretching the screen in the positive direction of the X axis is received, and the waveform of the target audio is displayed in an enlarged manner centering on the target reference point 206.
Of course, after the target reference point 206 is displayed on the waveform of the target audio, if the first input of stretching the screen in the opposite direction of the X-axis is received, the waveform of the target audio may be displayed reduced with the target reference point 206 as the center.
In the embodiment of the application, the waveform of the target audio can be amplified, so that a user can conveniently process the waveform of the target audio. In addition, the waveform of the target audio frequency can be reduced, so that the user can conveniently watch the overall fluctuation condition of the waveform of the target audio frequency.
In an alternative embodiment, before receiving the first input of the user to the electronic device, the audio editing method may further include:
receiving a third input selecting a target waveform segment in the audio waveform;
in response to a third input, the target waveform segment is displayed in the selected state.
It should be noted that, in the case where the target waveform segment is in the selected state, the target waveform segment may be displayed in the entire screen area.
As one example, after the target waveform segment is in the selected state, in a case where an input to a target position in the target waveform segment is received and a first input to shrink the screen to the target position in the target waveform segment is received, the waveform segment following the target position in the target waveform segment is deleted.
As another example, the horizontal axis of the audio waveform represents time and the vertical axis represents amplitude, and after the target waveform segment is in the selected state, the target waveform segment is deleted from the waveform of the target audio in a case where the first input is received. Wherein the amplitudes of the two endpoints of the target waveform segment are both zero. Therefore, the target waveform segment can be ensured to be a segment of complete sound, for example, the target waveform segment is a speech segment of a complete sentence, so that the sound loss of the audio waveform can be minimized.
The following is an exemplary illustration of receiving a third input selecting a target waveform segment in an audio waveform.
As one example, receiving a third input selecting a target waveform segment in the audio waveform may include: third inputs of two points in the audio waveform are respectively received, and a waveform segment between the two points is a target waveform segment.
As another example, receiving a third input selecting a target waveform segment in the audio waveform may include: a third input is received for a point in the audio waveform, the waveform segment following the point being the target waveform segment.
As can be seen from the above two examples, the user may first select one or two points in the audio waveform, and in the case of receiving the first input from the user, if two points have been selected in the audio waveform, the waveform segment between the two points is determined as the target waveform segment. If a point has been selected in the audio waveform, the waveform segment following the point is determined to be the target waveform segment.
In the embodiment of the application, a user can select the target waveform segment in the audio waveform according to the own requirements, and then can edit the target waveform segment, so that the requirement of the user on editing the local waveform segment in the audio waveform is met.
In one or more embodiments of the present application, after deleting a certain waveform segment in the waveform of the target audio, the audio editing method may further include:
and splicing the waveform segments positioned at the two sides of the deleted waveform segment in the waveform of the target audio to obtain the edited waveform.
The following describes embodiments of the present application with reference to the example of fig. 8.
First, as shown in fig. 8(a), a third input selecting points a and B in the audio waveform is received, thereby selecting a target waveform segment 208 between the points a and B in the audio waveform, so that the target waveform segment 208 is in an editable state. Wherein, the amplitudes of the points A and B are both zero. Then, a first input is received to shrink the screen in the opposite direction along the X-axis, editing the audio waveform.
Specifically, as shown in fig. 8(B), the target waveform segment 208 is deleted from the audio waveform, and the points a and B are spliced together to splice waveform segments located on both sides of the target waveform segment 208 in the audio waveform, resulting in a waveform after editing.
In the embodiment of the application, a user can delete the target waveform segment from the audio waveform according to the requirement of the user, so that the requirement of the user on editing the local waveform segment in the audio waveform is met.
In one or more embodiments of the present application, displaying the waveform of the target audio in the first display manner on the screen, S104 may include:
in response to the first input, in a case where the first input is an input that is stretched in a first direction, elongating a waveform of the target audio in a first coordinate axis direction, wherein a time length of the target audio after the elongation is longer than a time length of the target audio before the elongation;
or,
in response to the first input, in a case where the first input is an input that is contracted in the second direction, the waveform of the target audio is compressed in the first coordinate axis direction, and a time length of the target audio after the compression is smaller than a time length of the target audio before the compression.
Next, the first display mode is a horizontal screen display mode as an example, and the embodiment of the present application will be described with reference to fig. 9 and 10.
As shown in fig. 9(a), in the case where the waveform of the target audio is displayed in a landscape manner on the screen, in the case where the first input of stretching the screen in the positive X-axis direction is received, the waveform of the target audio is elongated in the X-axis direction, resulting in the waveform shown in fig. 9 (b).
As shown in fig. 10(a), in the case where the screen displays the waveform of the target audio in a landscape manner, in the case where the first input of contracting the screen in the opposite direction to the X axis is received, the waveform of the target audio is compressed in the X axis direction, resulting in the waveform shown in fig. 10 (b).
It should be noted that the entire waveform of the target audio may be elongated or compressed along the first axis direction, or a part of the waveform of the target audio may be elongated or compressed along the first axis direction. The following describes an embodiment of the present application with reference to fig. 11.
As shown in fig. 11(a), in the case where the screen displays the waveform of the target audio in a landscape manner, after the target waveform segment 208 is selected, in the case where the first input of stretching the screen in the positive X-axis direction is received, the target waveform segment 208 is elongated in the X-axis direction, resulting in the target waveform segment 208' as shown in fig. 11 (b).
In the embodiment of the application, a user can stretch or shrink the screen according to own requirements to compress or elongate the waveform of the target audio along the direction of the first coordinate axis so as to adjust the frequency of the target audio, thereby changing the speed of the target audio.
In one or more embodiments of the present application, a waveform of a target audio is displayed in a second display manner on a screen; s104 may include:
in response to the first input, in a case where the first input is an input that is stretched in a third direction, elongating a waveform of the target audio in a second coordinate axis direction, wherein a volume of the target audio after the elongation is larger than a volume of the target audio before the elongation;
or,
in response to the first input, in a case where the first input is an input that is stretched in a fourth direction, a waveform of the target audio is compressed in a direction of the second coordinate axis, wherein a volume of the target audio after compression is smaller than a volume of the target audio before compression.
Next, the second display mode is taken as a vertical screen display mode as an example, and the embodiment of the present application will be described with reference to fig. 12 and 13.
As shown in fig. 12(a), in the case where the screen displays the waveform of the target audio in the portrait screen manner, in the case where the first input of stretching the screen in the positive direction of the Y axis is received, the waveform of the target audio is elongated in the positive direction of the Y axis to increase the amplitude of the waveform of the target audio, resulting in the waveform shown in fig. 12 (b).
As shown in fig. 13(a), in the case where the screen displays the waveform of the target audio in the portrait screen manner, in the case where the first input of contracting the screen in the opposite direction to the Y axis is received, the waveform of the target audio is compressed in the Y axis direction to reduce the amplitude of the waveform of the target audio, resulting in the waveform shown in fig. 13 (b).
It should be noted that the entire waveform of the target audio may be elongated or compressed along the second axis direction, or a part of the waveform of the target audio may be elongated or compressed along the second axis direction. The following describes an embodiment of the present application with reference to fig. 14.
As shown in fig. 14(a), in the case where the screen displays the waveform of the target audio in the portrait screen manner, after the target waveform segment 208 is selected, in the case where the first input of stretching the screen in the positive Y-axis direction is received, the target waveform segment 208 is elongated in the Y-axis direction, resulting in the target waveform segment 208 ″ shown in fig. 14 (b).
In the embodiment of the application, the user can stretch or shrink the screen according to the own requirement to compress or elongate the waveform of the target audio along the direction of the second coordinate axis, so as to adjust the amplitude of the waveform of the target audio, and thus adjust the volume of the target audio.
The application provides an audio editing device corresponding to the audio editing method provided by the application. The audio editing apparatus is applied to an electronic device including a screen that can be expanded or contracted.
Fig. 15 is a schematic structural diagram of an embodiment of an audio editing apparatus provided in the present application. As shown in fig. 15, the audio editing apparatus 300 may include:
a receiving module 302, configured to receive a first input to the electronic device from a user in a case that a waveform of a target audio is displayed on a screen, where the first input is used to control the screen to extend or retract;
an editing module 304, configured to edit a waveform of the target audio in response to the first input.
In the embodiment of the present application, in the case where the waveform of the target audio is displayed on the screen, if the first input for controlling the expansion or contraction of the screen is received, the waveform of the target audio is edited. Therefore, the waveform of the target audio is edited, the audio editing mode is enriched, and the audio editing mode is prevented from being too single.
In one or more embodiments of the present application, the target audio includes a first audio track and a second audio track, and the editing module 304 may include:
a separation unit for separating a first audio waveform corresponding to a first track and a second audio waveform corresponding to a second track from a waveform of a target audio in response to a first input;
and the display unit is used for respectively displaying the first audio waveform and the second audio waveform on the expanded or contracted screen.
In the embodiment of the application, by controlling the expansion or contraction of the screen, the audio waveform of each track can be separated from the waveform of the target audio, so that a user can conveniently analyze each track according to the audio waveform of each track. For example, the volume of each track at different points in time may be analyzed based on the audio waveform of each track.
In one or more embodiments of the present application, the audio editing apparatus 300 may further include:
the volume adjusting module is used for adjusting the volume of the first audio track according to the first input parameter; wherein the input parameters of the first input comprise at least one of stretch length, shrink length, stretch speed, and shrink speed.
In the embodiment of the present application, in the case that the audio waveform of the first audio track is separated from the waveform of the target audio, the volume of the first audio track may be adjusted according to the expansion and contraction amplitude or the expansion and contraction speed of the screen, thereby meeting the requirement of the user to adjust the volume of a single audio track in the target audio.
In one or more embodiments of the present application, a screen displays a waveform of a target audio in a first display manner; the editing module 304 may include:
a first elongation unit configured to, in response to a first input, elongate a waveform of a target audio in a first coordinate axis direction in a case where the first input is an input elongated in a first direction, wherein a time length of the target audio after the elongation is longer than a time length of the target audio before the elongation;
or,
and a first compression unit, configured to compress the waveform of the target audio along the first coordinate axis direction in response to the first input in a case where the first input is an input contracting in the second direction, a time length of the target audio after compression being smaller than a time length of the target audio before compression.
In the embodiment of the application, a user can stretch or shrink the screen according to own requirements to compress or elongate the waveform of the target audio along the direction of the first coordinate axis so as to adjust the frequency of the target audio, thereby changing the speed of the target audio.
In one or more embodiments of the present application, the screen displays a waveform of the target audio in a second display manner; the editing module 304 may include:
a second elongation unit configured to, in response to the first input, elongate the waveform of the target audio in a second coordinate axis direction in a case where the first input is an input elongated in a third direction, wherein a volume of the target audio after the elongation is larger than a volume of the target audio before the elongation;
or,
and a second compression unit configured to compress the waveform of the target audio in the second coordinate axis direction in response to the first input in a case where the first input is an input stretched in the fourth direction, wherein a volume of the target audio after compression is smaller than a volume of the target audio before compression.
In the embodiment of the application, the user can stretch or shrink the screen according to the own requirement to compress or elongate the waveform of the target audio along the direction of the second coordinate axis, so as to adjust the amplitude of the waveform of the target audio, and thus adjust the volume of the target audio.
It should be noted that, in the above embodiment, the audio editing method is described by taking the execution subject as the audio editing apparatus as an example. However, the execution subject of the audio editing method provided in the embodiment of the present application is not limited to the audio editing apparatus, and may also be a control module for executing the loaded audio editing method in the audio editing apparatus.
The audio editing apparatus in the embodiment of the present application may be an apparatus, and may also be a component, an integrated circuit, or a chip in the apparatus. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The audio editing apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The audio editing apparatus provided in the embodiment of the present application can implement each process implemented by the audio editing apparatus in the method embodiments of fig. 1 or fig. 3, and is not described herein again to avoid repetition.
The present application further provides an electronic device, which includes a processor, a memory, and a program or an instruction stored in the memory and executable on the processor, where the program or the instruction implements the processes of the above-mentioned audio editing method embodiment when executed by the processor, and can achieve the same technical effects, and the details are not repeated here to avoid repetition.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and the non-mobile electronic devices described above.
Fig. 16 is a hardware structure diagram of an embodiment of an electronic device provided in the present application.
The electronic device 400 includes, but is not limited to: radio unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, and processor 410.
The input unit 404 may include, among other things, a graphics processor 4041 and a microphone 4042. The display unit 406 includes a display panel 4061. The user input unit 407 may include a touch panel 4071 and other input devices 4072. The memory 409 may include an application program and an operating system.
Those skilled in the art will appreciate that the electronic device 400 may further comprise a power supply (e.g., a battery) for supplying power to various components, and the power supply may be logically connected to the processor 410 via a power management system, so as to implement functions of managing charging, discharging, and power consumption via the power management system. The electronic device structure shown in fig. 16 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description thereof is omitted.
Among them, the display panel 4061 may be a screen that can be extended or contracted.
The user input unit 407 is configured to receive a first input to the electronic device from a user in a case where a waveform of a target audio is displayed on a screen, the first input being used to control the screen to expand or contract;
the processor 410 is configured to edit a waveform of the target audio in response to the first input.
In the embodiment of the present application, in the case where the waveform of the target audio is displayed on the screen, if the first input for controlling the expansion or contraction of the screen is received, the waveform of the target audio is edited. Therefore, the waveform of the target audio is edited, the audio editing mode is enriched, and the audio editing mode is prevented from being too single.
In one or more embodiments of the present application, the target audio includes a first audio track and a second audio track,
the processor 410 is configured to, in response to a first input, separate a first audio waveform corresponding to a first audio track and a second audio waveform corresponding to a second audio track from a waveform of the target audio;
the display unit 406 is used for displaying the first audio waveform and the second audio waveform on the extended or contracted screen, respectively.
In the embodiment of the application, by controlling the expansion or contraction of the screen, the audio waveform of each track can be separated from the waveform of the target audio, so that a user can conveniently analyze each track according to the audio waveform of each track. For example, the volume of each track at different points in time may be analyzed based on the audio waveform of each track.
In one or more embodiments of the present application, the processor 410 is further configured to adjust a volume level of the first audio track according to the input parameter of the first input; wherein the input parameters of the first input comprise at least one of stretch length, shrink length, stretch speed, and shrink speed.
In the embodiment of the present application, in the case that the audio waveform of the first audio track is separated from the waveform of the target audio, the volume of the first audio track may be adjusted according to the expansion and contraction amplitude or the expansion and contraction speed of the screen, thereby meeting the requirement of the user to adjust the volume of a single audio track in the target audio.
In one or more embodiments of the present application, a waveform of a target audio is displayed on a screen in a first display manner;
the processor 410 is specifically configured to, in response to a first input, in a case where the first input is an input stretching in a first direction, stretch a waveform of the target audio in a first coordinate axis direction, where a duration of the target audio after stretching is longer than a duration of the target audio before stretching;
or,
the processor 410 is specifically configured to compress the waveform of the target audio along the first axis direction in response to the first input in a case where the first input is a contraction input in the second direction, and a time duration of the target audio after the compression is smaller than a time duration of the target audio before the compression.
In the embodiment of the application, a user can stretch or shrink the screen according to own requirements to compress or elongate the waveform of the target audio along the direction of the first coordinate axis so as to adjust the frequency of the target audio, thereby changing the speed of the target audio.
In one or more embodiments of the present application, a waveform of a target audio is displayed in a second display manner on a screen;
the processor 410 is specifically configured to, in response to the first input, in a case where the first input is an input that is stretched in a third direction, stretch the waveform of the target audio in the second coordinate axis direction, where a volume of the target audio after stretching is larger than a volume of the target audio before stretching;
or,
the processor 410 is specifically configured to compress the waveform of the target audio along the second axis direction in response to the first input if the first input is a fourth direction stretching input, wherein a volume of the target audio after compression is less than a volume of the target audio before compression.
In the embodiment of the application, the user can stretch or shrink the screen according to the own requirement to compress or elongate the waveform of the target audio along the direction of the second coordinate axis, so as to adjust the amplitude of the waveform of the target audio, and thus adjust the volume of the target audio.
The present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned audio editing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device in the above embodiment. Readable storage media include computer-readable storage media such as Read-Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disk, and so on.
The application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is configured to run a program or an instruction to implement each process of the above-mentioned audio editing method embodiment, and can achieve the same technical effect, and for avoiding repetition, the description is not repeated here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. An audio editing method applied to an electronic device including an extendable or retractable screen, the method comprising:
receiving a first input of a user to the electronic device under the condition that a waveform of target audio is displayed on the screen, wherein the first input is used for controlling the screen to extend or contract;
editing a waveform of the target audio in response to the first input.
2. The method of claim 1, wherein the target audio comprises a first audio track and a second audio track,
the editing the waveform of the target audio in response to the first input includes:
in response to the first input, separating a first audio waveform corresponding to the first audio track and a second audio waveform corresponding to the second audio track from the waveforms of the target audio;
displaying the first audio waveform and the second audio waveform on the expanded or contracted screen respectively.
3. The method of claim 2, wherein after separating a first audio waveform corresponding to the first track and a second audio waveform corresponding to the second track from the waveform of the target audio, the method further comprises:
adjusting the volume of the first audio track according to the input parameter of the first input;
wherein the input parameters of the first input include at least one of stretch length, shrink length, stretch speed, and shrink speed.
4. The method according to claim 1, wherein the waveform of the target audio is displayed on a screen in a first display manner;
the editing the waveform of the target audio in response to the first input includes:
in response to the first input, in a case where the first input is an input that is stretched in a first direction, elongating a waveform of the target audio in a first coordinate axis direction, wherein a time length of the target audio after elongation is longer than a time length of the target audio before elongation;
or,
in response to the first input, in a case where the first input is a contraction input in a second direction, compressing the waveform of the target audio in a direction of a first coordinate axis, the duration of the target audio after compression being smaller than the duration of the target audio before compression.
5. The method according to claim 1, wherein the waveform of the target audio is displayed on the screen in a second display manner;
the editing the waveform of the target audio in response to the first input includes:
in response to the first input, in a case where the first input is an input that is stretched in a third direction, elongating a waveform of the target audio in a second coordinate axis direction, wherein a volume of the target audio after elongation is larger than a volume of the target audio before elongation;
or,
in response to the first input, in a case where the first input is an input that is stretched in a fourth direction, compressing the waveform of the target audio in a second coordinate axis direction, wherein a volume of the target audio after compression is smaller than a volume of the target audio before compression.
6. An audio editing apparatus applied to an electronic device including an extendable or retractable screen, the apparatus comprising:
the receiving module is used for receiving a first input of a user to the electronic equipment under the condition that the waveform of the target audio is displayed on the screen, wherein the first input is used for controlling the screen to extend or contract;
and the editing module is used for responding to the first input and editing the waveform of the target audio.
7. The apparatus of claim 6, wherein the target audio comprises a first audio track and a second audio track,
the editing module comprises:
a separation unit configured to separate, in response to the first input, a first audio waveform corresponding to the first track and a second audio waveform corresponding to the second track from waveforms of the target audio;
a display unit for displaying the first audio waveform and the second audio waveform on the extended or contracted screen, respectively.
8. The apparatus of claim 7, further comprising:
the volume adjusting module is used for adjusting the volume of the first audio track according to the input parameter of the first input;
wherein the input parameters of the first input include at least one of stretch length, shrink length, stretch speed, and shrink speed.
9. The apparatus of claim 6, wherein the screen displays the waveform of the target audio in a first display mode;
the editing module comprises:
a first elongation unit configured to, in response to the first input, elongate a waveform of the target audio in a first axis direction in a case where the first input is an input elongated in a first direction, wherein a time length of the target audio after the elongation is longer than a time length of the target audio before the elongation;
or,
a first compression unit configured to compress a waveform of the target audio in a first coordinate axis direction in response to the first input in a case where the first input is an input contracting in a second direction, a time length of the target audio after compression being smaller than a time length of the target audio before compression.
10. The apparatus according to claim 6, wherein the screen displays the waveform of the target audio in a second display manner;
the editing module comprises:
a second elongation unit configured to, in response to the first input, elongate the waveform of the target audio in a second coordinate axis direction in a case where the first input is an input elongated in a third direction, wherein a volume of the target audio after the elongation is larger than a volume of the target audio before the elongation;
or,
a second compression unit configured to compress the waveform of the target audio in a second coordinate axis direction in response to the first input in a case where the first input is an input stretched in a fourth direction, wherein a volume of the target audio after compression is smaller than a volume of the target audio before compression.
CN202011154182.XA 2020-10-26 2020-10-26 Audio editing method and device, electronic equipment and storage medium Active CN112333336B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011154182.XA CN112333336B (en) 2020-10-26 2020-10-26 Audio editing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011154182.XA CN112333336B (en) 2020-10-26 2020-10-26 Audio editing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112333336A CN112333336A (en) 2021-02-05
CN112333336B true CN112333336B (en) 2022-05-17

Family

ID=74310998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011154182.XA Active CN112333336B (en) 2020-10-26 2020-10-26 Audio editing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112333336B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113821189B (en) * 2021-11-25 2023-07-21 广州酷狗计算机科技有限公司 Audio playing method, device, terminal equipment and storage medium
CN116939323A (en) * 2022-04-01 2023-10-24 腾讯科技(深圳)有限公司 Music matching method, device, electronic equipment and computer readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012160415A1 (en) * 2011-05-24 2012-11-29 Nokia Corporation An apparatus with an audio equalizer and associated method
CN105989782A (en) * 2015-03-23 2016-10-05 Lg电子株式会社 Stretchable display device and operating method thereof
CN106921802A (en) * 2017-03-17 2017-07-04 东软集团股份有限公司 The player method and device of voice data
CN110351407A (en) * 2019-08-08 2019-10-18 维沃移动通信有限公司 A kind of audio frequency playing method and mobile terminal
CN110865758A (en) * 2019-10-29 2020-03-06 维沃移动通信有限公司 Display method and electronic equipment
CN110908759A (en) * 2019-11-19 2020-03-24 维沃移动通信有限公司 Display method and electronic equipment
CN111124179A (en) * 2019-12-20 2020-05-08 维沃移动通信有限公司 Information processing method and electronic equipment
CN111159983A (en) * 2019-12-31 2020-05-15 维沃移动通信有限公司 Editing method and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9159363B2 (en) * 2010-04-02 2015-10-13 Adobe Systems Incorporated Systems and methods for adjusting audio attributes of clip-based audio content
CN107071641A (en) * 2017-03-31 2017-08-18 李宗盛 The electronic equipment and processing method of many tracks of real-time edition
CN111459374B (en) * 2020-03-30 2022-03-29 维沃移动通信有限公司 Interaction method and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012160415A1 (en) * 2011-05-24 2012-11-29 Nokia Corporation An apparatus with an audio equalizer and associated method
CN105989782A (en) * 2015-03-23 2016-10-05 Lg电子株式会社 Stretchable display device and operating method thereof
CN106921802A (en) * 2017-03-17 2017-07-04 东软集团股份有限公司 The player method and device of voice data
CN110351407A (en) * 2019-08-08 2019-10-18 维沃移动通信有限公司 A kind of audio frequency playing method and mobile terminal
CN110865758A (en) * 2019-10-29 2020-03-06 维沃移动通信有限公司 Display method and electronic equipment
CN110908759A (en) * 2019-11-19 2020-03-24 维沃移动通信有限公司 Display method and electronic equipment
CN111124179A (en) * 2019-12-20 2020-05-08 维沃移动通信有限公司 Information processing method and electronic equipment
CN111159983A (en) * 2019-12-31 2020-05-15 维沃移动通信有限公司 Editing method and electronic equipment

Also Published As

Publication number Publication date
CN112333336A (en) 2021-02-05

Similar Documents

Publication Publication Date Title
CN112333336B (en) Audio editing method and device, electronic equipment and storage medium
CN110827843B (en) Audio processing method and device, storage medium and electronic equipment
CN113010063B (en) File previewing method and device, electronic equipment and storage medium
JP6076418B2 (en) Electronic device and comic production method
EP3917131A1 (en) Image deformation control method and device and hardware device
US12106777B2 (en) Audio processing method and electronic device
CN105448289A (en) Speech synthesis method, speech synthesis device, speech deletion method, speech deletion device and speech deletion and synthesis method
CN103888604A (en) Method for switching application modes of terminal, and terminal
CN109246474B (en) Video file editing method and mobile terminal
US20170212876A1 (en) Method and Apparatus for Editing Audio File
EP2696338B1 (en) Terminal and method for generating live image
CN104778221A (en) Music collaborate splicing method and device
CN112015365A (en) Volume adjustment method and device and electronic equipment
CN112309449A (en) Audio recording method and device
CN113296661A (en) Image processing method and device, electronic equipment and readable storage medium
CN113794832B (en) Video recording method, device, electronic equipment and storage medium
CN113779321A (en) Electronic whiteboard file saving method and device, electronic whiteboard and storage medium
WO2024078293A1 (en) Image processing method and apparatus, electronic device, and storage medium
WO2023236804A1 (en) Model transformation method and apparatus, device and medium
CN103338305A (en) Mobile phone and method for processing playing of audio file adopting same
CN101119558A (en) Handset and method for processing audio document broadcast
CN110955485A (en) Method and device for adjusting interface elements
US20220300142A1 (en) Information processing method and electronic device
CN116302234A (en) Display method, display device, electronic equipment and medium
CN112987090B (en) Surface wave dispersion curve pickup method and device

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