CN107452361A - Song subordinate sentence method and device - Google Patents

Song subordinate sentence method and device Download PDF

Info

Publication number
CN107452361A
CN107452361A CN201710670846.XA CN201710670846A CN107452361A CN 107452361 A CN107452361 A CN 107452361A CN 201710670846 A CN201710670846 A CN 201710670846A CN 107452361 A CN107452361 A CN 107452361A
Authority
CN
China
Prior art keywords
note
time difference
adjacent
song
reproduction time
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.)
Granted
Application number
CN201710670846.XA
Other languages
Chinese (zh)
Other versions
CN107452361B (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.)
Tencent Music Entertainment Technology Shenzhen Co Ltd
Original Assignee
Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Music Entertainment Technology Shenzhen Co Ltd filed Critical Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority to CN201710670846.XA priority Critical patent/CN107452361B/en
Publication of CN107452361A publication Critical patent/CN107452361A/en
Application granted granted Critical
Publication of CN107452361B publication Critical patent/CN107452361B/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/0033Recording/reproducing or transmission of music for electrophonic musical instruments
    • G10H1/0041Recording/reproducing or transmission of music for electrophonic musical instruments in coded form
    • G10H1/0058Transmission between separate instruments or between individual components of a musical system
    • G10H1/0066Transmission between separate instruments or between individual components of a musical system using a MIDI interface
    • 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/061Musical 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 musical phrases, isolation of musically relevant segments, e.g. musical thumbnail generation, or for temporal structure analysis of a musical piece, e.g. determination of the movement sequence of a musical work
    • 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/066Musical 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 pitch analysis as part of wider processing for musical purposes, e.g. transcription, musical performance evaluation; Pitch recognition, e.g. in polyphonic sounds; Estimation or use of missing fundamental

Landscapes

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

Abstract

The embodiments of the invention provide a kind of song subordinate sentence method and device, wherein, song subordinate sentence method includes:The musical instrument digital interface midi files of current song are parsed, to obtain the note information in the midi files, the note information includes play start time, playing duration time and the pitch value of each note in the current song;The reproduction time difference between each adjacent note of the current song is calculated according to the note information;Time difference threshold value is obtained according to the distribution situation of the reproduction time difference between each adjacent note;From each adjacent note, the adjacent note that reproduction time difference is more than the time difference threshold value is found, the current song is subjected to subordinate sentence at the adjacent note searched out.The embodiment of the present invention can be realized in the case of no lyrics and carry out subordinate sentence to song.

Description

Song subordinate sentence method and device
Technical field
The present embodiments relate to field of audio processing, and in particular to a kind of song subordinate sentence method and device.
Background technology
Under normal circumstances, subordinate sentence can be carried out to song according to the lyrics of song.But at some in particular cases, for example, In the case of not issuing the lyrics or lacking the lyrics, it can not just realize and subordinate sentence is carried out to song.For this problem, at present Not yet propose effective solution.
The content of the invention
In view of this, can be in the feelings of no lyrics the embodiments of the invention provide a kind of song subordinate sentence method and device Under condition, realize and subordinate sentence is carried out to song.
Song subordinate sentence method provided in an embodiment of the present invention, including:
The musical instrument digital interface midi files of current song are parsed, to obtain the letter of the note in the midi files Breath, the note information include play start time, playing duration time and the pitch value of each note in the current song;
The reproduction time difference between each adjacent note of the current song is calculated according to the note information;
Time difference threshold value is obtained according to the distribution situation of the reproduction time difference between each adjacent note;
From each adjacent note, the adjacent note that reproduction time difference is more than the time difference threshold value is found, The current song is subjected to subordinate sentence at the adjacent note searched out.
Song subordinate sentence device provided in an embodiment of the present invention, including:
Resolution unit, for being parsed to the musical instrument digital interface midi files of current song, to obtain the midi Note information in file, the note information include the play start time of each note in the current song, play and hold Continuous time and pitch value;
Computing unit, the broadcasting between each adjacent note for calculating the current song according to the note information Time difference;
Acquiring unit, for obtaining the time according to the distribution situation of the reproduction time difference between each adjacent note Difference threshold;
Clause unit, it is more than the time difference threshold for from each adjacent note, finding reproduction time difference The adjacent note of value, subordinate sentence is carried out by the current song at the adjacent note searched out.
, can be by being parsed to the midi files of current song, to obtain the midi texts in the embodiment of the present invention Note information in part, the reproduction time calculated according to the note information between each adjacent note of the current song are poor Value, time difference threshold value is obtained according to the distribution situation of the reproduction time difference between each adjacent note, from described each In individual adjacent note, find the adjacent note that reproduction time difference is more than the time difference threshold value, by the current song from Subordinate sentence is carried out at the adjacent note searched out;That is the embodiment of the present invention, can be by solving to the midi files of current song Analysis, realize and subordinate sentence is carried out to current song, so as to solve in the case of no lyrics, realize and current song is divided Sentence.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, make required in being described below to embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for For those skilled in the art, on the premise of not paying creative work, it can also be obtained according to these accompanying drawings other attached Figure.
Fig. 1 is an application scenarios schematic diagram of the song subordinate sentence method that the embodiment of the present invention is provided.
Fig. 2 is a schematic flow sheet of the song subordinate sentence method that the embodiment of the present invention is provided.
Fig. 3 is the histogram schematic diagram that one embodiment of the invention is established.
Fig. 4 is a structural representation of the song subordinate sentence device that the embodiment of the present invention is provided.
Fig. 5 is another structural representation for the song subordinate sentence device that the embodiment of the present invention is provided.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, the every other implementation that those skilled in the art are obtained under the premise of creative work is not made Example, belongs to the scope of protection of the invention.
Because prior art lacks in the case of no lyrics, the implementation of subordinate sentence, thus this hair are carried out to song Bright embodiment provides a kind of song subordinate sentence method and device, and song subordinate sentence method provided in an embodiment of the present invention may be implemented in song In bent subordinate sentence device, song subordinate sentence device can specifically be integrated in terminal or other equipment that can carry out voice data processing In.So that song subordinate sentence device is integrated in the terminal as an example, referring to Fig. 1, terminal can be interacted by network and server, institute It can be mobile communications network, wide area network, LAN etc. to state network.Specifically in embodiments of the present invention, terminal can pass through net Network downloads song from server, downloads after completing, terminal-pair needs the midi files of the song (i.e. current song) of subordinate sentence to enter Row parsing, to obtain the note information in the midi files, the note information includes each note in the current song Play start time, playing duration time and pitch value;The each of the current song can be calculated according to the note information Reproduction time difference between individual adjacent note;According to the distribution situation of the reproduction time difference between each adjacent note Time difference threshold value can be obtained, then from each adjacent note, reproduction time difference is found and is more than the time difference It is worth the adjacent note of threshold value, the current song is subjected to subordinate sentence at the adjacent note searched out.That is the embodiment of the present invention, can By being parsed to the midi files of current song, to realize and carry out subordinate sentence to current song, not sung so as to solve In the case of word, realize and subordinate sentence is carried out to current song.
It will be described in detail respectively below, the description sequencing of each embodiment is not formed to specific implementation below The restriction of sequencing.
Embodiment one
As shown in Fig. 2 the song subordinate sentence method of the present embodiment comprises the following steps:
Step 201, the musical instrument digital interface midi files to current song parse, to obtain in the midi files Note information, the note information includes play start time, the playing duration time of each note in the current song And pitch value;
Musical instrument digital interface (music instrument digital interface, abbreviation midi), is an industry The electronic communication protocol of standard, define various notes for performance apparatus (such as synthesizer) such as electronic musical instruments or play code, allow Electronic musical instrument, computer, mobile phone or other stage performance equipment are connected to each other, and adjust and synchronous, are able to real-time exchange and play number According to.Midi files store music information in the form of digital information, are the music rhythm files of a song.
When being parsed to the midi files of current song, a structure can be defined to store using the method for program Note information, specific method can be as follows:
Tydef struct tag_note{
int start_ms;
int end_ms;
int note_value;
}Tnote
Tnote note;
After midi document analysis is come out using above described structure, the note information shown in table 1 can be obtained.
Play start time (ms) Playing duration time (ms) Pitch value
38210 311 71
38524 309 69
38837 622 67
40711 309 64
41024 309 67
…… …… ……
Table 1
Table 1 shows the part note information obtained from midi files, and this part note information can be midi files In any one section.
The note information parsed includes play start time, playing duration time and the pitch value of note.Wherein, sound High level is normally at section [21,108], and pitch value is bigger, and tone is higher.Each pitch value correspond in music " do, re, A note in mi ... ".As shown in table 1, corresponding one group of pitch value have incidence relation play start time and Playing duration time.For example, the pitch value " 71 " of the first row in table 1, corresponding play start time is 38210, and broadcasting is held The continuous time is 311.That is, note is commenced play out, when a length of 311ms of broadcasting with 71 pitch value from 38210ms.Broadcast Put the time started associates with playing duration time, according to play start time and playing duration time, can obtain one The broadcasting end time of note, in the above example, the first row in table 1, note persistently plays 311 with 71 pitch value Second, it is 38521ms to play the end time.
Step 202, calculate according to the note information reproduction time between each adjacent note of the current song Difference;
Specifically, broadcasting for each note can be calculated according to the play start time and playing duration time of each note Put the end time;According to the broadcasting end time of each note, and the play start time of the adjacent note of each note, meter Calculate the reproduction time difference between each adjacent note.As shown in the first row in table 1 and the second row, the broadcasting knot of first note The beam time is 38521ms, and the play start time of second note is 38524ms, it is known that, during the broadcasting of the two adjacent notes Between difference be 3ms.
Step 203, according to the distribution situation of the reproduction time difference between each adjacent note obtain time difference Threshold value;
It is to have certain reproduction time interval (i.e. reproduction time difference) between adjacent note, if interval is smaller, Then the adjacent note may be in a sentence, if interval is bigger, and the adjacent note is probably the pause of front and rear sentence Place, it is therefore desirable to which a rational time difference threshold value is separated.
A kind of specific method for solving of time difference threshold value is present embodiments provided, it is as follows:
(1) histogram is established according to the distribution situation of the reproduction time difference between each adjacent note.
, can be first by all reproduction time differences divided by 1000, by the unit of reproduction time difference for ease of processing A second s is changed into from millisecond ms, and by rounding up or difference is switched to integer by floor operation.
Histogram functions hist (x)=y is established, x represents each reproduction time difference, and y represents each broadcasting The occurrence number of time difference.For example, reproduction time difference 10, in all reproduction time differences obtained by calculating, occurs 5 Secondary, then hist (10)=5, histogram is drawn according to the histogram functions hist established.For in theory, broadcasting for gained is calculated Time difference is put, is largely concentrated in minimum scope, and in larger value, a small peak is also had, therefore, is painted The probably meeting of the histogram of system is as shown in figure 3, there is two peak values.
(2) time difference threshold value is solved according to the histogram;
Specifically, two peak points in the histogram can be found first with default sliding window.For example, one can be preset Individual sliding window Q, record all peak points in during Q is slided.Sliding window Q can take 3,5 equivalences.So that sliding window Q takes 5 as an example, in Q Center value is Q (n), and the value on the Q left sides is Q (n-1) and Q (n-2), and the value on the right of Q is Q (n+1) and Q (n+2), and the condition of peak point can To be:The simultaneously greater than value on both sides (left and right both sides), or more than one side and equal to the value of another side.
After two peak points are searched out, valley point can be found between two peak points.The definition of valley point with Peak point is opposite, it is necessary to be less than the value on both sides simultaneously, or less than one side and equal to the value of another side.The valley point searched out , by reproduction time difference corresponding to the valley point searched out, time difference threshold value can be defined as shown in figure 3, in the present embodiment.
The unit of this time difference threshold is s, can be multiplied by 1000, and the unit of time difference threshold value is turned from s For ms.
Step 204, from each adjacent note, find the phase that reproduction time difference is more than the time difference threshold value Adjacent note, the current song is subjected to subordinate sentence at the adjacent note searched out.
Specifically, for example, the reproduction time interval between the 6th, the 7th note is more than the time difference threshold value, then from Subordinate sentence is carried out between 6th, the 7th note, using the 6th note as the note in previous sentence, using the 7th note as latter sentence In note.
After song subordinate sentence, song can be composed a poem to a given tune of ci according to subordinate sentence situation, or contrast every of song and its Every musical note similarity of his song etc., particular use, is not specifically limited herein.
, can be by being parsed to the midi files of current song, to obtain in the midi files in the present embodiment Note information, the reproduction time difference between each adjacent note of the current song is calculated according to the note information, Time difference threshold value is obtained according to the distribution situation of the reproduction time difference between each adjacent note, from each phase In adjacent note, the adjacent note that reproduction time difference is more than the time difference threshold value is found, by the current song from searching Subordinate sentence is carried out at the adjacent note arrived;That is the present embodiment, can be by parsing to the midi files of current song, realization pair Current song carries out subordinate sentence, so as to solve in the case of no lyrics, realizes and carries out subordinate sentence to current song.
Embodiment two
In order to preferably implement above method, present invention also offers a kind of song subordinate sentence device, as shown in figure 4, this reality Applying the device of example includes:Resolution unit 401, computing unit 402, acquiring unit 403 and clause unit 404 are as follows:
(1) resolution unit 401;
Resolution unit 401, for being parsed to the musical instrument digital interface midi files of current song, with described in acquisition Note information in midi files, the note information include the play start time of each note in the current song, broadcast Put duration and pitch value.
Musical instrument digital interface (music instrument digital interface, abbreviation midi), is an industry The electronic communication protocol of standard, define various notes for performance apparatus (such as synthesizer) such as electronic musical instruments or play code, allow Electronic musical instrument, computer, mobile phone or other stage performance equipment are connected to each other, and adjust and synchronous, are able to real-time exchange and play number According to.Midi files store music information in the form of digital information, are the music rhythm files of a song.
When being parsed to the midi files of current song, a structure can be defined to store using the method for program Note information, specific method can be as follows:
Tydef struct tag_note{
int start_ms;
int end_ms;
int note_value;
}Tnote
Tnote note;
After midi document analysis is come out using above described structure, the note information shown in table 1 can be obtained.
The note information parsed includes play start time, playing duration time and the pitch value of note.Wherein, sound High level is normally at section [21,108], and pitch value is bigger, and tone is higher.Each pitch value correspond in music " do, re, A note in mi ... ".As shown in table 1, corresponding one group of pitch value have incidence relation play start time and Playing duration time.For example, the pitch value " 71 " of the first row in table 1, corresponding play start time is 38210, and broadcasting is held The continuous time is 311.That is, note is commenced play out, when a length of 311ms of broadcasting with 71 pitch value from 38210ms.Broadcast Put the time started associates with playing duration time, according to play start time and playing duration time, can obtain one The broadcasting end time of note, in the above example, the first row in table 1, note persistently plays 311 with 71 pitch value Second, it is 38521ms to play the end time.
(2) computing unit 402;
Computing unit 402, between each adjacent note according to the note information calculating current song Reproduction time difference.
Specifically, computing unit 402 can calculate every according to the play start time and playing duration time of each note The broadcasting end time of individual note;According to the broadcasting end time of each note, and the broadcasting of the adjacent note of each note Time started, calculate the reproduction time difference between each adjacent note.As shown in the first row in table 1 and the second row, first The broadcasting end time of note is 38521ms, and the play start time of second note is 38524ms, be can be calculated, the two The reproduction time difference of adjacent note is 3ms.
(3) acquiring unit 403;
Acquiring unit 403, for being obtained according to the distribution situation of the reproduction time difference between each adjacent note Time difference threshold value.
It is to have certain reproduction time interval (i.e. reproduction time difference) between adjacent note, if interval is smaller, Then the adjacent note may be in a sentence, if interval is bigger, and the adjacent note is probably the pause of front and rear sentence Place, it is therefore desirable to which a rational time difference threshold value is separated.
In the present embodiment, acquiring unit 403 is used for obtaining this time difference threshold, and specifically, acquiring unit 403 can wrap Include and establish subelement and solve subelement, it is as follows:
Subelement is established, can be established according to the distribution situation of the reproduction time difference between each adjacent note straight Fang Tu.
For ease of processing, establishing subelement can be first by all reproduction time differences divided by 1000, by reproduction time The unit of difference changes into a second s from millisecond ms, and by rounding up or difference is switched to integer by floor operation.
Establish subelement and establish histogram functions hist (x)=y, x represents each reproduction time difference, and y represents each The occurrence number of the individual reproduction time difference.For example, reproduction time difference 10, in all reproduction time differences obtained by calculating In, occur 5 times, then hist (10)=5, histogram is drawn according to histogram functions hist.For in theory, gained is calculated Reproduction time difference, largely it is concentrated in minimum scope, and in larger value, a small peak is also had, therefore, The probably meeting of the histogram of drafting is as shown in figure 3, there is two peak values.
Subelement is solved, time difference threshold value can be solved according to the histogram for establishing subelement foundation.
Specifically, solving subelement can be first with two peak point in the default sliding window searching histogram.For example, A sliding window Q can be preset, records all peak points in during Q is slided.Sliding window Q can take 3,5 equivalences.5 are taken with sliding window Q Exemplified by, Q central value is Q (n), and the value on the Q left sides is Q (n-1) and Q (n-2), and the value on the right of Q is Q (n+1) and Q (n+2), peak value Point condition can be:The simultaneously greater than value on both sides (left and right both sides), or more than one side and equal to the value of another side.
After two peak points are searched out, valley point can be found between two peak points by solving subelement.Valley Point definition it is opposite with peak point, it is necessary to simultaneously less than both sides value, or less than one side and be equal to another side value.Search out Valley point can be defined as time difference threshold value as shown in figure 3, by reproduction time difference corresponding to the valley point searched out.
The unit of this time difference threshold is s, can be multiplied by 1000, and the unit of time difference threshold value is turned from s For ms.
(4) clause unit 404;
Clause unit 404, it can find reproduction time difference from each adjacent note and be more than the time difference The adjacent note of threshold value, the current song is subjected to subordinate sentence at the adjacent note searched out.
Specifically, for example, the time interval between the 6th, the 7th note is more than the time difference threshold value, then subordinate sentence list Member carries out subordinate sentence between the 6th, the 7th note, using the 6th note as the note in previous sentence, using the 7th note as after Note in one.
After song subordinate sentence, song can be composed a poem to a given tune of ci according to subordinate sentence situation, or contrast every of song and its Every musical note similarity of his song etc., particular use, is not specifically limited herein.
It should be noted that above-described embodiment provide song subordinate sentence device when carrying out song subordinate sentence, only with it is above-mentioned respectively The division progress of functional module, can be as needed and by above-mentioned function distribution by different work(for example, in practical application Energy module is completed, i.e., the internal structure of device is divided into different functional modules, to complete whole described above or portion Divide function.In addition, the song subordinate sentence device that above-described embodiment provides belongs to same design with song subordinate sentence method, it is implemented Process refers to embodiment of the method, and here is omitted.
In the present embodiment, resolution unit can be by parsing, with described in acquisition to the midi files of current song Note information in midi files, computing unit can calculate each adjacent tone of the current song according to the note information Reproduction time difference between symbol, acquiring unit is according to the distribution situation of the reproduction time difference between each adjacent note Time difference threshold value is obtained, last clause unit is from each adjacent note, when searching reproduction time difference is more than described Between difference threshold adjacent note, the current song is subjected to subordinate sentence at the adjacent note searched out;That is the present embodiment, can By being parsed to the midi files of current song, to realize and carry out subordinate sentence to current song, not sung so as to solve In the case of word, realize and subordinate sentence is carried out to current song.
Embodiment three
Accordingly, the embodiment of the present invention additionally provides a kind of song subordinate sentence device, as shown in figure 5, the device can include Radio frequency (RF, Radio Frequency) circuit 501, the storage for including one or more computer-readable recording mediums Device 502, input block 503, display unit 504, sensor 505, voicefrequency circuit 506, Wireless Fidelity (WiFi, Wireless Fidelity) module 507, include the part such as one or the processor 508 of more than one processing core and power supply 509. It will be understood by those skilled in the art that the restriction of the apparatus structure shown in Fig. 5 not structure twin installation, can be included than diagram More or less parts, either combine some parts or different parts arrangement.Wherein:
RF circuits 501 can be used for receive and send messages or communication process in, the reception and transmission of signal, especially, by base station After downlink information receives, transfer to one or more than one processor 508 is handled;In addition, it is sent to up data are related to Base station.Generally, RF circuits 501 include but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, use Family identity module (SIM, Subscriber Identity Module) card, transceiver, coupler, low-noise amplifier (LNA, Low Noise Amplifier), duplexer etc..In addition, RF circuits 501 can also pass through radio communication and network and its His equipment communication.The radio communication can use any communication standard or agreement, including but not limited to global system for mobile telecommunications system Unite (GSM, Global System of Mobile communication), general packet radio service (GPRS, General Packet Radio Service), CDMA (CDMA, Code Division Multiple Access), wideband code division it is more Location (WCDMA, Wideband Code Division Multiple Access), Long Term Evolution (LTE, Long Term Evolution), Email, Short Message Service (SMS, Short Messaging Service) etc..
Memory 502 can be used for storage software program and module, and processor 508 is stored in memory 502 by operation Software program and module, so as to perform various function application and data processing.Memory 502 can mainly include storage journey Sequence area and storage data field, wherein, storing program area can storage program area, the application program (ratio needed at least one function Such as sound-playing function, image player function) etc.;Storage data field can store uses created data according to device (such as voice data, phone directory etc.) etc..In addition, memory 502 can include high-speed random access memory, can also include Nonvolatile memory, for example, at least a disk memory, flush memory device or other volatile solid-state parts.Phase Ying Di, memory 502 can also include Memory Controller, to provide processor 508 and input block 503 to memory 502 Access.
Input block 503 can be used for the numeral or character information for receiving input, and generation is set with user and function Control relevant keyboard, mouse, action bars, optics or the input of trace ball signal.Specifically, in a specific embodiment In, input block 503 may include touch sensitive surface and other input equipments.Touch sensitive surface, also referred to as touch display screen or tactile Control plate, collect user on or near it touch operation (such as user using any suitable object such as finger, stylus or Operation of the annex on touch sensitive surface or near touch sensitive surface), and corresponding connection dress is driven according to formula set in advance Put.Optionally, touch sensitive surface may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus is examined The touch orientation of user is surveyed, and detects the signal that touch operation is brought, transmits a signal to touch controller;Touch controller from Touch information is received on touch detecting apparatus, and is converted into contact coordinate, then gives processor 508, and can reception processing Order that device 508 is sent simultaneously is performed.It is furthermore, it is possible to a variety of using resistance-type, condenser type, infrared ray and surface acoustic wave etc. Type realizes touch sensitive surface.Except touch sensitive surface, input block 503 can also include other input equipments.Specifically, other are defeated Physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse can be included but is not limited to by entering equipment One or more in mark, action bars etc..
Display unit 504 can be used for display by user input information or be supplied to user information and terminal it is various Graphical user interface, these graphical user interface can be made up of figure, text, icon, video and its any combination.Display Unit 504 may include display panel, optionally, can use liquid crystal display (LCD, Liquid Crystal Display), The forms such as Organic Light Emitting Diode (OLED, Organic Light-Emitting Diode) configure display panel.Further , touch sensitive surface can cover display panel, after touch sensitive surface detects the touch operation on or near it, send processing to Device 508 is followed by subsequent processing device 508 and provided on a display panel accordingly according to the type of touch event to determine the type of touch event Visual output.Although in Figure 5, touch sensitive surface realizes input and input with display panel is the part independent as two Function, but in some embodiments it is possible to touch sensitive surface and display panel are integrated and realize input and output function.
Device may also include at least one sensor 505, such as optical sensor, motion sensor and other sensors. Specifically, optical sensor may include ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to ambient light Light and shade adjust the brightness of display panel, proximity transducer can close display panel and/or the back of the body when device is moved in one's ear Light.As one kind of motion sensor, gravity accelerometer can detect in all directions (generally three axles) acceleration Size, size and the direction of gravity are can detect that when static, available for identification mobile phone posture application (such as horizontal/vertical screen switching, Dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;It can also configure as terminal Gyroscope, barometer, hygrometer, thermometer, the other sensors such as infrared ray sensor, will not be repeated here.
Voicefrequency circuit 506, loudspeaker, microphone can provide the COBBAIF between user and terminal.Voicefrequency circuit 506 can Electric signal after the voice data received is changed, is transferred to loudspeaker, and voice signal output is converted to by loudspeaker;It is another The voice signal of collection is converted to electric signal by aspect, microphone, and voice data is converted to after being received by voicefrequency circuit 506, then After voice data output processor 508 is handled, through RF circuits 501 to be sent to such as another device, or by voice data Export to memory 502 further to handle.Voicefrequency circuit 506 is also possible that earphone jack, with provide peripheral hardware earphone with The communication of device.
WiFi belongs to short range wireless transmission technology, and device can help user's transceiver electronicses postal by WiFi module 507 Part, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 5 is shown WiFi module 507, but it is understood that, it is simultaneously not belonging to must be configured into for device, can not change as needed completely Become in the essential scope of invention and omit.
Processor 508 is the control centre of device, using various interfaces and the various pieces of connection whole device, is led to Cross operation or perform the software program and/or module being stored in memory 502, and call and be stored in memory 502 Data, the various functions and processing data of terminal are performed, so as to carry out integral monitoring to device.Optionally, processor 508 can wrap Include one or more processing cores;Preferably, processor 508 can integrate application processor and modem processor, wherein, should Operating system, user interface and application program etc. are mainly handled with processor, modem processor mainly handles radio communication. It is understood that above-mentioned modem processor can not also be integrated into processor 508.
Device also includes the power supply 509 (such as battery) to all parts power supply, it is preferred that power supply can pass through power supply pipe Reason system and processor 508 are logically contiguous, so as to realize management charging, electric discharge and power managed by power-supply management system Etc. function.Power supply 509 can also include one or more direct current or AC power, recharging system, power failure inspection The random component such as slowdown monitoring circuit, power supply changeover device or inverter, power supply status indicator.
Although being not shown, device can also include camera, bluetooth module etc., will not be repeated here.Specifically in this implementation In example, the processor 508 in device can be according to following instruction, by corresponding to the process of one or more application program Executable file is loaded into memory 502, and runs the application program being stored in memory 502 by processor 508, from And realize various functions:
The musical instrument digital interface midi files of current song are parsed, to obtain the letter of the note in the midi files Breath, the note information include play start time, playing duration time and the pitch value of each note in the current song;
The reproduction time difference between each adjacent note of the current song is calculated according to the note information;
Time difference threshold value is obtained according to the distribution situation of the reproduction time difference between each adjacent note;
From each adjacent note, the adjacent note that reproduction time difference is more than the time difference threshold value is found, The current song is subjected to subordinate sentence at the adjacent note searched out.
In certain embodiments, between each adjacent note of the current song is calculated according to the note information During reproduction time difference, processor 508 is used to perform following steps:
According to the play start time and playing duration time of each note, the broadcasting end time of each note is calculated;
According to the broadcasting end time of each note, and the play start time of the adjacent note of each note, calculate Reproduction time difference between each adjacent note.
In certain embodiments, obtained according to the distribution situation of the reproduction time difference between each adjacent note During time difference threshold value, processor 508 is used to perform following steps:
Histogram is established according to the distribution situation of the reproduction time difference between each adjacent note;
Time difference threshold value is solved according to the histogram.
In certain embodiments, established according to the distribution situation of the reproduction time difference between each adjacent note During histogram, processor 508 is used to perform following steps:
Each reproduction time difference is represented with transverse axis, goes out occurrence with what the longitudinal axis represented each reproduction time difference Number, establishes the histogram.
In certain embodiments, according to the histogram solve time difference threshold value when, processor 508 be used for perform with Lower step:
To preset two peak points in the sliding window searching histogram;
Valley point is found between described two peak points;
By reproduction time difference corresponding to the valley point, it is defined as the time difference threshold value.
The song subordinate sentence device of the present embodiment, can be by parsing, to obtain to the midi files of current song The note information in midi files is stated, according to broadcasting between each adjacent note of the note information calculating current song Time difference is put, time difference threshold value is obtained according to the distribution situation of the reproduction time difference between each adjacent note; From each adjacent note, the adjacent note that reproduction time difference is more than the time difference threshold value is found, described will be worked as Preceding song carries out subordinate sentence at the adjacent note searched out;That is the device of the present embodiment, the midi to current song can be passed through File is parsed, and is realized and is carried out subordinate sentence to current song, so as to solve in the case of no lyrics, is realized to current song Qu Jinhang subordinate sentences.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with Realize by another way.For example, device embodiment described above is only schematical, for example, the unit Division, only a kind of division of logic function, can there is other dividing mode, such as multiple units or component when actually realizing Another system can be combined or be desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or The mutual coupling discussed or direct-coupling or communication connection can be the indirect couplings by some interfaces, device or unit Close or communicate to connect, can be electrical, mechanical or other forms.The unit illustrated as separating component can be or It may not be physically separate, can be as the part that unit is shown or may not be physical location, you can with Positioned at a place, or can also be distributed on multiple NEs.Part therein can be selected according to the actual needs Or whole units realize the purpose of this embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.The integrated unit is such as Fruit realized in the form of SFU software functional unit and as independent production marketing or in use, a computer can be stored in can Read in storage medium.Based on such understanding, technical scheme substantially contributes to prior art in other words Part or all or part of the technical scheme can be embodied in the form of software product, the computer software product Be stored in a storage medium, including some instructions to cause a computer equipment (can be personal computer, dress Put, or network equipment etc.) perform all or part of step of each embodiment methods described of the present invention.And foregoing storage is situated between Matter includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
Described above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before Embodiment is stated the present invention is described in detail, it will be understood by those within the art that:It still can be to preceding State the technical scheme described in each embodiment to modify, or equivalent substitution is carried out to which part technical characteristic;And these Modification is replaced, and the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (10)

  1. A kind of 1. song subordinate sentence method, it is characterised in that including:
    The musical instrument digital interface midi files of current song are parsed, to obtain the note information in the midi files, The note information includes play start time, playing duration time and the pitch value of each note in the current song;
    The reproduction time difference between each adjacent note of the current song is calculated according to the note information;
    Time difference threshold value is obtained according to the distribution situation of the reproduction time difference between each adjacent note;
    From each adjacent note, the adjacent note that reproduction time difference is more than the time difference threshold value is found, by institute State current song and subordinate sentence is carried out at the adjacent note searched out.
  2. 2. according to the method for claim 1, it is characterised in that described that the current song is calculated according to the note information Each adjacent note between reproduction time difference, including:
    According to the play start time and playing duration time of each note, the broadcasting end time of each note is calculated;
    According to the broadcasting end time of each note, and the play start time of the adjacent note of each note, calculate each Reproduction time difference between adjacent note.
  3. 3. according to the method for claim 1, it is characterised in that during the broadcasting according between each adjacent note Between difference distribution situation obtain time difference threshold value, including:
    Histogram is established according to the distribution situation of the reproduction time difference between each adjacent note;
    Time difference threshold value is solved according to the histogram.
  4. 4. according to the method for claim 3, it is characterised in that during the broadcasting according between each adjacent note Between the distribution situation of difference establish histogram, including:
    Each reproduction time difference is represented with transverse axis, the occurrence number of each reproduction time difference is represented with the longitudinal axis, Establish the histogram.
  5. 5. according to the method for claim 3, it is characterised in that time difference threshold value is solved according to the histogram, including:
    To preset two peak points in the sliding window searching histogram;
    Valley point is found between described two peak points;
    By reproduction time difference corresponding to the valley point, it is defined as the time difference threshold value.
  6. A kind of 6. song subordinate sentence device, it is characterised in that including:
    Resolution unit, for being parsed to the musical instrument digital interface midi files of current song, to obtain the midi files In note information, the note information includes the play start time of each note in the current song, plays when continuing Between and pitch value;
    Computing unit, the reproduction time between each adjacent note for calculating the current song according to the note information Difference;
    Acquiring unit, for obtaining time difference according to the distribution situation of the reproduction time difference between each adjacent note Threshold value;
    Clause unit, it is more than the time difference threshold value for from each adjacent note, finding reproduction time difference Adjacent note, the current song is subjected to subordinate sentence at the adjacent note searched out.
  7. 7. device according to claim 6, it is characterised in that
    The computing unit is specifically used for, and according to the play start time and playing duration time of each note, calculates each sound The broadcasting end time of symbol;According to the broadcasting end time of each note, and the broadcasting of the adjacent note of each note starts Time, calculate the reproduction time difference between each adjacent note.
  8. 8. device according to claim 6, it is characterised in that the acquiring unit includes:
    Subelement is established, for establishing Nogata according to the distribution situation of the reproduction time difference between each adjacent note Figure;
    Subelement is solved, for solving time difference threshold value according to the histogram.
  9. 9. device according to claim 8, it is characterised in that
    The subelement of establishing is specifically used for, and each reproduction time difference is represented with transverse axis, represents each described with the longitudinal axis The occurrence number of reproduction time difference, establish the histogram.
  10. 10. device according to claim 8, it is characterised in that
    The solution subelement is specifically used for, to preset two peak points in the sliding window searching histogram;Described two Valley point is found between peak point;By reproduction time difference corresponding to the valley point, it is defined as the time difference threshold value.
CN201710670846.XA 2017-08-08 2017-08-08 Song sentence dividing method and device Active CN107452361B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710670846.XA CN107452361B (en) 2017-08-08 2017-08-08 Song sentence dividing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710670846.XA CN107452361B (en) 2017-08-08 2017-08-08 Song sentence dividing method and device

Publications (2)

Publication Number Publication Date
CN107452361A true CN107452361A (en) 2017-12-08
CN107452361B CN107452361B (en) 2020-07-07

Family

ID=60489560

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710670846.XA Active CN107452361B (en) 2017-08-08 2017-08-08 Song sentence dividing method and device

Country Status (1)

Country Link
CN (1) CN107452361B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112581976A (en) * 2019-09-29 2021-03-30 骅讯电子企业股份有限公司 Singing scoring method and singing scoring system based on streaming media
CN112735429A (en) * 2020-12-28 2021-04-30 腾讯音乐娱乐科技(深圳)有限公司 Method for determining lyric timestamp information and training method of acoustic model
CN113255348A (en) * 2021-05-26 2021-08-13 腾讯音乐娱乐科技(深圳)有限公司 Lyric segmentation method, device, equipment and medium
CN113377992A (en) * 2021-06-21 2021-09-10 腾讯音乐娱乐科技(深圳)有限公司 Song segmentation method, device and storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1379898A (en) * 1999-09-16 2002-11-13 汉索尔索弗特有限公司 Method and apparatus for playing musical instruments based on digital music file
CN1703734A (en) * 2002-10-11 2005-11-30 松下电器产业株式会社 Method and apparatus for determining musical notes from sounds
CN101093661A (en) * 2006-06-23 2007-12-26 凌阳科技股份有限公司 Pitch tracking and playing method and system
US20090173214A1 (en) * 2008-01-07 2009-07-09 Samsung Electronics Co., Ltd. Method and apparatus for storing/searching for music
CN101720006A (en) * 2009-11-20 2010-06-02 张立军 Positioning method suitable for representative frame extracted by video keyframe
CN102682752A (en) * 2011-03-07 2012-09-19 卡西欧计算机株式会社 Musical-score information generating apparatus, musical-score information generating method, music-tone generation controlling apparatus, and music-tone generation controlling method
CN103824555A (en) * 2012-11-19 2014-05-28 腾讯科技(深圳)有限公司 Audio band extraction method and extraction device
US20150157945A1 (en) * 2007-02-20 2015-06-11 Ubisoft Entertainment Instrument game system and method
CN105280206A (en) * 2014-06-23 2016-01-27 广东小天才科技有限公司 Audio playing method and device
CN105513583A (en) * 2015-11-25 2016-04-20 福建星网视易信息系统有限公司 Display method and system for song rhythm
CN106448630A (en) * 2016-09-09 2017-02-22 腾讯科技(深圳)有限公司 Method and device for generating digital music file of song
CN106653037A (en) * 2015-11-03 2017-05-10 广州酷狗计算机科技有限公司 Audio data processing method and device
CN106652986A (en) * 2016-12-08 2017-05-10 腾讯音乐娱乐(深圳)有限公司 Song audio splicing method and device
CN106649644A (en) * 2016-12-08 2017-05-10 腾讯音乐娱乐(深圳)有限公司 Lyric file generation method and device
CN106782460A (en) * 2016-12-26 2017-05-31 广州酷狗计算机科技有限公司 The method and apparatus for generating music score

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1379898A (en) * 1999-09-16 2002-11-13 汉索尔索弗特有限公司 Method and apparatus for playing musical instruments based on digital music file
CN1703734A (en) * 2002-10-11 2005-11-30 松下电器产业株式会社 Method and apparatus for determining musical notes from sounds
CN101093661A (en) * 2006-06-23 2007-12-26 凌阳科技股份有限公司 Pitch tracking and playing method and system
US20150157945A1 (en) * 2007-02-20 2015-06-11 Ubisoft Entertainment Instrument game system and method
US20090173214A1 (en) * 2008-01-07 2009-07-09 Samsung Electronics Co., Ltd. Method and apparatus for storing/searching for music
CN101720006A (en) * 2009-11-20 2010-06-02 张立军 Positioning method suitable for representative frame extracted by video keyframe
CN102682752A (en) * 2011-03-07 2012-09-19 卡西欧计算机株式会社 Musical-score information generating apparatus, musical-score information generating method, music-tone generation controlling apparatus, and music-tone generation controlling method
CN103824555A (en) * 2012-11-19 2014-05-28 腾讯科技(深圳)有限公司 Audio band extraction method and extraction device
CN105280206A (en) * 2014-06-23 2016-01-27 广东小天才科技有限公司 Audio playing method and device
CN106653037A (en) * 2015-11-03 2017-05-10 广州酷狗计算机科技有限公司 Audio data processing method and device
CN105513583A (en) * 2015-11-25 2016-04-20 福建星网视易信息系统有限公司 Display method and system for song rhythm
CN106448630A (en) * 2016-09-09 2017-02-22 腾讯科技(深圳)有限公司 Method and device for generating digital music file of song
CN106652986A (en) * 2016-12-08 2017-05-10 腾讯音乐娱乐(深圳)有限公司 Song audio splicing method and device
CN106649644A (en) * 2016-12-08 2017-05-10 腾讯音乐娱乐(深圳)有限公司 Lyric file generation method and device
CN106782460A (en) * 2016-12-26 2017-05-31 广州酷狗计算机科技有限公司 The method and apparatus for generating music score

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112581976A (en) * 2019-09-29 2021-03-30 骅讯电子企业股份有限公司 Singing scoring method and singing scoring system based on streaming media
CN112581976B (en) * 2019-09-29 2023-06-27 骅讯电子企业股份有限公司 Singing scoring method and system based on streaming media
CN112735429A (en) * 2020-12-28 2021-04-30 腾讯音乐娱乐科技(深圳)有限公司 Method for determining lyric timestamp information and training method of acoustic model
CN112735429B (en) * 2020-12-28 2023-11-14 腾讯音乐娱乐科技(深圳)有限公司 Method for determining lyric timestamp information and training method of acoustic model
CN113255348A (en) * 2021-05-26 2021-08-13 腾讯音乐娱乐科技(深圳)有限公司 Lyric segmentation method, device, equipment and medium
CN113255348B (en) * 2021-05-26 2023-02-28 腾讯音乐娱乐科技(深圳)有限公司 Lyric segmentation method, device, equipment and medium
CN113377992A (en) * 2021-06-21 2021-09-10 腾讯音乐娱乐科技(深圳)有限公司 Song segmentation method, device and storage medium
CN113377992B (en) * 2021-06-21 2024-09-06 腾讯音乐娱乐科技(深圳)有限公司 Song segmentation method, apparatus and storage medium

Also Published As

Publication number Publication date
CN107452361B (en) 2020-07-07

Similar Documents

Publication Publication Date Title
CN107481706A (en) song Skewered method and device
CN103605656B (en) A kind of method, apparatus for recommending music and a kind of mobile terminal
CN107452361A (en) Song subordinate sentence method and device
CN106531149A (en) Information processing method and device
CN104217717A (en) Language model constructing method and device
CN104581221A (en) Video live broadcasting method and device
CN109903773A (en) Audio-frequency processing method, device and storage medium
CN106782460A (en) The method and apparatus for generating music score
CN105959482B (en) A kind of control method and electronic equipment of scene audio
CN107507628A (en) Singing methods of marking, device and terminal
CN107295173A (en) Delete the method and Related product of chat messages
CN107645682A (en) Carry out live method and system
CN106528545A (en) Voice message processing method and device
CN105606117A (en) Navigation prompting method and navigation prompting apparatus
CN107993672A (en) Frequency expansion method and device
CN104063400B (en) Data search method and data search device
CN105049959A (en) Multimedia file playing method and device
CN109243488A (en) Audio-frequency detection, device and storage medium
CN108268438A (en) A kind of content of pages extracting method, device and client
CN106599204A (en) Method and device for recommending multimedia content
CN106653068A (en) Audio data playing method, device and terminal
CN110430475A (en) A kind of interactive approach and relevant apparatus
CN108205568A (en) Method and device based on label selection data
CN105550316B (en) The method for pushing and device of audio list
CN107577795A (en) A kind of methods, devices and systems for recommending song

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