WO2019128638A1 - 从音乐节拍点中提取大节拍信息的方法、存储介质和终端 - Google Patents

从音乐节拍点中提取大节拍信息的方法、存储介质和终端 Download PDF

Info

Publication number
WO2019128638A1
WO2019128638A1 PCT/CN2018/119108 CN2018119108W WO2019128638A1 WO 2019128638 A1 WO2019128638 A1 WO 2019128638A1 CN 2018119108 W CN2018119108 W CN 2018119108W WO 2019128638 A1 WO2019128638 A1 WO 2019128638A1
Authority
WO
WIPO (PCT)
Prior art keywords
beat
point
points
candidate
beat point
Prior art date
Application number
PCT/CN2018/119108
Other languages
English (en)
French (fr)
Inventor
娄帆
李敬
Original Assignee
广州市百果园信息技术有限公司
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 广州市百果园信息技术有限公司 filed Critical 广州市百果园信息技术有限公司
Priority to RU2020124337A priority Critical patent/RU2773876C2/ru
Priority to US16/957,935 priority patent/US11386876B2/en
Priority to EP18894999.4A priority patent/EP3734468A4/en
Publication of WO2019128638A1 publication Critical patent/WO2019128638A1/zh

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
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/68Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/683Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • 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

Definitions

  • the present invention relates to the field of multimedia information technology, and in particular, to a method, a storage medium and a terminal for extracting large beat information from a music beat point.
  • the music beat point is a general term for the time points of the drums, the piano accent, the vocal climax, etc. with strong rhythm characteristics.
  • the Big Beat is a form of music based on the development of electronic dance music that emerged in the UK in the mid-1990s.
  • the music producer will add a set of periodic (or quasi-periodic) large beat points to the music beat points.
  • the snare drum is usually used to play this set of beat points, so it is also called "junior drum point". Since the rhythm of the big beat is better, it is important to extract the large beat information from the music beat points to apply to the various scenes that the user needs. However, the corresponding scheme for extracting large beat information has not appeared in the conventional technology.
  • the invention solves the shortcomings of the prior art, and provides a method for extracting large beat information from a music beat point, a storage medium and a terminal, which are used to solve the problem that the large beat information cannot be extracted from the music beat point in the prior art. To achieve the extraction of large beat information from the beat points of the music.
  • the present invention provides a method for extracting large beat information from a music beat point, comprising the steps of:
  • the big beat information is obtained according to the maximum weight sequence of each candidate beat cycle and the corresponding weight.
  • the method for extracting large beat information from music beat points obtains a plurality of candidate beat periods according to the input beat points, and then obtains a maximum weight sequence of each candidate beat period, according to the maximum weight sequence and corresponding The weight can automatically obtain the big beat information, thus achieving the extraction of large beat information.
  • the obtaining a number of candidate beat periods based on respective beat points of the input music includes:
  • Histogram statistics of Gaussian distribution are obtained for each time interval, and a histogram is obtained, wherein the abscissa of the histogram is used to represent the time interval, and the ordinate is used to represent the number of occurrences of the time interval;
  • a preset number of peak points are selected according to the order of the peak point corresponding times, and the interval time corresponding to the preset number of peak points is used as the candidate beat period.
  • the histogram statistics are performed by using a Gaussian distribution method, and the accuracy of the statistical result is ensured while eliminating the influence of the error, thereby obtaining more accurate large beat information.
  • the histogram statistics of Gaussian distribution for each time interval include:
  • T is the current time interval
  • t is a time interval other than the current time interval
  • is a preset threshold
  • the beat point includes a strong beat point and a weak beat point
  • the calculating the weight of each beat point sequence includes:
  • the weight of the current beat point sequence is added to the first set value
  • the weight of the current beat point sequence is added to a second set value, wherein the first The second set value is less than the first set value;
  • the weight of the current beat point sequence is added to a third set value, wherein the third set value is smaller than the third set value Second set value;
  • the weight of the current beat point sequence is decreased by a fourth set value
  • the weight of each beat point sequence is calculated by the weight calculation method of the design, so that the interference of the common 1/2, 1/3, and 2 times large beat cycles can be effectively reduced, and the correct big beat information is obtained.
  • the generating a plurality of beat point sequences for each candidate beat cycle comprises:
  • a candidate tempo period is selected from all candidate tempo periods as the current tempo period, and a step of selecting one beat point from all of the input beat points as the starting beat point is returned until all candidate tempo periods are selected as the current tempo period.
  • the large beat information includes a large beat period and a large beat point
  • a candidate beat period having the largest weight is selected from all candidate beat periods, and the selected candidate beat period is taken as a large beat period, and each beat point in the maximum weight sequence of the selected candidate beat period is used as a large beat point.
  • the method further includes:
  • the interval between the beat point and any one of the large beat points is a positive integer multiple of the large beat period, and the interval is not more than 2 times.
  • the large beat cycle determines the beat point as a large beat point.
  • the missing large square beat points are supplemented by the determination condition, and the accuracy of the large beat point extraction is further improved.
  • the method further includes:
  • the interval between the two beat points and any one of the large beat points is a positive integer multiple of the large beat period, and the two beat points The interval between them is a large beat period, and both beat points are determined as large beat points.
  • the missing large square beat points are supplemented by the determination condition, and the accuracy of the large beat point extraction is further improved.
  • the present invention further provides a computer readable storage medium having stored thereon a computer program, the program being executed by a processor to implement extraction from a music beat point as described in any of the foregoing The method of making big beats.
  • the computer readable storage medium provided by the embodiment obtains a plurality of candidate beat periods according to the input beat points, and then obtains a maximum weight sequence of each candidate beat period, which can be automatically obtained according to the maximum weight sequence and the corresponding weight. To the big beat information, the extraction of large beat information is realized.
  • an embodiment of the present invention further provides a terminal, where the terminal includes:
  • One or more processors are One or more processors;
  • a storage device for storing one or more programs
  • the terminal provided by the embodiment obtains a plurality of candidate beat periods according to the input beat points, and then obtains a maximum weight sequence of each candidate beat period, and automatically obtains the big beat information according to the maximum weight sequence and the corresponding weight. , thus achieving the extraction of large beat information.
  • FIG. 1 is a flow chart showing a method of extracting large beat information from a music beat point according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of an application scenario of a large beat information according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • terminal and terminal device used herein include both a wireless signal receiver device, a device having only a wireless signal receiver without a transmitting capability, and a receiving and transmitting hardware.
  • Such devices may include cellular or other communication devices having a single line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (Personal Communications Service), which may combine voice, data Processing, fax, and/or data communication capabilities; PDA (Personal Digital Assistant), which can include radio frequency receivers, pagers, Internet/Intranet access, web browsers, notepads, calendars, and/or GPS (Global Positioning System (Global Positioning System) receiver; conventional laptop and/or palmtop computer or other device having a conventional laptop and/or palmtop computer or other device that includes and/or includes a radio frequency receiver.
  • PCS Personal Communications Service
  • PDA Personal Digital Assistant
  • terminal may be portable, transportable, installed in a vehicle (aviation, sea and/or land), or adapted and/or configured to operate locally, and/or Run in any other location on the Earth and/or space in a distributed form.
  • the "terminal” and “terminal device” used herein may also be a communication terminal, an internet terminal, a music/video playing terminal, and may be, for example, a PDA, a MID (Mobile Internet Device), and/or have a music/video playback.
  • Functional mobile phones can also be smart TVs, set-top boxes and other devices.
  • FIG. 1 is a schematic flowchart diagram of a method for extracting large beat information from a music beat point according to an embodiment, the method comprising the steps of:
  • Music can be music from a music library or music uploaded by users themselves. Since the present invention requires the extraction of large beat information, the input music requires performance information with a large beat. Take the snare drum as an example. The input music requires information about the performance of the snare drum.
  • the music beat point is a general term for the time points of the drums, the piano accent, the vocal climax, etc. with strong rhythm characteristics.
  • the beat is a unit for measuring the rhythm. In music, a series of beats with a certain strength and weakness are repeated at regular intervals. If a group of events or phenomena repeats in the same order, the time or space interval at which the set of events or phenomena is completed is called the period.
  • S120 Generate a sequence of beat points of each candidate beat cycle, and calculate a weight of each beat point sequence, wherein adjacent two beat points in the beat point sequence are separated by a corresponding candidate beat cycle.
  • Each beat point sequence includes individual beat points, and adjacent two beat points are spaced at corresponding candidate beat periods.
  • the beat points are arranged in order of time, and the adjacent two beat points refer to the two beat points that are next to each other.
  • the interval between adjacent two beat points with corresponding candidate beat periods means that the interval between adjacent two beat points is a positive integer multiple of the corresponding candidate beat period, and a certain error, for example, ⁇ 5% error is allowed.
  • one candidate beat period is T
  • the candidate beat period T corresponds to two beat point sequences.
  • One of the beat point sequences includes ⁇ beat point 1, beat point 2, beat point 3 ⁇ , and the beat point 1 and the beat point 2 are two adjacent beat points, and the interval between the two is 97%T, the beat point 2 and The beat point 3 is two adjacent beat points, and the interval between the two is 102%T.
  • Another beat point sequence includes ⁇ tape point 4, beat point 5, beat point 6 ⁇ , and beat point 4 and beat point 5 are adjacent two beat points, and the interval between them is 97% 2T, beat point 5 and The beat point 6 is two adjacent beat points, and the interval between the two is 102% 3T.
  • the weight of the beat point sequence refers to the relative importance of the beat point sequence in the overall evaluation.
  • the candidate beat period For each candidate beat period, the candidate beat period includes each beat point sequence, and each beat point sequence has a weight, then the beat point sequence with the largest weight is selected, and the beat point sequence is the maximum weight of the candidate beat period.
  • the sequence of values, and so on, can obtain the maximum weight sequence for each candidate beat cycle. It can be understood that when a candidate beat cycle has only one beat point sequence, the beat point sequence is the maximum weight sequence of the candidate beat cycle.
  • the large beat information includes a large beat period and a large beat point.
  • the large beat period is the total length of the notes for each measure in the music score.
  • time is divided into equal basic units, each unit is called a "tempo” or "one beat", and several beats form a measure, and the corresponding real time is usually fixed, called the big beat cycle.
  • the duration of the section reflects the design of the music rhythm of the music producer.
  • the big beat point is a set of periodic beat points added by the music producer to make the music have a better sense of auditory rhythm.
  • the drums in the drum kit are usually used to play this group.
  • the beat point is therefore also known as the "junior drum point.”
  • the big beat period corresponding to the music and the large beat information such as the big beat point can be calculated from the music beat points according to a certain calculation rule.
  • a plurality of candidate beat periods are obtained according to the input beat points, and then a maximum weight sequence of each candidate beat period is obtained, and the big beat information is automatically obtained according to the maximum weight sequence and the corresponding weight, thereby realizing Extraction of large beat information.
  • the obtaining, according to each beat point of the input music, obtaining a number of candidate beat periods including:
  • S1101 Record the time interval between each adjacent two beat points in all the beat points of the input.
  • this step records the time interval between beat point 1 and beat point 2, and beat point 2
  • the time interval is the time of the next beat point of the two adjacent beat points minus the time of the previous beat point.
  • S1102 Perform a histogram statistics of Gaussian distribution for each time interval to obtain a histogram, wherein the abscissa of the histogram is used to represent the time interval, and the ordinate is used to represent the number of occurrences of the time interval.
  • the histogram statistics of the Gaussian distribution are performed for each time interval calculated in step S1101.
  • the histogram statistics of Gaussian distribution for each time interval include:
  • S1102b Select a time interval from all time intervals as the current time interval.
  • a time interval may be selected as the current time interval in order from front to back.
  • S1102c increase a value at a position of the current time interval in the initial histogram by N, and increase a value at a position of all
  • T is the current time interval
  • t is a time interval other than the current time interval
  • is a preset threshold
  • e is a base of a natural logarithm function.
  • Histogram statistics of Gaussian distribution are used to eliminate the influence of errors while ensuring the accuracy of statistical results.
  • S1103 Perform peak detection on the histogram to obtain a plurality of peak points.
  • Peak detection is performed on the histogram according to the set peak condition, and each peak point is obtained.
  • the peak detection condition is that the minimum of data between any two consecutive peaks should be lower than half of the two peaks. It should be understood that the present invention is not limited to detecting peak points by the above-described peak detection conditions, and the user may also employ other peak detection conditions.
  • S1104 Select a preset number of peak points according to the order of the peak point corresponding times, and select an interval time corresponding to the preset number of peak points as the candidate beat period.
  • the interval time corresponding to the m peaks in which the histogram value is the largest is selected as the candidate beat period output.
  • a periodic sequence of maximum weights that is, the maximum weight sequence
  • the "equal period” is not strictly equal, but allows a certain error, such as ⁇ 5% error, and also allows a certain degree of leakage, that is, when two adjacent points in the sequence When the interval satisfies a positive integer multiple of the period, it is also considered to be equally spaced.
  • the generating a plurality of beat point sequences for each candidate beat cycle comprises:
  • S1201 Select one candidate beat period from all candidate beat periods as the current beat period.
  • one candidate cycle period is used as the current cycle period.
  • S1202 Select one beat point from all the beat points input as the starting beat point.
  • one beat point as a starting beat point for the current beat cycle.
  • the starting beat point is selected, in order to facilitate reading, it is optional to select each beat point as the starting beat point in order from front to back.
  • Each beat point entered is arranged in order of time. Starting from the starting beat point, start from the heading to find the beat point that satisfies the equal interval interval condition. If found, record the corresponding beat point.
  • the equal-period interval condition includes an error between the interval and a positive integer multiple of the current cycle period within a set range, that is, a certain error is allowed, and at the same time, a certain degree of leakage is allowed, that is, when two When the interval of points is satisfied as a positive integer multiple of the period, it is also considered to be equally spaced.
  • the starting beat point can be used as the starting point, and the first beat point that satisfies the equal interval interval condition is searched from the back to the beginning, and if found, the beat point is recorded.
  • the previous found beat point is set to a new starting point, and the above process is repeated until all the beat points starting from the starting beat point are obtained.
  • the starting beat point and all the beat points found constitute a sequence of beat points of the current beat period.
  • the starting beat point and all the beat points found constitute a sequence of beat points for the current beat cycle.
  • Selecting an unprocessed beat point as a new starting beat point is selected.
  • selecting the next beat point of the starting beat point as a new starting beat point and then repeating steps S1202 and S1203 to obtain Another beat point sequence for the current beat cycle.
  • the starting beat point is updated again, and the above steps are repeated until all beat point sequences of the current beat period are obtained.
  • S1206 Select another candidate beat period from all candidate beat periods as the current beat period, and return a step of selecting one beat point from all the beat points as the starting beat point until all candidate beat periods are selected as the current beat. cycle.
  • Another unprocessed candidate beat period is selected as the new current beat period, and all the beat point sequences of the new current beat period are obtained through the above steps.
  • the current tick cycle is updated and the above steps are repeated until all candidate tick cycles are selected. So far, all the beat point sequences corresponding to each of the candidate beat periods are obtained.
  • the beat point sequence needs to be weighted for comparing the weights of the beat point sequences obtained with each beat point as a starting point, and the largest weight among them is selected as the weight of the candidate beat period.
  • the corresponding beat point sequence is used as the maximum weight sequence of the candidate beat period.
  • the weight calculation design requires that the true large beat cycle be given a higher weight, while some cycle values that are prone to interference get a lower weight.
  • the conventional music beats are 2/4 beats, 3/4 beats, 4/4 beats, so the values defined by the solution of the present invention are easily generated: 1/2 large beat period, 1/3 large beat period, 2 times
  • the big beat cycle, the reason for its definition is based on the following points:
  • beat points such as 3/8 measure, 5/16 measure, etc., but in general, such beat point does not exist for a long time, so it is caused by The interference can be ignored.
  • the present invention requires a beat point detection algorithm to divide all beat points into intensity points, which are divided into strong beat points and weak beat points, that is, the beat points include strong beat points and Weak beat point.
  • the loop of the beat when the two units are taken, the loop is one strong and one weak, three times, one strong and two weak, and only one strong sound has a strong sound, and the unit is called strong shot, and the unit without strong sound Called a weak beat. It is based on the fact that when the music is played, the rhythm of the highlight is often played at a higher beat point with a higher intensity, so that a beat detected as stronger is more likely to be a beat point than a beat detected as weak.
  • the calculating the weight of each beat point sequence includes:
  • S1207 Select a beat point sequence from all the beat point sequences as the current beat point sequence.
  • S1208 Acquire two adjacent beat points in the current beat point sequence in sequence.
  • the weight of the beat point sequence is added to the first set value.
  • the first set value can be determined according to actual needs, for example, the first set value is set to 7.
  • the weight of the beat point sequence is added to the second set value.
  • the second set value can be determined according to actual needs, for example, the second set value is set to 3.
  • the weight of the beat point sequence is added to the third set value.
  • the third set value can be determined according to actual needs, for example, the third set value is set to 1.
  • the fourth set value is 2(t-1) 2 , where t is the number of periods of the interval. It should be understood that the fourth set value of the present invention is not limited to the above-described determination manner.
  • S1213 Multiply a weight obtained by every two adjacent beat points in the current beat point sequence by a square of a corresponding candidate beat period to obtain a final weight of the current beat point sequence.
  • the weight of the beat point sequence is calculated by the above steps and then multiplied by the square of the candidate beat period value to obtain the final weight of the beat point sequence.
  • the present invention is not limited to the above manner of calculating weights, and the user may also perform simple deformation and/or deletion or addition of steps as long as it does not deviate from detecting a strong beat point than detecting a weak beat point. It is possible that the technical idea of the big beat point is within the protection scope of the present invention.
  • beat point sequence is ⁇ beat point 1, beat point 2, beat point 3, beat point 4 ⁇ , where beat point 1 is a strong beat point, beat point 2 is a strong beat point, and beat point 3 is a weak beat point.
  • beat point 4 is a weak beat point
  • the interval between the beat point 1 and the beat point 2 is 3T
  • T is a candidate beat period corresponding to the beat point sequence.
  • the obtaining the large beat information according to the maximum weight sequence of each candidate beat period and the corresponding weight includes: S1401, selecting a candidate beat period with the largest weight from all candidate beat periods, and selecting the selected The candidate beat period is used as a large beat period, and each beat point in the maximum weight sequence of the selected candidate beat period is used as a large beat point.
  • the candidate beat cycle having the highest weight among all candidate beat cycles is output as a large beat cycle, and each beat point in the maximum weight sequence corresponding to the large beat cycle is a large beat point.
  • the present invention is not limited to the above manner of determining the large beat information.
  • the candidate beat period with the second largest weight may be selected from all candidate beat periods, and the selected candidate beat period is taken as the big beat. Cycle, each beat point in the maximum weight sequence of the selected candidate beat cycle is taken as a large beat point.
  • the method further includes: S1402, if all the beat points are input, except for being a large beat point Among other beat points, there is a large integer beat period in which the interval between the beat point and any one of the large beat points is a positive integer multiple of the large beat period, and the interval is not more than 2 times, and the beat point is determined as a large beat point.
  • the non-major beat point is determined as a large beat point.
  • Any one of the large beat points refers to a large beat point arbitrarily selected from the maximum weight sequence corresponding to the large beat period.
  • the interval is a positive integer multiple of the large beat period, and a certain error range is also allowed, that is, the interval is only in the vicinity of an integral multiple of the large beat period.
  • the method further includes:
  • the interval between the two beat points and any one of the big beat points is a positive integer multiple of the large beat period, and the two The interval between the beat points is a large beat period, and both beat points are determined as large beat points.
  • the obtained large beat information can be applied to various scenes.
  • the following two examples are introduced. It should be understood that the large beat information obtained by the present invention is not limited to be applied to the following two scenarios, and the user can also apply the large beat information to other scenes as needed.
  • a preset rhythm type effect is added to the large beat point indicated by the large beat information.
  • Rhythm-specific effects refer to special effects related to the rhythm, such as lighting effects, explosion effects, and so on.
  • the big beat information can be sent directly to the video special effects module.
  • the entire video effect can be matched with the music rhythm by adding a specific rhythm effect to these large beat points.
  • the beat point detection result of the music is corrected according to the large beat information, and the remaining beat points are classified and classified, and then a preset emotion type effect is added to the remaining beat points.
  • Emotional special effects refer to special effects related to emotions, such as special effects that express happiness, special effects that express peace of mind, and so on.
  • the calculated large beat information can be sent back to the beat detection program to assist it in correcting the beat point detection result to improve the accuracy, wherein the method of correcting the beat point detection result according to the large beat period in the large beat information can be It is implemented according to the manner existing in the prior art.
  • the remaining beat point information can also be sent directly to the video special effects module.
  • the specific emotional effects are added to the remaining beat points to improve the accuracy of the video special effects and the coordination with the music.
  • FIG. 2 a schematic diagram of a scenario for applying a large beat information to a specific embodiment.
  • the product application will calculate a set of pre-selected beat point information based on the music audio data, and then call the scheme of the present invention to calculate from the pre-selected beat points.
  • the big beat information corresponding to the music that is, the big beat period and the big beat point.
  • the calculated large beat information will be sent back to the beat detection program to assist it in correcting the beat detection result to improve the accuracy, and to classify the remaining beat points, and then send the remaining beat points directly to the video effect module.
  • the user performs video recording, by adding specific emotional effects to these remaining beat points, the accuracy of the added video effects and the coordination with the music are further improved.
  • the calculated large beat information will be sent directly to the video special effects module.
  • the final video output effect can be better fit. The rhythm to achieve a better viewing experience.
  • the embodiment of the present invention further provides a computer readable storage medium having stored thereon a computer program, the program being executed by the processor to implement the method for extracting large beat information from a music beat point according to any of the preceding items.
  • the storage medium includes, but is not limited to, any type of disk (including a floppy disk, a hard disk, an optical disk, a CD-ROM, and a magneto-optical disk), a ROM (Read-Only Memory), and a RAM (Random Access Memory). , EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or light card. That is, a storage medium includes any medium that is stored or transmitted by a device (eg, a computer) in a readable form. It can be a read only memory, a disk or a disc.
  • the embodiment of the invention further provides a terminal, where the terminal includes:
  • One or more processors are One or more processors;
  • a storage device for storing one or more programs
  • the terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), an in-vehicle computer, and the terminal is a mobile phone as an example:
  • FIG. 3 is a block diagram showing a partial structure of a mobile phone related to a terminal provided by an embodiment of the present invention.
  • the mobile phone includes: a radio frequency (RF) circuit 1510, a memory 1520, an input unit 1530, a display unit 1540, a sensor 1550, an audio circuit 1560, a wireless fidelity (Wi-Fi) module 1570, and processing.
  • RF radio frequency
  • Device 1580 and power supply 1590 and other components.
  • the structure of the handset shown in FIG. 3 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different component arrangements.
  • the RF circuit 1510 can be used for receiving and transmitting signals during and after the transmission or reception of information, in particular, after receiving the downlink information of the base station, and processing it to the processor 1580; in addition, transmitting the designed uplink data to the base station.
  • RF circuit 1510 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
  • LNA Low Noise Amplifier
  • RF circuitry 1510 can also communicate with the network and other devices via wireless communication.
  • the above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), and the like.
  • GSM Global System of Mobile communication
  • GPRS General Pack
  • the memory 1520 can be used to store software programs and modules, and the processor 1580 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 1520.
  • the memory 1520 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a large beat information extraction function, etc.), and the like; the storage data area may be stored according to the mobile phone. Use the created data (such as big beat information, etc.).
  • memory 1520 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 1530 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset.
  • the input unit 1530 may include a touch panel 1531 and other input devices 1532.
  • the touch panel 1531 also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 1531 or near the touch panel 1531. Operation), and drive the corresponding connecting device according to a preset program.
  • the touch panel 1531 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 1580 is provided and can receive commands from the processor 1580 and execute them.
  • the touch panel 1531 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 1530 may also include other input devices 1532.
  • other input devices 1532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 1540 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display unit 1540 can include a display panel 1541.
  • the display panel 1541 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch panel 1531 may cover the display panel 1541. After the touch panel 1531 detects a touch operation on or near the touch panel 1531, the touch panel 1531 transmits to the processor 1580 to determine the type of the touch event, and then the processor 1580 according to the touch event. The type provides a corresponding visual output on display panel 1541.
  • the touch panel 1531 and the display panel 1541 are used as two independent components to implement the input and input functions of the mobile phone, in some embodiments, the touch panel 1531 and the display panel 1541 may be integrated. Realize the input and output functions of the phone.
  • the handset may also include at least one type of sensor 1550, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1541 according to the brightness of the ambient light, and the proximity sensor may close the display panel 1541 and/or when the mobile phone moves to the ear. Or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the mobile phone can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • the gesture of the mobile phone such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration
  • vibration recognition related functions such as pedometer, tapping
  • the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • An audio circuit 1560, a speaker 1561, and a microphone 1562 can provide an audio interface between the user and the handset.
  • the audio circuit 1560 can transmit the converted electrical data of the received audio data to the speaker 1561, and convert it into a voiceprint signal output by the speaker 1561.
  • the microphone 1562 converts the collected voiceprint signal into an electrical signal by the audio.
  • the circuit 1560 receives the converted audio data, processes the audio data output processor 1580, transmits it to the other mobile device via the RF circuit 1510, or outputs the audio data to the memory 1520 for further processing.
  • Wi-Fi is a short-range wireless transmission technology.
  • the mobile phone can help users to send and receive e-mail, browse web pages and access streaming media through the Wi-Fi module 1570. It provides users with wireless broadband Internet access.
  • FIG. 3 shows the Wi-Fi module 1570, it can be understood that it does not belong to the essential configuration of the mobile phone, and can be omitted as needed within the scope of not changing the essence of the invention.
  • the processor 1580 is a control center for the handset that connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 1520, and invoking data stored in the memory 1520, The phone's various functions and processing data, so that the overall monitoring of the phone.
  • the processor 1580 may include one or more processing units; preferably, the processor 1580 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 1580.
  • the handset also includes a power source 1590 (such as a battery) that supplies power to the various components.
  • a power source 1590 such as a battery
  • the power source can be logically coupled to the processor 1580 via a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the mobile phone may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the music beat points are classified once, and the big beat points that best represent the music rhythm are separately extracted. By adding specific rhythm-type effects to these big beat points, the final result can be made.
  • the video output effect is better to match the rhythm of the music, so as to achieve a better viewing experience; on the other hand, combined with the big beat information, the remaining beat points can be better corrected and analyzed, and then at the remaining beat points. Add emotional effects to further enhance the accuracy of your added video effects and the coordination with your music.
  • the weight of each beat point sequence is calculated by the weight calculation method of the design, so that the interference of the common 1/2, 1/3, and 2 times large beat cycles can be effectively reduced, and the correct big beat information is obtained.

Landscapes

  • Engineering & Computer Science (AREA)
  • Library & Information Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Acoustics & Sound (AREA)
  • Electrophonic Musical Instruments (AREA)
  • Auxiliary Devices For Music (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明提供一种从音乐节拍点中提取大节拍信息的方法、存储介质和终端,应用于多媒体信息技术领域,其中方法包括步骤:根据输入的音乐的各个节拍点,获得若干个候选节拍周期;生成每个候选节拍周期的若干个节拍点序列,并计算每个节拍点序列的权重,其中,所述节拍点序列中相邻两个节拍点以对应的候选节拍周期为间隔;从每个候选节拍周期的若干个节拍点序列中选取权重最大的节拍点序列,作为每个候选节拍周期的最大权值序列;根据每个候选节拍周期的最大权值序列以及对应的权重,获得大节拍信息。本发明实施例实现了大节拍信息的提取。

Description

从音乐节拍点中提取大节拍信息的方法、存储介质和终端 技术领域
本发明涉及多媒体信息技术领域,具体而言,本发明涉及一种从音乐节拍点中提取大节拍信息的方法、存储介质和终端。
背景技术
音乐节拍点为音乐中的架子鼓敲击、钢琴重音、人声高潮等具备较强的节奏特性的时间点的统称。而大节拍(Big Beat)是1990年代中期在英国兴起的一种基于电子舞曲发展而来上的音乐形式。通常而言,为了让音乐具有更好的听觉节奏感,乐曲制作者会在音乐节拍点中添加一组周期(或准周期)的大节拍点。以有架子鼓参与演奏的音乐为例,通常使用架子鼓中的军鼓来演奏这一组节拍点,因此又被称为“军鼓点”。由于大节拍节奏感更好,因此从音乐节拍点中提取大节拍信息,以应用于用户所需要的各个场景中,具备重要的意义。而传统技术中还未出现相应提取大节拍信息的方案。
发明内容
本发明针对现有方式的缺点,提出一种从音乐节拍点中提取大节拍信息的方法、存储介质和终端,用以解决现有技术中存在的不能从音乐节拍点中提取大节拍信息的问题,以实现从音乐节拍点中提取大节拍信息。
本发明的实施例根据第一个方面,提供了一种从音乐节拍点中提取大节拍信息的方法,包括步骤:
根据输入的音乐的各个节拍点,获得若干个候选节拍周期;
生成每个候选节拍周期的若干个节拍点序列,并计算每个节拍点序列的权重,其中,所述节拍点序列中相邻两个节拍点以对应的候选节拍周期为间隔;
从每个候选节拍周期的若干个节拍点序列中选取权重最大的节拍点序列,作为每个候选节拍周期的最大权值序列;
根据每个候选节拍周期的最大权值序列以及对应的权重,获得大节拍信息。
本实施例提供的从音乐节拍点中提取大节拍信息的方法,根据输入的各个节拍点得到若干个候选节拍周期,然后获取每个候选节拍周期的最大权值序列,根据最大权值序列和对应的权重就可以自动获取到大节拍信息,从而实现了大节拍信息的提取。
在一个实施例中,所述根据输入的音乐的各个节拍点,获得若干个候选节拍周 期,包括:
记录输入的所有节拍点中每相邻两个节拍点之间的时间间隔;
对每个时间间隔进行高斯分布的直方图统计,获得直方图,其中,所述直方图的横坐标用于表征时间间隔,纵坐标用于表征时间间隔出现的次数;
对所述直方图进行峰值检测,获得若干个峰值点;
按照峰值点对应次数从大到小的顺序选取预设数目的峰值点,将预设数目的峰值点所对应的间隔时间作为候选节拍周期。
本实施例使用高斯分布的方式进行直方图统计,在消除误差影响的同时保证了统计结果的精度,从而得到更加准确的大节拍信息。
在一个实施例中,所述对每个时间间隔进行高斯分布的直方图统计,包括:
构建初始直方图;
从所有时间间隔中选取一个时间间隔作为当前时间间隔;
将所述初始直方图中所述当前时间间隔所在位置处的数值增加N,并将所述初始直方图中所有|t-T|<δ的位置处的数值增加
Figure PCTCN2018119108-appb-000001
其中,T为所述当前时间间隔,t为除所述当前时间间隔之外的时间间隔,δ为预设阈值;
从所有时间间隔中选取另一个时间间隔作为当前时间间隔,返回将所述初始直方图中所述当前时间间隔所在位置处的数值增加N,并将所述初始直方图中所有|t-T|<δ的位置处的数值增加
Figure PCTCN2018119108-appb-000002
的步骤,直至所有的时间间隔均被选取作为当前时间间隔。
在一个实施例中,所述节拍点包括强节拍点和弱节拍点;
所述计算每个节拍点序列的权重,包括:
从所有节拍点序列中选取一个节拍点序列作为当前节拍点序列;
依序获取所述当前节拍点序列中两个相邻的节拍点;
若所述当前节拍点序列中两个相邻的节拍点均为强节拍点,将所述当前节拍点序列的权重加上第一设定值;
若所述当前节拍点序列中两个相邻的节拍点中一个为强节拍点另一个为弱节拍点,将所述当前节拍点序列的权重加上第二设定值,其中,所述第二设定值小于所述第一设定值;
若所述当前节拍点序列中两个相邻的节拍点均为弱节拍点,将所述当前节拍点序列的权重加上第三设定值,其中,所述第三设定值小于所述第二设定值;
若所述当前节拍点序列中两个相邻的节拍点的间隔超过对应的候选节拍周期, 将所述当前节拍点序列的权重降低第四设定值;
将历遍所述当前节拍点序列中每两个相邻节拍点得到的权重,与对应的候选节拍周期的开方相乘,获得所述当前节拍点序列的最终权重;
从所有节拍点序列中选取另一个节拍点序列作为当前节拍点序列,返回依序获取所述当前节拍点序列中两个相邻的节拍点的步骤,直至所有的节拍点序列均被选取作为当前节拍点序列。
本实施例通过设计的权重计算方式计算每一个节拍点序列的权重,从而能够有效的降低常见的1/2、1/3、2倍大节拍周期的干扰,得到正确的大节拍信息。
在一个实施例中,所述生成每个候选节拍周期的若干个节拍点序列,包括:
从所有候选节拍周期中选取一个候选节拍周期作为当前节拍周期;
从输入的所有节拍点中选取一个节拍点作为起始节拍点;
从所述起始节拍点后面的节拍点中寻找与所述起始节拍点之间的间隔满足等周期间隔条件的节拍点,其中,所述等周期间隔条件包括所述间隔与当前节拍周期的正整数倍之间的误差在设定范围内;
由所述起始节拍点和寻找到的所有节拍点构成所述当前节拍周期的一个节拍点序列;
从输入的所有节拍点中选取另一个节拍点作为起始节拍点,返回从所述起始节拍点后面的节拍点中寻找与所述起始节拍点之间的间隔满足等周期间隔条件的节拍点的步骤,直至所有节拍点均被选取作为起始节拍点;
从所有候选节拍周期中选取另一个候选节拍周期作为当前节拍周期,返回从输入的所有节拍点中选取一个节拍点作为起始节拍点的步骤,直至所有候选节拍周期均被选取作为当前节拍周期。
在一个实施例中,所述大节拍信息包括大节拍周期和大节拍点;
所述根据每个候选节拍周期的最大权值序列以及对应的权重,获得大节拍信息,包括:
从所有候选节拍周期中选择权重最大的候选节拍周期,将选择的候选节拍周期作为大节拍周期,将选择的候选节拍周期的最大权值序列中的每一个节拍点作为大节拍点。
在一个实施例中,所述将选择的候选节拍周期的最大权值序列中的每一个节拍点作为大节拍点之后,还包括:
若输入的所有节拍点中除作为大节拍点外的其他节拍点中,存在节拍点与任何 一个大节拍点之间的间隔为大节拍周期的正整数倍,且所述间隔不超过2倍的大节拍周期,将该节拍点判定为大节拍点。
本实施例通过判定条件补充遗漏的大节拍点,进一步提高了大节拍点提取的准确性。
在一个实施例中,所述将选择的候选节拍周期的最大权值序列中的每一个节拍点作为大节拍点之后,还包括:
若输入的所有节拍点中除作为大节拍点外的其他节拍点中,存在两个节拍点与任何一个大节拍点之间的间隔均为大节拍周期的正整数倍,且该两个节拍点之间的间隔为大节拍周期,将该两个节拍点均判定为大节拍点。
本实施例通过判定条件补充遗漏的大节拍点,进一步提高了大节拍点提取的准确性。
本发明的实施例根据第二个方面,还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现前述任意一项所述的从音乐节拍点中提取大节拍信息的方法。
本实施例提供的计算机可读存储介质,根据输入的各个节拍点得到若干个候选节拍周期,然后获取每个候选节拍周期的最大权值序列,根据最大权值序列和对应的权重就可以自动获取到大节拍信息,从而实现了大节拍信息的提取。
本发明的实施例根据第三个方面,还提供了一种终端,所述终端包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现前述任意一项所述的从音乐节拍点中提取大节拍信息的方法。
本实施例提供的终端,根据输入的各个节拍点得到若干个候选节拍周期,然后获取每个候选节拍周期的最大权值序列,根据最大权值序列和对应的权重就可以自动获取到大节拍信息,从而实现了大节拍信息的提取。
本发明附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本发明的实践了解到。
附图说明
本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:
图1为本发明一个实施例的从音乐节拍点中提取大节拍信息的方法的流程示意 图;
图2为本发明一个具体实施例的大节拍信息应用场景的示意图;
图3为本发明一个具体实施例的终端的结构示意图。
具体实施方式
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。
本技术领域技术人员可以理解,这里所使用的“终端”、“终端设备”既包括无线信号接收器的设备,其仅具备无发射能力的无线信号接收器的设备,又包括接收和发射硬件的设备,其具有能够在双向通信链路上,执行双向通信的接收和发射硬件的设备。这种设备可以包括:蜂窝或其他通信设备,其具有单线路显示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备;PCS(Personal Communications Service,个人通信系统),其可以组合语音、数据处理、传真和/或数据通信能力;PDA(Personal Digital Assistant,个人数字助理),其可以包括射频接收器、寻呼机、互联网/内联网访问、网络浏览器、记事本、日历和/或GPS(Global Positioning System,全球定位系统)接收器;常规膝上型和/或掌上型计算机或其他设备,其具有和/或包括射频接收器的常规膝上型和/或掌上型计算机或其他设备。这里所使用的“终端”、“终端设备”可以是便携式、可运输、安装在交通工具(航空、海运和/或陆地)中的,或者适合于和/或配置为在本地运行,和/或 以分布形式,运行在地球和/或空间的任何其他位置运行。这里所使用的“终端”、“终端设备”还可以是通信终端、上网终端、音乐/视频播放终端,例如可以是PDA、MID(Mobile Internet Device,移动互联网设备)和/或具有音乐/视频播放功能的移动电话,也可以是智能电视、机顶盒等设备。
如图1所示,为一实施例的从音乐节拍点中提取大节拍信息的方法的流程示意图,该方法包括步骤:
S110、根据输入的音乐的各个节拍点,获得若干个候选节拍周期。
音乐可以是音乐库中的音乐,也可以是用户自己上传的音乐。由于本发明需要提取出大节拍信息,所以输入的音乐需要带有大节拍的演奏信息。以军鼓为例,输入的音乐中需要带有军鼓演奏的信息。音乐节拍点为音乐中的架子鼓敲击、钢琴重音、人声高潮等具备较强的节奏特性的时间点的统称。节拍是衡量节奏的单位,在音乐中,有一定强弱分别的一系列拍子在每隔一定时间重复出现。若一组事件或现象按同样的顺序重复出现,则把完成这一组事件或现象的时间或空间间隔,称为周期。
首先需要从所有的节拍点中计算出若干个候选节拍周期以供后续分析,其中,从音乐数据中获取各个节拍点(此时无分类)可以根据现有技术中已有的方式实现。
S120、生成每个候选节拍周期的若干个节拍点序列,并计算每个节拍点序列的权重,其中,所述节拍点序列中相邻两个节拍点以对应的候选节拍周期为间隔。
对于每一个候选节拍周期,均生成若干个节拍点序列。每一个节拍点序列包括各个节拍点,相邻两个节拍点以对应的候选节拍周期为间隔。节拍点按照时间的先后顺序依次排列,相邻两个节拍点指的是前后挨着的两个节拍点。相邻两个节拍点以对应的候选节拍周期为间隔指的是相邻两个节拍点的间隔为对应的候选节拍周期的正整数倍,且允许有一定的误差,例如±5%的误差。
例如,一个候选节拍周期为T,该候选节拍周期T对应2个节拍点序列。其中一个节拍点序列包括{节拍点1、节拍点2、节拍点3},节拍点1和节拍点2为相邻两个节拍点,两者之间的间隔为97%T,节拍点2和节拍点3为相邻两个节拍点,两者之间的间隔为102%T。另一个节拍点序列包括{节拍点4、节拍点5、节拍点6},节拍点4和节拍点5为相邻两个节拍点,两者之间的间隔为97%2T,节拍点5和节拍点6为相邻两个节拍点,两者之间的间隔为102%3T。
对于每一个候选节拍周期,得到该候选节拍周期对应的若干个节拍点序列,并计算每一个节拍点序列的权重。节拍点序列的权重是指该节拍点序列在整体评价中 的相对重要程度。
S130、从每个候选节拍周期的若干个节拍点序列中选取权重最大的节拍点序列,作为每个候选节拍周期的最大权值序列。
对于每一个候选节拍周期来说,该候选节拍周期包括各个节拍点序列,每一个节拍点序列有一个权重,那么选取权重最大的节拍点序列,该节拍点序列即为该候选节拍周期的最大权值序列,依次类推,即可以得到每个候选节拍周期的最大权值序列。可以理解,当一个候选节拍周期仅有一个节拍点序列时,该节拍点序列即为该候选节拍周期的最大权值序列。
S140、根据每个候选节拍周期的最大权值序列以及对应的权重,获得大节拍信息。
可选的,所述大节拍信息包括大节拍周期和大节拍点。大节拍周期为音乐乐谱中每一小节的音符总长度。在音乐中,时间被分成均等的基本单位,每个单位叫做一个“拍子”或称“一拍”,而若干个拍子构成小节,其对应的现实时间通常是固定的,称之为大节拍周期。其中,小节其持续时间的长短反应了乐谱制作者对音乐节奏快慢的设计。大节拍点为乐曲制作者为了让音乐具有更好的听觉节奏感而添加的一组周期性的节拍点,对于有架子鼓参与演奏的音乐,通常使用架子鼓中的军鼓来演奏这一组节拍点,因此又被称为“军鼓点”。
根据上述步骤得到每一个候选节拍周期的最大权值序列以及对应的权重之后,就可以按照一定计算规则从音乐节拍点中计算出音乐对应的大节拍周期以及大节拍点等大节拍信息。
本实施例根据输入的各个节拍点得到若干个候选节拍周期,然后获取每个候选节拍周期的最大权值序列,根据最大权值序列和对应的权重就可以自动获取到大节拍信息,从而实现了大节拍信息的提取。
在一个实施例中,所述根据输入的音乐的各个节拍点,获得若干个候选节拍周期,包括:
S1101、记录输入的所有节拍点中每相邻两个节拍点之间的时间间隔。
将输入的所有节拍点两两之间的时间间隔记录下来。以输入的节拍点包括节拍点1、节拍点2、节拍点3、节拍点4、节拍点5……为例,本步骤即记录节拍点1和节拍点2之间的时间间隔,节拍点2和节拍点3之间的时间间隔,节拍点3和节拍点4之间的时间间隔,节拍点4和节拍点5之间的时间间隔,依次类推。可选的,时间间隔即相邻两个节拍点中后一个节拍点的时间减去前一个节拍点的时间。
S1102、对每个时间间隔进行高斯分布的直方图统计,获得直方图,其中,所述直方图的横坐标用于表征时间间隔,纵坐标用于表征时间间隔出现的次数。
对步骤S1101中计算出来的每一个时间间隔进行高斯分布的直方图统计。在一个实施例中,所述对每个时间间隔进行高斯分布的直方图统计,包括:
S1102a、构建初始直方图。
建立一个二维直方图表,其横坐标表示所有可能的时间间隔,纵坐标表示该时间间隔出现的次数,初始时表中所有数值均为0。
S1102b、从所有时间间隔中选取一个时间间隔作为当前时间间隔。
可选的,可以按照从前到后的顺序依次选取一个时间间隔作为当前时间间隔。
S1102c、将所述初始直方图中所述当前时间间隔所在位置处的数值增加N,并将所述初始直方图中所有|t-T|<δ的位置处的数值增加
Figure PCTCN2018119108-appb-000003
其中,T为所述当前时间间隔,t为除所述当前时间间隔之外的时间间隔,δ为预设阈值,e是自然对数函数的底数。
S1102d、从所有时间间隔中选取另一个时间间隔作为当前时间间隔,返回将所述初始直方图中所述当前时间间隔所在位置处的数值增加N,并将所述初始直方图中所有|t-T|<δ的位置处的数值增加
Figure PCTCN2018119108-appb-000004
的步骤,直至所有的时间间隔均被选取作为当前时间间隔。
使用高斯分布的直方图统计方式消除误差影响的同时保证统计结果的精度。
S1103、对所述直方图进行峰值检测,获得若干个峰值点。
按照设定检峰条件对直方图进行峰值检测,获得各个峰值点。在一个实施例中,检峰条件为任意两个连续峰之间的数据的最小值应当比这两个峰的一半要低。应当理解,本发明并不限制于通过上述检峰条件检测峰值点,用户还可以采用其它检峰条件。
S1104、按照峰值点对应次数从大到小的顺序选取预设数目的峰值点,将预设数目的峰值点所对应的间隔时间作为候选节拍周期。
对步骤S1103中计算出来的所有峰值点,选取其中直方图数值最大(即次数最大)的m个峰所对应的间隔时间作为候选节拍周期输出。
对于每一个候选节拍周期,从所有节拍点中提取出一条以该周期为间隔的最大权值等周期序列,也即是最大权值序列。这里的“等周期”并非是严格意义上的相等,而是允许有一定的误差,例如±5%的误差,同时,也允许存在一定程度的漏点,即当序列中相邻两个点的间隔满足为周期的正整数倍时,也将其视为等间隔的。
提取最大权值序列需要先得到每个候选节拍周期的若干个节拍点序列,然后才能从中选择出最大权值序列。在一个实施例中,所述生成每个候选节拍周期的若干个节拍点序列,包括:
S1201、从所有候选节拍周期中选取一个候选节拍周期作为当前节拍周期。
任选一个候选节拍周期作为当前节拍周期。
S1202、从输入的所有节拍点中选取一个节拍点作为起始节拍点。
任选一个节拍点作为当前节拍周期的一个起始节拍点。在选择起始节拍点时,为了方便读取,可选的,可以按照从前到后的顺序依次选择每一个节拍点作为起始节拍点。
S1203、从所述起始节拍点后面的节拍点中寻找与所述起始节拍点之间的间隔满足等周期间隔条件的节拍点,其中,所述等周期间隔条件包括所述间隔与当前节拍周期的正整数倍之间的误差在设定范围内。
输入的每个节拍点按照时间的先后顺序依次排列。以起始节拍点为起点,从前往后开始寻找满足等周期间隔条件的节拍点,如果找到,将对应的节拍点记录下来。等周期间隔条件包括所述间隔与当前节拍周期的正整数倍之间的误差在设定范围内,也即是允许有一定的误差,同时,也允许存在一定程度的漏点,即当两个点的间隔满足为周期的正整数倍时,也将其视为等间隔的。
在具体实施时,可以以起始节拍点为起点,从前往后开始寻找第一个满足等周期间隔条件的节拍点,如果找到,将该节拍点记录下来。将上一个找到的节拍点设为新的起点,重复上述过程,直至得到以该起始节拍点作为起点的所有节拍点。
S1204、由所述起始节拍点和寻找到的所有节拍点构成所述当前节拍周期的一个节拍点序列。
起始节拍点以及找到的所有节拍点即构成当前节拍周期的一个节拍点序列。
S1205、从输入的所有节拍点中选取另一个节拍点作为起始节拍点,返回从所述起始节拍点后面的节拍点中寻找与所述起始节拍点之间的间隔满足等周期间隔条件的节拍点的步骤,直至所有节拍点均被选取作为起始节拍点,得到所述当前节拍周期的所有节拍点序列。
选取一个未被处理过的节拍点作为新的起始节拍点,可选的,选取所述起始节拍点的下一个节拍点作为新的起始节拍点,然后重复步骤S1202和步骤S1203,得到当前节拍周期的另一个节拍点序列。再对起始节拍点进行更新,并重复上述的步骤,直至得到当前节拍周期的所有节拍点序列。
S1206、从所有候选节拍周期中选取另一个候选节拍周期作为当前节拍周期,返回从输入的所有节拍点中选取一个节拍点作为起始节拍点的步骤,直至所有候选节拍周期均被选取作为当前节拍周期。
得到一个当前节拍周期的所有节拍点序列后,选取另外一个未被处理的候选节拍周期作为新的当前节拍周期,通过上述步骤得到新的当前节拍周期的所有节拍点序列。再对当前节拍周期进行更新,并重复上述的步骤,直至所有候选节拍周期均被选取处理。至此,就获得了所有候选节拍周期各自所对应的所有节拍点序列。
获得所有节拍点序列后,需要对节拍点序列求取权重,以用于比较以每一个节拍点作为起点得到的节拍点序列的权重,选择其中最大的权重作为该候选节拍周期的权重,其所对应的节拍点序列作为该候选节拍周期的最大权值序列。
权重计算设计的要求是要让真正的大节拍周期获得更高的权重,同时一些容易产生干扰的周期数值得到更低的权重。常规的音乐节拍为2/4拍、3/4拍、4/4拍,因此本发明所述方案定义容易产生干扰的数值为:1/2大节拍周期、1/3大节拍周期、2倍大节拍周期,其定义的原因基于如下的几点:
1.对2/4拍和4/4拍的音乐而言,在每个小节的1/2处可能存在一个节拍点,从而导致1/2大节拍周期的干扰。
2.对3/4拍的音乐而言,在每个小节的1/3和2/3处均可能存在节拍点,从而导致1/3大节拍周期的干扰。
3.对任何节拍的音乐而言,均有可能在诸如3/8小节、5/16小节等处存在节拍点,但通常而言,这样的节拍点不会长期稳定的存在,因而其所造成的干扰可以忽略。
4.当音乐在强节奏与弱节奏之间切换时,有可能会故意省略掉一些大节拍点,同时预选节拍检测的准确度并非100%,有可能会漏检一些大节拍点,从而导致2倍大节拍周期干扰。
为更好的区分真实的大节拍与干扰,本发明要求节拍点检测算法对所有的节拍点进行强度划分,将其划分为强节拍点与弱节拍点,即所述节拍点包括强节拍点和弱节拍点。在节拍的循环中,按两个单位拍循环时为一强一弱,三个时一强两弱,只有一个强音时带有强音的单位拍叫强拍,不带有强音的单位拍叫弱拍。基于如下事实:乐曲演奏时为凸显乐曲节奏在大节拍点处往往使用更高的强度进行演奏,因此检测为强的节拍点比检测为弱的节拍点更有可能是大节拍点。
基于以上几点,在一个实施例中,所述计算每个节拍点序列的权重,包括:
S1207、从所有节拍点序列中选取一个节拍点序列作为当前节拍点序列。
S1208、依序获取所述当前节拍点序列中两个相邻的节拍点。
S1209、若所述当前节拍点序列中两个相邻的节拍点均为强节拍点,将所述当前节拍点序列的权重加上第一设定值。
在一个节拍点序列中,如果连续两个等间隔节拍点均为强时,将该节拍点序列的权重加上第一设定值。第一设定值可以根据实际需要进行确定,例如第一设定值设置为7。
S1210、若所述当前节拍点序列中两个相邻的节拍点中一个为强节拍点另一个为弱节拍点,将所述当前节拍点序列的权重加上第二设定值,其中,所述第二设定值小于所述第一设定值。
在一个节拍点序列中,如果连续两个等间隔节拍点为一强一弱时,将该节拍点序列的权重加上第二设定值。第二设定值可以根据实际需要进行确定,例如第二设定值设置为3。
S1211、若所述当前节拍点序列中两个相邻的节拍点均为弱节拍点,将所述当前节拍点序列的权重加上第三设定值,其中,所述第三设定值小于所述第二设定值。
在一个节拍点序列中,如果连续两个等间隔节拍点均为弱时,将该节拍点序列的权重加上第三设定值。第三设定值可以根据实际需要进行确定,例如第三设定值设置为1。
S1212、若所述当前节拍点序列中两个相邻的节拍点的间隔超过对应的候选节拍周期,将所述当前节拍点序列的权重降低第四设定值。
在一个节拍点序列中,如果连续两个节拍点的间隔超过一个候选节拍周期时,权重降低。可选的,第四设定值为2(t-1) 2,其中t为间隔的周期数。应当理解,本发明的第四设定值并不限制于上述确定方式。
S1213、将历遍所述当前节拍点序列中每两个相邻节拍点得到的权重,与对应的候选节拍周期的开方相乘,获得所述当前节拍点序列的最终权重。
通过上述步骤计算得到节拍点序列的权重还要再乘以候选节拍周期数值的开方,才获得节拍点序列的最终权重。
S1214、从所有节拍点序列中选取另一个节拍点序列作为当前节拍点序列,返回依序获取所述当前节拍点序列中两个相邻的节拍点的步骤,直至所有的节拍点序列均被选取作为当前节拍点序列。
应当理解,本发明并不限制于上述计算权重的方式,用户还可以对上述步骤进 行简单变形和/或步骤的删除或者添加,只要不脱离检测为强的节拍点比检测为弱的节拍点更有可能是大节拍点的技术构思,均在本发明的保护范围之内。
为了更好的理解上述权重的计算方式,下面结合一个例子进行说明。
假设一个节拍点序列为{节拍点1、节拍点2、节拍点3、节拍点4},其中,节拍点1为强节拍点,节拍点2为强节拍点,节拍点3为弱节拍点,节拍点4为弱节拍点,且,节拍点1和节拍点2之间的间隔为3T,T为节拍点序列对应的候选节拍周期。那么该节拍点序列的权重为:(7+3+1-8)*T 1/2=3T 1/2
在一个实施例中,所述根据每个候选节拍周期的最大权值序列以及对应的权重,获得大节拍信息,包括:S1401、从所有候选节拍周期中选择权重最大的候选节拍周期,将选择的候选节拍周期作为大节拍周期,将选择的候选节拍周期的最大权值序列中的每一个节拍点作为大节拍点。将所有候选节拍周期中权重最大的那个候选节拍周期输出为大节拍周期,该大节拍周期对应的最大权值序列中的每一个节拍点即为大节拍点。
应当理解,本发明并不限制于上述确定大节拍信息的方式,在误差允许的范围内,也可以从所有候选节拍周期中选择权重次大的候选节拍周期,将选择的候选节拍周期作为大节拍周期,将选择的候选节拍周期的最大权值序列中的每一个节拍点作为大节拍点。
由于权重的引入,当连续两个节拍点之间的间隔超过1个周期时,权重会降低,因此可能出现某些节拍点与选定的大节拍点之间满足等节拍间隔,但不属于大节拍周期对应的最大权值序列。而在满足一定条件的情况下,这些节拍点也应当被判定为大节拍点,因此需要对大节拍周期对应的最大权值序列进行补遗操作,即补充遗漏的大节拍点。
在一个实施例中,所述将选择的候选节拍周期的最大权值序列中的每一个节拍点作为大节拍点之后,还包括:S1402、若输入的所有节拍点中除作为大节拍点外的其他节拍点中,存在节拍点与任何一个大节拍点之间的间隔为大节拍周期的正整数倍,且所述间隔不超过2倍的大节拍周期,将该节拍点判定为大节拍点。
本实施例中,若某个非大节拍点与任何一个大节拍点之间的间隔为大节拍周期的正整数倍,且该非大节拍点与任一大节拍点之间的间隔不超过2倍大节拍周期,则将该非大节拍点判定为大节拍点。任何一个大节拍点指的是大节拍周期对应的最大权值序列中任意选取的一个大节拍点。间隔为大节拍周期的正整数倍,同样允许一定的误差范围,即间隔只要在大节拍周期的整数倍的附近即可。
在另一个实施例中,所述将选择的候选节拍周期的最大权值序列中的每一个节拍点作为大节拍点之后,还包括:
S1403、若输入的所有节拍点中除作为大节拍点外的其他节拍点中,存在两个节拍点与任何一个大节拍点之间的间隔均为大节拍周期的正整数倍,且该两个节拍点之间的间隔为大节拍周期,将该两个节拍点均判定为大节拍点。
当存在两个非大节拍点均满足与任何一个大节拍点之间的间隔均为大节拍周期的正整数倍,且这两个非大节拍点之间的间隔为1个大节拍周期时将这两个非大节拍点均判定为大节拍点。
获得的大节拍信息可以应用于各种场景。下面结合两个实例进行介绍。应当理解,本发明得到的大节拍信息并不限制于应用于下述两种场景,用户还可以根据需要将大节拍信息应用到其它场景中。
例如,在所述大节拍信息指示的大节拍点上添加预设的节奏型特效。节奏型特效指的是与节奏有关的特效,例如光效特效,爆点特效等等。可以将大节拍信息直接送至视频特效模块,当用户进行视频录制的时候,通过在这些大节拍点上附加特定的节奏特效,使得整个视频效果能够与音乐节奏相匹配。
又例如,根据所述大节拍信息对所述音乐的节拍点检测结果进行修正以及对剩余节拍点进行分类分级,然后在剩余节拍点上添加预设的情感型特效。情感型特效指的是与情感有关的特效,例如:表示幸福的特效,表示省心的特效等等。计算出的大节拍信息可以送回给节拍检测程序辅助其对节拍点检测结果进行修正,以提高准确度,其中,根据大节拍信息中的大节拍周期等对节拍点检测结果进行修正的方式可以根据现有技术中已有的方式实现。还可以根据大节拍信息对其余节拍点进行分类分级,例如将除大节拍点之外的节拍点归为一类,该类的强度的等级低于大节拍点的强度的等级,从而将不同类别不同强度的节拍点应用于不同的场景。另外,同样可以将剩余节拍点信息直接送至视频特效模块,当用户进行视频录制的时候,通过剩余节拍点上附加特定的情感特效,提升视频特效的准确度及与音乐的协调度。
如图2所示,为一具体实施例的大节拍信息应用场景的示意图。当用户选择了音乐库中的音乐或自己上传了一首音乐时,产品应用程序将根据音乐音频数据计算出一组预选的节拍点信息,而后将调用本发明所述方案从预选节拍点中计算出音乐对应的大节拍信息,即大节拍周期以及大节拍点。
计算出的大节拍信息一方面将送回给节拍检测程序辅助其对节拍检测结果进行修正以提高准确度,以及对剩余节拍点进行分类分级,然后将剩余节拍点直接送 至视频特效模块,当用户进行视频录制的时候,通过在这些剩余节拍点附加特定的情感型特效,从而进一步提升添加的视频特效的准确度及与音乐的协调度。
计算出的大节拍信息另一方面将直接送至视频特效模块,当用户进行视频录制的时候,通过在这些大节拍点附加特定的节奏型特效,能够使得最终视频输出效果更好的贴合音乐的节奏,从而达到更好的观看体验。
本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现前述任意一项所述的从音乐节拍点中提取大节拍信息的方法。所述存储介质包括但不限于任何类型的盘(包括软盘、硬盘、光盘、CD-ROM、和磁光盘)、ROM(Read-Only Memory,只读存储器)、RAM(Random Access Memory,随即存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦可编程只读存储器)、闪存、磁性卡片或光线卡片。也就是,存储介质包括由设备(例如,计算机)以能够读的形式存储或传输信息的任何介质。可以是只读存储器,磁盘或光盘等。
本发明实施例还提供了一种终端,所述终端包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现前述任意一项所述的从音乐节拍点中提取大节拍信息的方法。
如图3所示,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该终端可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑等任意终端设备,以终端为手机为例:
图3示出的是与本发明实施例提供的终端相关的手机的部分结构的框图。参考图3,手机包括:射频(Radio Frequency,RF)电路1510、存储器1520、输入单元1530、显示单元1540、传感器1550、音频电路1560、无线保真(wireless fidelity,Wi-Fi)模块1570、处理器1580、以及电源1590等部件。本领域技术人员可以理解,图3中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
下面结合图3对手机的各个构成部件进行具体的介绍:
RF电路1510可用于收发信息或通话过程中,信号的接收和发送,特别地,将 基站的下行信息接收后,给处理器1580处理;另外,将设计上行的数据发送给基站。通常,RF电路1510包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路1510还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。
存储器1520可用于存储软件程序以及模块,处理器1580通过运行存储在存储器1520的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器1520可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如大节拍信息提取功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如大节拍信息等)等。此外,存储器1520可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
输入单元1530可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元1530可包括触控面板1531以及其他输入设备1532。触控面板1531,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1531上或在触控面板1531附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板1531可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1580,并能接收处理器1580发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1531。除了触控面板1531,输入单元1530还可以包括其他输入设备1532。具体地,其他输入设备1532可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元1540可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1540可包括显示面板1541,可选的,可以采用液晶显示器 (Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1541。进一步的,触控面板1531可覆盖显示面板1541,当触控面板1531检测到在其上或附近的触摸操作后,传送给处理器1580以确定触摸事件的类型,随后处理器1580根据触摸事件的类型在显示面板1541上提供相应的视觉输出。虽然在图3中,触控面板1531与显示面板1541是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板1531与显示面板1541集成而实现手机的输入和输出功能。
手机还可包括至少一种传感器1550,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1541的亮度,接近传感器可在手机移动到耳边时,关闭显示面板1541和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
音频电路1560、扬声器1561,传声器1562可提供用户与手机之间的音频接口。音频电路1560可将接收到的音频数据转换后的电信号,传输到扬声器1561,由扬声器1561转换为声纹信号输出;另一方面,传声器1562将收集的声纹信号转换为电信号,由音频电路1560接收后转换为音频数据,再将音频数据输出处理器1580处理后,经RF电路1510以发送给比如另一手机,或者将音频数据输出至存储器1520以便进一步处理。
Wi-Fi属于短距离无线传输技术,手机通过Wi-Fi模块1570可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图3示出了Wi-Fi模块1570,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。
处理器1580是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1520内的软件程序和/或模块,以及调用存储在存储器1520内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器1580可包括一个或多个处理单元;优选的,处理器1580可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调 处理器也可以不集成到处理器1580中。
手机还包括给各个部件供电的电源1590(比如电池),优选的,电源可以通过电源管理系统与处理器1580逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。
上述的从音乐节拍点中提取大节拍信息的方法、存储介质和终端,与现有技术相互比较时,具备以下优点:
1、根据输入的各个节拍点得到若干个候选节拍周期,然后获取每个候选节拍周期的最大权值序列,根据最大权值序列和对应的权重就可以自动获取到大节拍信息,从而实现了大节拍信息的提取。
2、进一步的,一方面,对音乐节拍点进行了一次分类,将其中最能代表音乐节奏的大节拍点单独提取了出来,通过在这些大节拍点上添加特定的节奏型特效,能够使得最终视频输出效果更好的贴合音乐的节奏,从而达到更好的观看体验;另一方面,结合大节拍信息能够更好的对剩余的节拍点进行修正与分析分类,然后在剩余的节拍点上添加情感型特效,从而进一步提升添加的视频特效的准确度及与音乐的协调度。
3、进一步的,使用高斯分布的方式进行直方图统计,在消除误差影响的同时保证了统计结果的精度,从而得到更加准确的大节拍信息。
4、进一步的,通过设计的权重计算方式计算每一个节拍点序列的权重,从而能够有效的降低常见的1/2、1/3、2倍大节拍周期的干扰,得到正确的大节拍信息。
5、进一步的,通过判定条件补充遗漏的大节拍点,进一步提高了大节拍点提取的准确性。
应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。以上所述仅是本发明的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。

Claims (10)

  1. 一种从音乐节拍点中提取大节拍信息的方法,其特征在于,包括步骤:
    根据输入的音乐的各个节拍点,获得若干个候选节拍周期;
    生成每个候选节拍周期的若干个节拍点序列,并计算每个节拍点序列的权重,其中,所述节拍点序列中相邻两个节拍点以对应的候选节拍周期为间隔;
    从每个候选节拍周期的若干个节拍点序列中选取权重最大的节拍点序列,作为每个候选节拍周期的最大权值序列;
    根据每个候选节拍周期的最大权值序列以及对应的权重,获得大节拍信息。
  2. 根据权利要求1所述的从音乐节拍点中提取大节拍信息的方法,其特征在于,所述根据输入的音乐的各个节拍点,获得若干个候选节拍周期,包括:
    记录输入的所有节拍点中每相邻两个节拍点之间的时间间隔;
    对每个时间间隔进行高斯分布的直方图统计,获得直方图,其中,所述直方图的横坐标用于表征时间间隔,纵坐标用于表征时间间隔出现的次数;
    对所述直方图进行峰值检测,获得若干个峰值点;
    按照峰值点对应次数从大到小的顺序选取预设数目的峰值点,将预设数目的峰值点所对应的间隔时间作为候选节拍周期。
  3. 根据权利要求2所述的从音乐节拍点中提取大节拍信息的方法,其特征在于,所述对每个时间间隔进行高斯分布的直方图统计,包括:
    构建初始直方图;
    从所有时间间隔中选取一个时间间隔作为当前时间间隔;
    将所述初始直方图中所述当前时间间隔所在位置处的数值增加N,并将所述初始直方图中所有|t-T|<δ的位置处的数值增加
    Figure PCTCN2018119108-appb-100001
    其中,T为所述当前时间间隔,t为除所述当前时间间隔之外的时间间隔,δ为预设阈值;
    从所有时间间隔中选取另一个时间间隔作为当前时间间隔,返回将所述初始直方图中所述当前时间间隔所在位置处的数值增加N,并将所述初始直方图中所有|t-T|<δ的位置处的数值增加
    Figure PCTCN2018119108-appb-100002
    的步骤,直至所有的时间间隔均被选取作为当前时间间隔。
  4. 根据权利要求1所述的从音乐节拍点中提取大节拍信息的方法,其特征在于,所述节拍点包括强节拍点和弱节拍点;
    所述计算每个节拍点序列的权重,包括:
    从所有节拍点序列中选取一个节拍点序列作为当前节拍点序列;
    依序获取所述当前节拍点序列中两个相邻的节拍点;
    若所述当前节拍点序列中两个相邻的节拍点均为强节拍点,将所述当前节拍点序列的权重加上第一设定值;
    若所述当前节拍点序列中两个相邻的节拍点中一个为强节拍点另一个为弱节拍点,将所述当前节拍点序列的权重加上第二设定值,其中,所述第二设定值小于所述第一设定值;
    若所述当前节拍点序列中两个相邻的节拍点均为弱节拍点,将所述当前节拍点序列的权重加上第三设定值,其中,所述第三设定值小于所述第二设定值;
    若所述当前节拍点序列中两个相邻的节拍点的间隔超过对应的候选节拍周期,将所述当前节拍点序列的权重降低第四设定值;
    将历遍所述当前节拍点序列中每两个相邻节拍点得到的权重,与对应的候选节拍周期的开方相乘,获得所述当前节拍点序列的最终权重;
    从所有节拍点序列中选取另一个节拍点序列作为当前节拍点序列,返回依序获取所述当前节拍点序列中两个相邻的节拍点的步骤,直至所有的节拍点序列均被选取作为当前节拍点序列。
  5. 根据权利要求1至4任意一项所述的从音乐节拍点中提取大节拍信息的方法,其特征在于,所述生成每个候选节拍周期的若干个节拍点序列,包括:
    从所有候选节拍周期中选取一个候选节拍周期作为当前节拍周期;
    从输入的所有节拍点中选取一个节拍点作为起始节拍点;
    从所述起始节拍点后面的节拍点中寻找与所述起始节拍点之间的间隔满足等周期间隔条件的节拍点,其中,所述等周期间隔条件包括所述间隔与当前节拍周期的正整数倍之间的误差在设定范围内;
    由所述起始节拍点和寻找到的所有节拍点构成所述当前节拍周期的一个节拍点序列;
    从输入的所有节拍点中选取另一个节拍点作为起始节拍点,返回从所述起始节拍点后面的节拍点中寻找与所述起始节拍点之间的间隔满足等周期间隔条件的节拍点的步骤,直至所有节拍点均被选取作为起始节拍点;
    从所有候选节拍周期中选取另一个候选节拍周期作为当前节拍周期,返回从输入的所有节拍点中选取一个节拍点作为起始节拍点的步骤,直至所有候选节拍周期均被选取作为当前节拍周期。
  6. 根据权利要求1至4任意一项所述的从音乐节拍点中提取大节拍信息的方法,其特征在于,所述大节拍信息包括大节拍周期和大节拍点;
    所述根据每个候选节拍周期的最大权值序列以及对应的权重,获得大节拍信息,包括:
    从所有候选节拍周期中选择权重最大的候选节拍周期,将选择的候选节拍周期作为大节拍周期,将选择的候选节拍周期的最大权值序列中的每一个节拍点作为大节拍点。
  7. 根据权利要求6所述的从音乐节拍点中提取大节拍信息的方法,其特征在于,所述将选择的候选节拍周期的最大权值序列中的每一个节拍点作为大节拍点之后,还包括:
    若输入的所有节拍点中除作为大节拍点外的其他节拍点中,存在节拍点与任何一个大节拍点之间的间隔为大节拍周期的正整数倍,且所述间隔不超过2倍的大节拍周期,将该节拍点判定为大节拍点。
  8. 根据权利要求6所述的从音乐节拍点中提取大节拍信息的方法,其特征在于,所述将选择的候选节拍周期的最大权值序列中的每一个节拍点作为大节拍点之后,还包括:
    若输入的所有节拍点中除作为大节拍点外的其他节拍点中,存在两个节拍点与任何一个大节拍点之间的间隔均为大节拍周期的正整数倍,且该两个节拍点之间的间隔为大节拍周期,将该两个节拍点均判定为大节拍点。
  9. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1至8中任意一项所述的从音乐节拍点中提取大节拍信息的方法。
  10. 一种终端,其特征在于,所述终端包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1至8中任意一项所述的从音乐节拍点中提取大节拍信息的方法。
PCT/CN2018/119108 2017-12-28 2018-12-04 从音乐节拍点中提取大节拍信息的方法、存储介质和终端 WO2019128638A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
RU2020124337A RU2773876C2 (ru) 2017-12-28 2018-12-04 Способ извлечения биг-битовой информации из долей музыкального такта, носитель данных и терминал
US16/957,935 US11386876B2 (en) 2017-12-28 2018-12-04 Method for extracting big beat information from music beat points, storage medium and terminal
EP18894999.4A EP3734468A4 (en) 2017-12-28 2018-12-04 PROCEDURE FOR EXTRACTING BIG BEAT INFORMATION FROM MUSIC CLOCK POINTS, STORAGE MEDIUM AND TERMINAL DEVICE

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711466076.3 2017-12-28
CN201711466076.3A CN108108457B (zh) 2017-12-28 2017-12-28 从音乐节拍点中提取大节拍信息的方法、存储介质和终端

Publications (1)

Publication Number Publication Date
WO2019128638A1 true WO2019128638A1 (zh) 2019-07-04

Family

ID=62214357

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/119108 WO2019128638A1 (zh) 2017-12-28 2018-12-04 从音乐节拍点中提取大节拍信息的方法、存储介质和终端

Country Status (4)

Country Link
US (1) US11386876B2 (zh)
EP (1) EP3734468A4 (zh)
CN (1) CN108108457B (zh)
WO (1) WO2019128638A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6920445B2 (ja) * 2017-08-29 2021-08-18 AlphaTheta株式会社 楽曲解析装置および楽曲解析プログラム
CN108108457B (zh) * 2017-12-28 2020-11-03 广州市百果园信息技术有限公司 从音乐节拍点中提取大节拍信息的方法、存储介质和终端
CN109920449B (zh) * 2019-03-18 2022-03-04 广州市百果园网络科技有限公司 节拍分析方法、音频处理方法及装置、设备、介质
CN110688518B (zh) * 2019-10-12 2024-05-24 广州酷狗计算机科技有限公司 节奏点的确定方法、装置、设备及存储介质
CN111128100B (zh) * 2019-12-20 2021-04-20 网易(杭州)网络有限公司 节奏点检测方法、装置及电子设备
CN112289344A (zh) * 2020-10-30 2021-01-29 腾讯音乐娱乐科技(深圳)有限公司 鼓点波形确定方法、装置及计算机存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104217729A (zh) * 2013-05-31 2014-12-17 杜比实验室特许公司 音频处理方法和音频处理装置以及训练方法
KR20170106165A (ko) * 2016-03-11 2017-09-20 삼성전자주식회사 음악 정보 제공 방법 및 이를 위한 전자 기기
CN107229629A (zh) * 2016-03-24 2017-10-03 腾讯科技(深圳)有限公司 音频识别方法及装置
CN108108457A (zh) * 2017-12-28 2018-06-01 广州市百果园信息技术有限公司 从音乐节拍点中提取大节拍信息的方法、存储介质和终端

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5890116A (en) * 1996-09-13 1999-03-30 Pfu Limited Conduct-along system
US7301092B1 (en) * 2004-04-01 2007-11-27 Pinnacle Systems, Inc. Method and apparatus for synchronizing audio and video components of multimedia presentations by identifying beats in a music signal
US20050249080A1 (en) 2004-05-07 2005-11-10 Fuji Xerox Co., Ltd. Method and system for harvesting a media stream
JP4465626B2 (ja) * 2005-11-08 2010-05-19 ソニー株式会社 情報処理装置および方法、並びにプログラム
JP4949687B2 (ja) 2006-01-25 2012-06-13 ソニー株式会社 ビート抽出装置及びビート抽出方法
US8878041B2 (en) * 2009-05-27 2014-11-04 Microsoft Corporation Detecting beat information using a diverse set of correlations
CN102543052B (zh) * 2011-12-13 2015-08-05 北京百度网讯科技有限公司 一种分析音乐bpm的方法和装置
US20130330062A1 (en) * 2012-06-08 2013-12-12 Mymusaic Inc. Automatic creation of movie with images synchronized to music
JP6017687B2 (ja) 2012-06-29 2016-11-02 ノキア テクノロジーズ オーユー オーディオ信号分析
US9293124B2 (en) * 2013-01-22 2016-03-22 Gibson Brands, Inc. Tempo-adaptive pattern velocity synthesis
GB2518663A (en) * 2013-09-27 2015-04-01 Nokia Corp Audio analysis apparatus
CN105513583B (zh) * 2015-11-25 2019-12-17 福建星网视易信息系统有限公司 一种歌曲节奏的显示方法及其系统
CN106652981B (zh) * 2016-12-28 2019-09-13 广州酷狗计算机科技有限公司 Bpm检测方法及装置
CN108335687B (zh) * 2017-12-26 2020-08-28 广州市百果园信息技术有限公司 音频信号底鼓节拍点的检测方法以及终端
CN108335688B (zh) * 2017-12-28 2021-07-06 广州市百果园信息技术有限公司 音乐中主节拍点检测方法及计算机存储介质、终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104217729A (zh) * 2013-05-31 2014-12-17 杜比实验室特许公司 音频处理方法和音频处理装置以及训练方法
KR20170106165A (ko) * 2016-03-11 2017-09-20 삼성전자주식회사 음악 정보 제공 방법 및 이를 위한 전자 기기
CN107229629A (zh) * 2016-03-24 2017-10-03 腾讯科技(深圳)有限公司 音频识别方法及装置
CN108108457A (zh) * 2017-12-28 2018-06-01 广州市百果园信息技术有限公司 从音乐节拍点中提取大节拍信息的方法、存储介质和终端

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3734468A4 *

Also Published As

Publication number Publication date
EP3734468A1 (en) 2020-11-04
CN108108457A (zh) 2018-06-01
RU2020124337A (ru) 2022-01-28
CN108108457B (zh) 2020-11-03
EP3734468A4 (en) 2020-11-11
US20200335074A1 (en) 2020-10-22
US11386876B2 (en) 2022-07-12
RU2020124337A3 (zh) 2022-01-28

Similar Documents

Publication Publication Date Title
WO2019128638A1 (zh) 从音乐节拍点中提取大节拍信息的方法、存储介质和终端
EP3493198B1 (en) Method and device for determining delay of audio
CN108319657B (zh) 检测强节奏点的方法、存储介质和终端
US11527257B2 (en) Method for detecting audio signal beat points of bass drum, and terminal
CN109256146B (zh) 音频检测方法、装置及存储介质
CN109918669B (zh) 实体确定方法、装置及存储介质
CN106782600B (zh) 音频文件的评分方法及装置
CN111131884B (zh) 一种视频剪辑的方法、相关装置、设备以及存储介质
WO2018223837A1 (zh) 音乐播放方法及相关产品
CN111314784B (zh) 一种视频播放方法及电子设备
WO2019057202A1 (zh) 一种特效同步方法、装置及移动终端
CN107481706B (zh) 歌曲串烧方法及装置
CN111050370A (zh) 网络切换方法、装置、存储介质及电子设备
WO2017215652A1 (zh) 音效参数的调节方法及移动终端
WO2022089098A1 (zh) 音高调节方法、装置及计算机存储介质
CN107680614B (zh) 音频信号处理方法、装置和存储介质
CN107229629B (zh) 音频识别方法及装置
WO2019015575A1 (zh) 解锁控制方法及相关产品
CN108090140A (zh) 一种歌曲播放方法及移动终端
CN110830368B (zh) 即时通讯消息发送方法及电子设备
CN108763475B (zh) 一种录制方法、录制装置及终端设备
CN112189344A (zh) 一种从音视频文件中选择音轨的方法及装置
CN113723159A (zh) 场景识别模型训练方法、场景识别方法及模型训练装置
CN111738100A (zh) 一种基于口型的语音识别方法及终端设备
CN111143614A (zh) 视频显示方法及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18894999

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018894999

Country of ref document: EP

Effective date: 20200728