CN113053339B - Rhythm adjustment method, device, equipment and storage medium - Google Patents

Rhythm adjustment method, device, equipment and storage medium Download PDF

Info

Publication number
CN113053339B
CN113053339B CN202110261347.1A CN202110261347A CN113053339B CN 113053339 B CN113053339 B CN 113053339B CN 202110261347 A CN202110261347 A CN 202110261347A CN 113053339 B CN113053339 B CN 113053339B
Authority
CN
China
Prior art keywords
rhythm
interval
points
determining
adjustment
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
CN202110261347.1A
Other languages
Chinese (zh)
Other versions
CN113053339A (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.)
Bigo Technology Pte Ltd
Original Assignee
Bigo Technology Pte 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 Bigo Technology Pte Ltd filed Critical Bigo Technology Pte Ltd
Priority to CN202110261347.1A priority Critical patent/CN113053339B/en
Publication of CN113053339A publication Critical patent/CN113053339A/en
Application granted granted Critical
Publication of CN113053339B publication Critical patent/CN113053339B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/36Accompaniment arrangements
    • G10H1/40Rhythm
    • 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
    • G10H2210/00Aspects 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/031Musical analysis, i.e. isolation, extraction or identification of musical elements or musical parameters from a raw acoustic signal or from an encoded audio signal
    • G10H2210/076Musical analysis, i.e. isolation, extraction or identification of musical elements or musical parameters from a raw acoustic signal or from an encoded audio signal for extraction of timing, tempo; Beat detection
    • 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
    • G10H2210/00Aspects 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/375Tempo or beat alterations; Music timing control
    • G10H2210/391Automatic tempo adjustment, correction or control
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Electrophonic Musical Instruments (AREA)

Abstract

The embodiment of the invention discloses a rhythm adjustment method, a device, equipment and a storage medium, wherein the method comprises the following steps: determining the rhythm position of each rhythm point in the audio data through a rhythm detection algorithm; determining the rhythm intervals of all rhythm points and the standard rhythm intervals of all rhythm points according to the rhythm positions; determining a rhythm adjusting point which needs to be subjected to interval adjustment according to the rhythm interval and the standard rhythm interval; and adjusting the rhythm position of the rhythm adjusting point so as to enable the rhythm position to meet the standard rhythm interval. The method and the device can effectively eliminate the problem of inconsistent detected rhythms in the audio data, and reasonably optimize the determined rhythms.

Description

Rhythm adjustment method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the field of computers, in particular to a rhythm adjustment method, device, equipment and storage medium.
Background
Audio is applied to each scene as a main material of multimedia, and when music in an audio file is applied, it is often necessary to determine a rhythm position of the piece of music to apply to each scene. Illustratively, in the video production process, the video clip effect can be better by synchronizing the clip points of the video clip with the rhythm of the music. In the stage light switching process, the light switching time is synchronized with the rhythm in the music, so that the stage expressive force is better.
In the prior art, after an audio waveform is determined, a music rhythm detection algorithm is used to estimate rhythm points in the audio waveform and determine a music rhythm position, such as a common method of determining a music rhythm according to a dynamic programming algorithm. However, in the existing method for determining the music tempo, an algorithm for estimating the tempo position according to the neighborhood data is mostly adopted, which causes the problem that the relative positions between the tempos are different and offset occurs, so that the detected tempos are not beneficial to relevant application.
Disclosure of Invention
The embodiment of the invention provides a rhythm adjustment method, device, equipment and storage medium, which can effectively eliminate the problem of inconsistent detected rhythm in audio data and reasonably optimize the determined rhythm position.
In a first aspect, an embodiment of the present invention provides a method for adjusting a tempo, where the method includes:
determining the rhythm position of each rhythm point in the audio data through a rhythm detection algorithm;
determining the rhythm intervals of all rhythm points and the standard rhythm intervals of all rhythm points according to the rhythm positions;
determining a rhythm adjusting point which needs to be subjected to interval adjustment according to the rhythm interval and the standard rhythm interval;
and adjusting the rhythm position of the rhythm adjusting point so as to enable the rhythm position to meet the standard rhythm interval.
In a second aspect, an embodiment of the present invention further provides a cadence adjustment device, including:
the rhythm position determining module is used for determining the rhythm position of each rhythm point in the audio data through a rhythm detection algorithm;
the rhythm interval determining module is used for determining the rhythm interval of each rhythm point and the standard rhythm interval of all rhythm points according to the rhythm position;
and the rhythm adjustment module is used for determining a rhythm adjustment point which needs to be subjected to interval adjustment according to the rhythm interval and the standard rhythm interval, and adjusting the rhythm position of the rhythm adjustment point so as to enable the rhythm position to meet the standard rhythm interval.
In a third aspect, an embodiment of the present invention further provides a cadence adjustment device, including:
one or more processors;
storage means for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the cadence adjustment method according to the embodiment of the invention.
In a fourth aspect, embodiments of the present invention also provide a storage medium storing computer-executable instructions that, when executed by a computer processor, are configured to perform the cadence adjustment method of embodiments of the present invention.
In the embodiment of the invention, the rhythm position of each rhythm point in the audio data is determined through a rhythm detection algorithm, the rhythm interval of each rhythm point and the standard rhythm interval of all rhythm points are determined according to the rhythm position, the rhythm adjusting point needing interval adjustment is determined according to the rhythm interval and the standard rhythm interval, and the rhythm position of the rhythm adjusting point is adjusted so as to meet the standard rhythm interval. The method can effectively eliminate the problem of inconsistent detected rhythms in the audio data, and reasonably optimizes the determined rhythms.
Drawings
Fig. 1 is a flowchart of a method for adjusting a tempo according to an embodiment of the present invention;
fig. 1a is a schematic diagram of a determined rhythm position in audio data according to an embodiment of the present invention;
fig. 2 is a flowchart of another tempo adjustment method according to an embodiment of the present invention;
fig. 3 is a flowchart of another tempo adjustment method according to an embodiment of the present invention;
fig. 4 is a flowchart of another tempo adjustment method according to an embodiment of the present invention;
fig. 5 is a flowchart of another tempo adjustment method according to an embodiment of the present invention;
fig. 5a is a schematic diagram of comparing the position points of the rhythm before and after adjustment according to the rhythm adjustment method provided by the embodiment of the present invention;
fig. 5b is a schematic diagram of a comparison between the front and rear adjustment of a rhythm position point according to another embodiment of the present invention;
fig. 6 is a flowchart of another tempo adjustment method according to an embodiment of the present invention;
fig. 7 is a block diagram of a rhythm adjustment device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in further detail below with reference to the drawings and examples. It should be understood that the particular embodiments described herein are illustrative only and are not limiting of embodiments of the invention. It should be further noted that, for convenience of description, only some, but not all of the structures related to the embodiments of the present invention are shown in the drawings.
Fig. 1 is a flowchart of a rhythm adjustment method provided in an embodiment of the present invention, where the method may be suitable for adjusting a rhythm position determined by audio data, and the method may be performed by a computing device, such as a desktop, a notebook, a server, a tablet computer, and a mobile phone terminal device, and specifically includes the following steps:
step S101, determining the rhythm position of each rhythm point in the audio data through a rhythm detection algorithm.
The audio data may be audio of an acquired piece of music, where the music includes a fixed beat and a corresponding tempo. The audio data in the scheme can be used for a plurality of different scenes, such as video editing, namely, after the rhythm position in the audio data is adjusted, the synchronization of the audio and the video can be carried out in the video editing process; the method can also be used for controlling the change of stage lighting and the like according to the determined different rhythm position points during stage performance.
In one embodiment, the audio data is processed by a tempo detection algorithm to estimate individual tempo points in the audio data. Specifically, the rhythm detection algorithm may be a dynamic programming (Dynamic Programing) algorithm, an algorithm for identifying and obtaining a rhythm position in audio data based on spectrum analysis, or an algorithm for obtaining a rhythm position by further analyzing an audio signal of original audio data after windowing, fourier transformation and difference processing. Exemplary, as shown in fig. 1a, fig. 1a is a schematic diagram of a determined rhythm position in audio data according to an embodiment of the present invention. In fig. 1a, the abscissa indicates time, and the ordinate indicates signal intensity in audio data at different time points, where the position of the mark is the position of the rhythm point determined by the rhythm detection algorithm. As can be seen in fig. 1a, there is a significant inconsistency in the time interval between two cadence positions at two solid rectangular positions.
Step S102, determining the rhythm intervals of all rhythm points and the standard rhythm intervals of all rhythm points according to the rhythm positions.
The rhythm interval refers to the time interval between each rhythm point determined by the rhythm detection algorithm. For example, 10 tempo points, denoted as x [1], x [2], x [3], x [4], x [5], x [6], x [7], x [8], x [9] and x [10], are detected in a 7 second piece of audio data, respectively, with corresponding time points of 10.2s, 10.8s, 11.7s, 12.4s, 13.1s, 13.8s, 14.4s, 15.3s, 15.9s and 16.5s, respectively, being exemplary. The time points of adjacent rhythm points are calculated to obtain the rhythm interval in turn, such as 0.6s for rhythm interval x 1-x 2, 0.9s for rhythm interval x 2-x 3, 0.7s for rhythm interval x 3-x 4, 0.7s for rhythm interval x 4-x 5, 0.7s for rhythm interval x 5-x 6, 0.6s for rhythm interval x 6-x 7, 0.9s for rhythm interval x 7-x 8, 0.6s for rhythm interval x 8-x 9 and 0.6s for rhythm interval x 9-x 10.
In one embodiment, after determining the tempo intervals of the respective tempo points, an average tempo interval corresponding to all the tempo intervals may be calculated, and the average tempo interval is determined as the standard tempo interval. In another embodiment, the standard cadence interval may be determined according to the first N cadence intervals, if N has a value of 3, and then the average cadence interval of the first 3 cadence intervals is calculated as the standard cadence interval. Taking the above determined 10 rhythm points as an example, the total of 9 rhythm intervals, wherein the average rhythm interval corresponding to all the rhythm intervals is 0.7s, and 0.7s can be determined as the standard rhythm interval of the audio data; taking the example of averaging the first 3 tempo intervals, which is 0.73s, 0.73s can be determined as the standard tempo interval of the piece of audio data.
And step S103, determining a rhythm adjusting point which needs to be subjected to interval adjustment according to the rhythm interval and the standard rhythm interval.
In one embodiment, after determining the standard rhythm interval, a rhythm point corresponding to the rhythm interval outside the standard rhythm interval as the reference error range by a certain value may be determined as the rhythm adjustment point. For example, assuming that the determined standard rhythm interval is 0.4s and the error range is set to 0.05s, a rhythm point corresponding to a rhythm interval of which the rhythm interval is less than 0.35 and the rhythm interval is greater than 0.45 is determined as a rhythm adjustment point to be subjected to interval adjustment.
And step S104, adjusting the rhythm position of the rhythm adjusting point so as to enable the rhythm position to meet the standard rhythm interval.
And after determining the rhythm adjusting point, adjusting the position of the rhythm adjusting point. In one embodiment, after the rhythm interval is sequentially traversed from front to back to determine the rhythm adjustment point, the rhythm interval between the rhythm adjustment point and the previous rhythm point is adjusted to be a standard rhythm interval, the positions of the subsequent rhythm points are correspondingly and synchronously adjusted, and the traversing is continued after the adjustment is completed; or directly performing subsequent traversal without synchronous adjustment, continuously determining new rhythm adjustment points, and then performing rhythm interval adjustment until all rhythm points are traversed.
According to the scheme, the rhythm positions of all rhythm points in the audio data determined by the rhythm detection algorithm are calculated, the rhythm intervals and the standard rhythm intervals are calculated, the positions of the rhythm points are adjusted to meet the range of the standard rhythm intervals, the consistency of the determined rhythm intervals of the rhythm points is ensured, and the efficiency of applying the audio data to other scenes is further improved through optimizing the positions of the rhythm points.
On the basis of the technical scheme, if the rhythm intervals are determined to be within the error range required by the standard rhythm intervals (under the condition of shorter duration of audio data, the corresponding rhythm points are not adjusted. It should be noted that, the error range may be adaptively adjusted according to the total duration of the actual audio data, and if the determined duration of the standard rhythm interval is longer, the error range may be correspondingly increased, and if the duration of the standard rhythm interval is shorter, the error range may be correspondingly decreased, which is not limited herein.
Fig. 2 is a flowchart of another method for adjusting a tempo according to an embodiment of the present invention, which provides a specific scheme for determining a tempo interval of each tempo point and a standard tempo interval of all tempo points according to a tempo position. As shown in fig. 2, the technical scheme is as follows:
step S201, determining the rhythm position of each rhythm point in the audio data through a rhythm detection algorithm.
Step S202, determining the rhythm intervals of all the rhythm points according to the rhythm positions, carrying out data grouping according to the size of the rhythm intervals, and determining the rhythm interval corresponding to the group with the most rhythm points in all the data grouping as a standard rhythm interval.
In one embodiment, after determining the cadence intervals of each cadence point, the cadence intervals are counted and data is grouped according to the size of the cadence intervals. If the error between the subsequent rhythm interval and the previous rhythm interval is determined from the first rhythm interval, the rhythm points corresponding to the rhythm intervals within the error range are divided into the same data group. Illustratively, taking 10 tempo points, noted as x [1], x [2], x [3], x [4], x [5], x [6], x [7], x [8], x [9] and x [10], respectively, detected in a piece of audio data of 7 seconds, the corresponding time points are illustratively 10.2s, 10.8s, 11.7s, 12.4s, 13.1s, 13.8s, 14.4s, 15.3s, 15.9s and 16.5s in order, with the error range set to 0.15s. Wherein, the interval of x 1-x 2 rhythm is 0.6s, the interval of x 2-x 3 rhythm is 0.9s, thus the interval difference of x 2-x 3 rhythm and x 1-x 2 rhythm is 0.4s larger than the error range 0.1s, then the two are in different groups, the interval of x 3-x 4 rhythm is 0.7s, the interval of x 1-x 2 rhythm is smaller than the error range, the interval of x 2-x 3 rhythm is larger than the error range, then the interval of x 2-x 3 rhythm is added to the group where the interval of x 1-x 2 rhythm is located, and the final grouping result is obtained by analogy: x 1-x 2, x 3-x 4, x 4-x 5, x 5-x 6, x 6-x 7, x 8-x 9, x 9-x 10; x 2-x 3, x 7-x 8. For the group x 1-x 2, x 3-x 4, x 4-x 5, x 5-x 6, x 6-x 7, x 8-x 9, x 9-x 10, the average rhythm interval is determined as standard rhythm interval.
And step S203, determining a rhythm adjusting point which needs to be subjected to interval adjustment according to the rhythm interval and the standard rhythm interval.
And step S204, adjusting the rhythm position of the rhythm adjusting point so as to enable the rhythm position to meet the standard rhythm interval.
According to the scheme, the rhythm intervals of all rhythm points are determined according to the rhythm positions, data grouping is carried out according to the size of the rhythm intervals, the rhythm interval corresponding to the most grouping of the rhythm points in all data grouping is determined to be the standard rhythm interval, the accuracy of the determined standard rhythm interval is higher, meanwhile, the subsequent rhythm position adjustment efficiency is improved, the problem that detected rhythms in audio data are inconsistent is effectively solved, and the determined rhythm positions are reasonably optimized.
Fig. 3 is a flowchart of another method for adjusting a tempo according to an embodiment of the present invention, which provides another specific scheme for determining a tempo interval of each tempo point and a standard tempo interval of all tempo points according to a tempo position. As shown in fig. 3, the technical scheme is as follows:
step S301, determining the rhythm position of each rhythm point in the audio data through a rhythm detection algorithm.
Step S302, traversing the rhythm positions of the rhythm points, and sequentially determining rhythm intervals of every two rhythm points.
In one embodiment, taking 10 tempo points as x 1, x 2, x 3, x 4, x 5, x 6, x 7, x 8, x 9 and x 10 as examples, respectively, are detected in a 7 second piece of audio data, the corresponding time points are illustratively 10.2s, 10.8s, 11.7s, 12.4s, 13.1s, 13.8s, 14.4s, 15.3s, 15.9s and 16.5s in order. In the traversal process, starting from the rhythm interval x 1-x 2, which is 0.6S, the corresponding record is performed, the rhythm interval x 2-x 3 is 0.9S, the preset error range is assumed to be 0.15S, and step S303 is executed.
Step S303, creating a first data packet, if the rhythm interval of the adjacent rhythm points meets the preset error range, dividing the adjacent rhythm points into the first data packet, otherwise, creating a second data packet, and dividing the rhythm points which do not meet the preset error range into the second data packet.
Taking the example in step S302 as an example, the preset error range is 0.15S, first create a first data packet, where x 1-x 2 rhythm intervals are recorded for 0.6S, when traversing that the errors between x 2-x 3 rhythm intervals of 0.9S and x 1-x 2 rhythm intervals of 0.6S are greater than the preset error range, create a second data packet, and record x 2-x 3 rhythm intervals of 0.9S to the packet. Similarly, when the step S302 traverses to 0.7S of the interval of the rhythms from x 3 to x 4, and the error between the interval of the rhythms from x 2 to x 3 is greater than the preset error range, a third data packet is created, and the interval of the rhythms from x 3 to x 4 is recorded for 0.7S; and when the error between 0.7s of the rhythm interval of x 4-x 5 and 0.7s of the rhythm interval of x 3-x 4 is not larger than the preset error range, recording the 0.7s of the rhythm interval of x 4-x 5 to a third data packet, and so on until the interval of the rhythm interval of x 9-x 10 is traversed to 0.6s.
Step S304, determining the corresponding rhythm interval of the most rhythm points in all the data packets as a standard rhythm interval.
As can be seen from the above-mentioned traversing of step S302 and determination of the group of step S303, the group with the largest corresponding rhythm points is finally determined by taking the example shown in step S302 as an example, where the third data group { x 3-x 4] rhythm interval 0.7S, x 4-x 5] rhythm interval 0.7S, x 5-x 6] rhythm interval 0.7S, x 6-x 7] rhythm interval 0.6S }. The standard cadence interval may be determined from the third data packet cadence interval by averaging the third data packet cadence interval for 0.675s, and determining 0.675s as the standard cadence interval.
And step S305, determining a rhythm adjusting point which needs to be subjected to interval adjustment according to the rhythm interval and the standard rhythm interval.
And step S306, adjusting the rhythm position of the rhythm adjusting point so as to enable the rhythm position to meet the standard rhythm interval.
According to the scheme, the data grouping is carried out on the rhythm intervals through traversing the rhythm intervals and according to the error conditions of the front and rear rhythm intervals in the traversing process, the rhythm interval corresponding to the group with the largest rhythm point in all the data groups is determined to be the standard rhythm interval, the accuracy of the standard rhythm interval finally determined by the data grouping mode is higher, the subsequent rhythm position adjustment is facilitated, and the overall rhythm position adjustment efficiency is improved.
Fig. 4 is a flowchart of another cadence adjustment method according to an embodiment of the invention, which further includes fine-tuning the cadence interval during data grouping. As shown in fig. 4, the technical scheme is as follows:
step S401, determining the rhythm position of each rhythm point in the audio data through a rhythm detection algorithm.
Step S402, traversing the rhythm positions of the rhythm points, and sequentially determining rhythm intervals of every two rhythm points.
Step S403, creating a first data packet, if the cadence interval of adjacent cadence points meets a preset error range, dividing the adjacent cadence points into the first data packet, and adjusting the cadence point positions divided into the first data packet.
In an embodiment, the step of adjusting the position of the cadence point divided into the same data packets is further comprised. For example, taking 10 tempo points detected in a 7 second segment of audio data, denoted as x [1], x [2], x [3], x [4], x [5], x [6], x [7], x [8], x [9] and x [10], respectively, the corresponding time points are exemplified by 10.2s, 10.8s, 11.7s, 12.4s, 13.1s, 13.8s, 14.4s, 15.3s, 15.9s and 16.5s, respectively. In the process of data grouping, the data grouping manner of step S303 may be adopted, and details of the process of specific data grouping are not described herein. When the third data packet is recorded with { x 3-x 4] rhythm interval 0.7s, x 4-x 5] rhythm interval 0.7s, x 5-x 6] rhythm interval 0.7s } and traverses to x 6-x 7] rhythm interval 0.6s, it meets the requirement of adding to the third data packet, in this embodiment, fine tuning is performed on the rhythm position of its rhythm point in the process of adding so as to keep the same with the recorded rhythm interval, the corresponding result is that the third data group { x 3-x 4] rhythm interval 0.7s, x 4-x 5] rhythm interval 0.7s, x 5-x 6] rhythm interval 0.7s, x 6-x 7 rhythm interval 0.7s }, the corresponding x 7-x 8 rhythm interval is shifted back by 0.1s due to the x 7 rhythm position, the x 7-x 8 rhythm interval becomes 0.8s, the error of 0.7s of the x 6-x 7 rhythm interval is smaller than the preset error range, x 7-x 8 is added to the third data group, at the same time, the x 7-x 8 rhythm interval is adjusted to 0.7s, at the moment, the third data group record content is: { x 3-x 4 rhythm interval 0.7s, x 4-x 5 rhythm interval 0.7s, x 5-x 6 rhythm interval 0.7s, x 6-x 7 rhythm interval 0.7s, x 7-x 8 rhythm interval 0.7s }, the corresponding rhythm interval traversed to x 8-x 9 is 0.7s, the conditions added to the third data packet are met, and the third data packet is: { 0.7s of x 3-x 4 rhythm interval, 0.7s of x 4-x 5 rhythm interval, 0.7s of x 5-x 6 rhythm interval, 0.7s of x 6-x 7 rhythm interval, 0.7s of x 7-x 8 rhythm interval, 0.7s of x 8-x 9 rhythm interval, 0.6s of rhythm interval when traversing to x 9-x 10 rhythm interval, accord with the third data grouping condition, the third data grouping is updated at this time: { 0.7s for x 3-x 4, 0.7s for x 4-x 5, 0.7s for x 5-x 6, 0.7s for x 6-x 7, 0.7s for x 7-x 8, 0.7s for x 8-x 9, 0.7s for x 9-x 10.
Step S404, determining the corresponding rhythm interval of the most rhythm point group in all the data groups as a standard rhythm interval.
After processing in step S403, the third data packet records { x 3-x 4] rhythm interval 0.7S, x 4-x 5] rhythm interval 0.7S, x 5-x 6] rhythm interval 0.7S, x 6-x 7 rhythm interval 0.7S, x 7-x 8] rhythm interval 0.7S, x 8-x 9] rhythm interval 0.7S, x 9-x 10] rhythm interval 0.7S } and the rhythm position is adjusted.
And step S405, determining a rhythm adjustment point which needs to be subjected to interval adjustment according to the rhythm interval and the standard rhythm interval.
And step S406, adjusting the rhythm position of the rhythm adjusting point so as to enable the rhythm position to meet the standard rhythm interval.
According to the scheme, the corresponding adjustment of the rhythm position is carried out on the rhythm points added to the same data packet meeting the preset error range in the data packet process, so that the rhythm adjustment efficiency is obviously improved, and the determined final rhythm interval is more reasonable.
Fig. 5 is a flowchart of another method for adjusting a tempo according to an embodiment of the present invention, which provides a specific scheme for adjusting a tempo position of a tempo adjustment point. As shown in fig. 5, the technical scheme is specifically as follows:
step S501, determining the rhythm position of each rhythm point in the audio data through a rhythm detection algorithm.
Step S502, determining the rhythm intervals of the rhythm points according to the rhythm positions, performing data grouping according to the size of the rhythm intervals, and determining the rhythm interval corresponding to the group with the largest rhythm point in all the data grouping as a standard rhythm interval.
Step S503, determining the data packet in which the standard cadence interval is located as a reference data packet, and determining cadence points in other data packets as adjustment cadence points.
Step S504, starting from the data packet adjacent to the reference data packet, sequentially adjusting the position of the adjustment cadence point.
In one embodiment, after determining the packet of the maximum number of rhythm points, the third data packet obtained by determining in step S403 records { x 3-x 4] rhythm interval 0.7S, x 4-x 5] rhythm interval 0.7S, x 5-x 6 rhythm interval 0.7S, x 6-x 7 rhythm interval 0.7S, x 7-x 8 rhythm interval 0.7S, x 8-x 9] rhythm interval 0.7S, x 9-x 10] rhythm interval 0.7S }, and adjusts the rhythm intervals of x 1-x 2 and x 2-x 3 inversely with the rhythm interval 0.7S as the standard rhythm interval at this time to adjust the rhythm interval to 0.7S.
Fig. 5a is a schematic diagram of comparing the position points of the rhythm before and after adjustment according to the rhythm adjustment method provided by the embodiment of the present invention. As shown in the figure, the short dashed line is the rhythm position point determined before the rhythm position adjustment, the rhythm position marked by the long dashed line is the rhythm position point after the adjustment, and the rhythm interval keeps good consistency. Fig. 5b is a schematic diagram of a comparison between the front and rear adjustment of a rhythm position point according to another embodiment of the present invention. As shown in the figure, before the rhythm position adjustment is not performed on the audio data, obvious inconsistency exists between the rhythm interval corresponding to the 3.5s to 4.5s position of the time slice and the previous rhythm interval, and the consistency of the rhythm interval of the adjusted rhythm position point is obviously enhanced.
According to the scheme, when the data packet with the standard rhythm interval is determined to be the reference data packet, rhythm points in other data packets are determined to be the adjustment rhythm points, and the positions of the adjustment rhythm points are sequentially adjusted from the data packet adjacent to the reference data packet, so that the problem of inconsistent detected rhythm in the audio data can be effectively eliminated, and the determined rhythm positions are reasonably optimized.
Fig. 6 is a flowchart of another method for adjusting a tempo according to an embodiment of the present invention, which further inserts new tempo points after adjusting the positions of detected tempo points. As shown in fig. 6, the technical scheme is specifically as follows:
step S601, determining the rhythm position of each rhythm point in the audio data through a rhythm detection algorithm.
Step S602, determining the rhythm intervals of each rhythm point and the standard rhythm intervals of all rhythm points according to the rhythm position.
And step S603, determining a rhythm adjusting point which needs to be subjected to interval adjustment according to the rhythm interval and the standard rhythm interval.
Step S604, adjusting the rhythm position of the rhythm adjustment point so as to enable the rhythm position to meet the standard rhythm interval.
And step S605, determining an interpolation rhythm interval according to the standard rhythm interval, and determining the rhythm position of the secondary rhythm point according to the interpolation rhythm interval.
In one embodiment, after the adjustment of the rhythm position, the rhythm position of the secondary rhythm point may be determined according to the interpolation rhythm interval set by the user (e.g. 1/2, 1/3 or 1/4 of the adjusted rhythm interval), and the rhythm position point may be inserted accordingly. Of course, the position rhythm points can be deleted in equal proportion according to the requirement of the user, and the rhythm interval is increased in equal proportion (for example, 2 times of the regulated rhythm interval).
After the consistency adjustment of the rhythm intervals is carried out by the scheme, the obtained rhythm intervals are kept consistent, convenience is further provided for the subsequent adjustment of the music rhythm, and the overall processing efficiency of the audio data is remarkably improved.
Fig. 7 is a block diagram of a rhythm adjustment device according to an embodiment of the present invention, where the device is configured to execute the rhythm adjustment method provided by the foregoing embodiment, and the device has functional modules and beneficial effects corresponding to the execution method. As shown in fig. 7, the apparatus specifically includes: a cadence position determination module 101, a cadence interval determination module 102, and a cadence adjustment module 103, wherein,
a rhythm position determining module 101, configured to determine a rhythm position of each rhythm point in the audio data through a rhythm detection algorithm;
a rhythm interval determining module 102, configured to determine, according to the rhythm position, a rhythm interval of each rhythm point and standard rhythm intervals of all rhythm points;
and the rhythm adjustment module 103 is configured to determine a rhythm adjustment point that needs to be adjusted according to the rhythm interval and the standard rhythm interval, and adjust a rhythm position of the rhythm adjustment point so as to enable the rhythm position to meet the standard rhythm interval.
According to the scheme, the rhythm positions of all rhythm points in the audio data determined by the rhythm detection algorithm are calculated, the rhythm intervals and the standard rhythm intervals are calculated, the positions of the rhythm points are adjusted to meet the range of the standard rhythm intervals, the consistency of the determined rhythm intervals of the rhythm points is ensured, and the efficiency of applying the audio data to other scenes is further improved through optimizing the positions of the rhythm points.
In one possible embodiment, the cadence interval determination module 102 is specifically configured to:
determining the rhythm intervals of all rhythm points according to the rhythm positions;
and carrying out data grouping according to the size of the cadence interval, and determining the cadence interval corresponding to the group with the most cadence points in all the data grouping as a standard cadence interval.
In one possible embodiment, the cadence interval determination module 102 is specifically configured to:
traversing the rhythm positions of each rhythm point, and sequentially determining rhythm intervals of every two rhythm points;
the rhythm adjustment module 103 is specifically configured to:
and creating a first data packet, and dividing adjacent rhythm points into the first data packet if the rhythm intervals of the adjacent rhythm points meet a preset error range.
In a possible embodiment, the cadence adjustment module 103 is further configured to:
and adjusting the positions of the rhythm points divided into the first data packets.
In one possible embodiment, the cadence adjustment module 103 is specifically configured to:
determining an intra-group cadence interval of the first data packet;
and according to the sequence of the rhythm points added into the first data packet, sequentially adjusting the rhythm point positions according to the rhythm intervals in the packet.
In one possible embodiment, the cadence adjustment module 103 is specifically configured to: if the rhythm interval of the adjacent rhythm points does not meet the preset error range, creating a second data packet, and dividing the rhythm points which do not meet the preset error range into the second data packet.
In one possible embodiment, the cadence adjustment module 103 is specifically configured to:
determining a data packet in which the standard rhythm interval is positioned as a reference data packet, and determining rhythm points in other data packets as adjustment rhythm points;
and starting from the data packets adjacent to the reference data packet, sequentially adjusting the positions of the adjustment rhythm points of the reference data packet.
In a possible embodiment, the apparatus further comprises a cadence interpolation module 104 for:
after the rhythm position of the rhythm adjusting point is adjusted, determining an interpolation rhythm interval according to the standard rhythm interval;
and determining the rhythm position of the secondary rhythm point according to the interpolation rhythm interval.
Fig. 8 is a schematic structural diagram of a cadence adjustment device according to an embodiment of the invention, and as shown in fig. 8, the device includes a processor 201, a memory 202, an input device 203, and an output device 204; the number of processors 201 in the device may be one or more, one processor 201 being taken as an example in fig. 8; the processor 201, memory 202, input devices 203, and output devices 204 in the apparatus may be connected by a bus or other means, for example in fig. 8. The memory 202 is a computer readable storage medium, and may be used to store a software program, a computer executable program, and modules, such as program instructions/modules corresponding to the tempo adjustment method in the embodiment of the present invention. The processor 201 executes various functional applications of the device and data processing, i.e., implements the above-described tempo adjustment method, by running software programs, instructions, and modules stored in the memory 202. The input means 203 may be used to receive entered numeric or character information and to generate key signal inputs related to user settings and function control of the device. The output device 204 may include a display device such as a display screen.
The embodiments of the present invention also provide a storage medium containing computer executable instructions which, when executed by a computer processor, are for performing a cadence adjustment method, the method comprising:
determining the rhythm position of each rhythm point in the audio data through a rhythm detection algorithm;
determining the rhythm intervals of all rhythm points and the standard rhythm intervals of all rhythm points according to the rhythm positions;
determining a rhythm adjusting point which needs to be subjected to interval adjustment according to the rhythm interval and the standard rhythm interval;
and adjusting the rhythm position of the rhythm adjusting point so as to enable the rhythm position to meet the standard rhythm interval.
It should be noted that, in the above embodiment of the rhythm adjustment device, each unit and module included are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the embodiments of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the embodiments of the present invention are not limited to the particular embodiments described herein, but are capable of numerous obvious changes, rearrangements and substitutions without departing from the scope of the embodiments of the present invention. Therefore, while the embodiments of the present invention have been described in connection with the above embodiments, the embodiments of the present invention are not limited to the above embodiments, but may include many other equivalent embodiments without departing from the spirit of the embodiments of the present invention, and the scope of the embodiments of the present invention is determined by the scope of the appended claims.

Claims (10)

1. The rhythm adjustment method is characterized by comprising the following steps:
determining the rhythm position of each rhythm point in the audio data through a rhythm detection algorithm;
determining the rhythm intervals of all rhythm points and the standard rhythm intervals of all rhythm points according to the rhythm positions, wherein the steps include determining the rhythm intervals of all the rhythm points according to the rhythm positions, carrying out data grouping according to the size of the rhythm intervals, and determining the rhythm interval corresponding to the most grouping of the rhythm points in all the data grouping as the standard rhythm interval;
determining a rhythm adjusting point which needs to be subjected to interval adjustment according to the rhythm interval and the standard rhythm interval;
and adjusting the rhythm position of the rhythm adjusting point so as to enable the rhythm position to meet the standard rhythm interval.
2. The tempo adjustment method of claim 1 wherein the determining of the tempo intervals of the individual tempo points from the tempo positions comprises:
traversing the rhythm positions of each rhythm point, and sequentially determining rhythm intervals of every two rhythm points;
correspondingly, the data grouping according to the size of the cadence interval includes:
and creating a first data packet, and dividing adjacent rhythm points into the first data packet if the rhythm intervals of the adjacent rhythm points meet a preset error range.
3. The cadence adjustment method of claim 2, wherein the partitioning of the adjacent cadence points into the first data packet further comprises:
and adjusting the positions of the rhythm points divided into the first data packets.
4. A cadence adjustment method according to claim 3, wherein the adjustment of cadence point locations divided into the first data packet comprises:
determining an intra-group cadence interval of the first data packet;
and according to the sequence of the rhythm points added into the first data packet, sequentially adjusting the rhythm point positions according to the rhythm intervals in the packet.
5. The tempo adjustment method of any one of claims 2-4 wherein if a tempo interval of adjacent tempo points does not meet a preset error range then a second data grouping is created and tempo points corresponding to the unsatisfied preset error range are divided into second data groupings.
6. The method for adjusting a cadence according to claim 1, wherein determining a cadence adjustment point at which an interval adjustment is required according to the cadence interval and the standard cadence interval, adjusting a cadence position of the cadence adjustment point, comprises:
determining a data packet in which the standard rhythm interval is positioned as a reference data packet, and determining rhythm points in other data packets as adjustment rhythm points;
and starting from the data packets adjacent to the reference data packet, sequentially adjusting the positions of the adjustment rhythm points of the reference data packet.
7. The tempo adjustment method according to claim 1 and further comprising, after adjusting the tempo position of the tempo adjustment points:
determining an interpolation rhythm interval according to the standard rhythm interval;
and determining the rhythm position of the secondary rhythm point according to the interpolation rhythm interval.
8. The rhythm adjustment device is characterized by comprising:
the rhythm position determining module is used for determining the rhythm position of each rhythm point in the audio data through a rhythm detection algorithm;
the rhythm interval determining module is used for determining the rhythm interval of each rhythm point according to the rhythm position, carrying out data grouping according to the size of the rhythm interval, and determining the rhythm interval corresponding to the grouping with the largest rhythm point in all data grouping as a standard rhythm interval;
and the rhythm adjustment module is used for determining a rhythm adjustment point which needs to be subjected to interval adjustment according to the rhythm interval and the standard rhythm interval, and adjusting the rhythm position of the rhythm adjustment point so as to enable the rhythm position to meet the standard rhythm interval.
9. A cadence adjustment device, the device comprising: one or more processors; storage means for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the cadence adjustment method of any of claims 1-7.
10. A storage medium storing computer executable instructions which, when executed by a computer processor, are for performing the cadence adjustment method of any of claims 1-7.
CN202110261347.1A 2021-03-10 2021-03-10 Rhythm adjustment method, device, equipment and storage medium Active CN113053339B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110261347.1A CN113053339B (en) 2021-03-10 2021-03-10 Rhythm adjustment method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110261347.1A CN113053339B (en) 2021-03-10 2021-03-10 Rhythm adjustment method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113053339A CN113053339A (en) 2021-06-29
CN113053339B true CN113053339B (en) 2024-04-02

Family

ID=76511049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110261347.1A Active CN113053339B (en) 2021-03-10 2021-03-10 Rhythm adjustment method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113053339B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1326303A (en) * 2000-05-25 2001-12-12 雅马哈株式会社 Portable communication terminal device with music mixing
CN104599663A (en) * 2014-12-31 2015-05-06 华为技术有限公司 Song accompaniment audio data processing method and device
CN107871012A (en) * 2017-11-22 2018-04-03 广州酷狗计算机科技有限公司 Audio-frequency processing method, device, storage medium and terminal
CN108319657A (en) * 2018-01-04 2018-07-24 广州市百果园信息技术有限公司 Detect method, storage medium and the terminal of strong rhythm point
CN109670074A (en) * 2018-12-12 2019-04-23 北京字节跳动网络技术有限公司 A kind of rhythm point recognition methods, device, electronic equipment and storage medium
CN110519638A (en) * 2019-09-06 2019-11-29 Oppo广东移动通信有限公司 Processing method, processing unit, electronic device and storage medium
CN110688518A (en) * 2019-10-12 2020-01-14 广州酷狗计算机科技有限公司 Rhythm point determining method, device, equipment and storage medium
CN110933487A (en) * 2019-12-18 2020-03-27 北京百度网讯科技有限公司 Method, device and equipment for generating click video and storage medium
CN111048111A (en) * 2019-12-25 2020-04-21 广州酷狗计算机科技有限公司 Method, device and equipment for detecting rhythm point of audio frequency and readable storage medium
CN111105769A (en) * 2019-12-26 2020-05-05 广州酷狗计算机科技有限公司 Method, device, equipment and storage medium for detecting intermediate frequency rhythm point of audio

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1326303A (en) * 2000-05-25 2001-12-12 雅马哈株式会社 Portable communication terminal device with music mixing
CN104599663A (en) * 2014-12-31 2015-05-06 华为技术有限公司 Song accompaniment audio data processing method and device
CN107871012A (en) * 2017-11-22 2018-04-03 广州酷狗计算机科技有限公司 Audio-frequency processing method, device, storage medium and terminal
CN108319657A (en) * 2018-01-04 2018-07-24 广州市百果园信息技术有限公司 Detect method, storage medium and the terminal of strong rhythm point
CN109670074A (en) * 2018-12-12 2019-04-23 北京字节跳动网络技术有限公司 A kind of rhythm point recognition methods, device, electronic equipment and storage medium
CN110519638A (en) * 2019-09-06 2019-11-29 Oppo广东移动通信有限公司 Processing method, processing unit, electronic device and storage medium
CN110688518A (en) * 2019-10-12 2020-01-14 广州酷狗计算机科技有限公司 Rhythm point determining method, device, equipment and storage medium
CN110933487A (en) * 2019-12-18 2020-03-27 北京百度网讯科技有限公司 Method, device and equipment for generating click video and storage medium
CN111048111A (en) * 2019-12-25 2020-04-21 广州酷狗计算机科技有限公司 Method, device and equipment for detecting rhythm point of audio frequency and readable storage medium
CN111105769A (en) * 2019-12-26 2020-05-05 广州酷狗计算机科技有限公司 Method, device, equipment and storage medium for detecting intermediate frequency rhythm point of audio

Also Published As

Publication number Publication date
CN113053339A (en) 2021-06-29

Similar Documents

Publication Publication Date Title
CN109739929B (en) Data synchronization method, device and system
US20230018442A1 (en) Looping audio-visual file generation based on audio and video analysis
US20240144973A1 (en) Generating a Video Presentation to Accompany Audio
US20230025449A1 (en) Method and apparatus for dynamically adding consensus node in blockchain
CN107277594A (en) A kind of video and audio and barrage synchronous method and device
RU2763518C1 (en) Method, device and apparatus for adding special effects in video and data media
WO2019169723A1 (en) Test case selection method, device and equipment, and computer-readable storage medium
CN110795499A (en) Cluster data synchronization method, device and equipment based on big data and storage medium
US20220284377A1 (en) Method and apparatus for task group positioning
WO2019237664A1 (en) Method and apparatus for correcting time delay between accompaniment and dry sound, and storage medium
CN108289232B (en) Control method of playing device, terminal device and storage medium
CN113053339B (en) Rhythm adjustment method, device, equipment and storage medium
CN113918648A (en) Data synchronization method and device, electronic equipment and storage medium
WO2024041406A1 (en) Video target frame determination method, apparatus and device, and storage medium
CN115421965A (en) Consistency checking method and device, electronic equipment and storage medium
CN111026810B (en) Data synchronization method, device and storage medium
CN110569231B (en) Data migration method, device, equipment and medium
US20140026139A1 (en) Information processing apparatus and analysis method
CN108735239B (en) Audio playing control method and terminal equipment
CN113674725A (en) Audio mixing method, device, equipment and storage medium
US11269951B2 (en) Indexing variable bit stream audio formats
CN115883818B (en) Video frame number automatic counting method and device, electronic equipment and storage medium
CN110968265B (en) Method and device for expanding capacity by fragments and electronic equipment
CN116312431B (en) Electric tone key control method, apparatus, computer device, and storage medium
JP4784597B2 (en) Recording / reproducing apparatus and program

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