CN107221348A - A kind of lyric display method - Google Patents

A kind of lyric display method Download PDF

Info

Publication number
CN107221348A
CN107221348A CN201710383009.9A CN201710383009A CN107221348A CN 107221348 A CN107221348 A CN 107221348A CN 201710383009 A CN201710383009 A CN 201710383009A CN 107221348 A CN107221348 A CN 107221348A
Authority
CN
China
Prior art keywords
word
display
lyrics
chinese character
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.)
Pending
Application number
CN201710383009.9A
Other languages
Chinese (zh)
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.)
Beijing Kuwo Technology Co Ltd
Original Assignee
Beijing Kuwo Technology 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 Beijing Kuwo Technology Co Ltd filed Critical Beijing Kuwo Technology Co Ltd
Priority to CN201710383009.9A priority Critical patent/CN107221348A/en
Publication of CN107221348A publication Critical patent/CN107221348A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The present invention relates to a kind of lyric display method, step is:Step 1, lyrics original text to be shown and display relevant information are obtained;The display relevant information includes:The display time accounting of each word in the display time accounting of preposition blank, the lyrics;Step 2, by the lyrics to be shown of bottom, shown using direct drafting mode;Step 3, the display speed of each word in the lyrics to be shown on upper strata is calculated:According to the word length of the display time accounting of each word, and the word, the display speed shown needed for the word is conversed;Step 4, mode is rendered using part, the lyrics is shown successively from left to right;When part is rendered, time control is carried out according to the display speed of each word with keyFrameAnimation.The present invention, can word for word show the lyrics and form animation effect, and the display time is controlled by keyFrameAnimation, and animation effect is smooth, attractive in appearance, and occupancy resource is few, and overhead is small, improves operational efficiency.

Description

A kind of lyric display method
Technical field
The present invention relates to song subtitling display technology field in iOS system, specifically a kind of lyric display method.
Background technology
In iOS system, music App can provide the effect of lyrics dynamic rolling, wherein the words and phrases currently sung are highlighted It has been shown that, referring to Fig. 1, the words and phrases currently sung are " your shadow mercilessness is hovered at one's side ".
The lyrics it is common be exactly the lrc lyrics, by taking Fig. 1 as an example, the lyrics are as follows:
[ti:Ice rain]
[ar:Liu Dehua]
[al:Stupid child]
[00:0.05] ice rain
[00:0.94] write words:Liu Dehua, Li Mi wrirte music:Pan Xieqing
[00:01.23] sing:Liu Dehua
[00:01.37]
[00:04.79](Singer's monologue)
[00:17.18] I is to wait a girl
[00:25.18] or waiting the sea of bitterness is sunk into
[00:32.91] people nobody that stares blankly silently goes pipe blossom fall the flowers are in blossom
[00:41.03] love that can not be certainly is vacillated now to the left, now to the right
[00:45.43] it have to be filled in feeling sad toward in innermost being
[00:49.61] I is to wait your return
[00:57.73] only gaining one, it serves somebody right
[01:05.27] people stares blankly silently
[01:09.18] two people but have different helpless
[01:13.15] how a love carefully can slowly degenerate
[01:18.43]
[01:20.44] cold ice rain is in bat on the face carelessly
[01:24.31] warm tears blend together one piece with cold rain
[01:28.32] color at the moment is blanked suddenly
[01:32.28] your shadow mercilessness is hovered at one's side
[01:36.30] you betray me just as an executioner
[01:40.35] my heart Buddhist of walking back and forth brutally is killed by perverse knife
[01:44.36] who can be ready to receive the accident of most pain liking on steep cliff
[01:51.09]
[02:26.59] I is to wait your return
[02:35.52] only gaining one, it serves somebody right
[02:42.99] people stares blankly silently
[02:46.99] two people but have different helpless
[02:51.08] how a love carefully can slowly degenerate
[02:56.42]
[02:58.54] cold ice rain is in bat on the face carelessly
[03:02.41] warm tears blend together one piece with cold rain
[03:06.39] color at the moment is blanked suddenly
[03:10.31] your shadow mercilessness is hovered at one's side
[03:14.23] you betray me just as an executioner
[03:18.34] my heart Buddhist of walking back and forth brutally is killed by perverse knife
[03:22.33] who can be ready to receive the accident of most pain liking on steep cliff
[03:28.66]
[03:34.57] cold ice rain is in bat on the face carelessly
[03:38.33] warm tears blend together one piece with cold rain
[03:42.31] color at the moment is blanked suddenly
[03:46.32] your shadow mercilessness is hovered at one's side
[03:50.27] you betray me just as an executioner
[03:54.34] my heart Buddhist of walking back and forth brutally is killed by perverse knife
[03:58.34] love on steep cliff who can dare to adopt
[04:02.37] still it is ready to receive the girl of the unexpected favorite of most pain
[04:08.85]
[04:19.72] love on steep cliff who can dare to adopt
[04:31.84] still it is ready to receive the girl of the unexpected favorite of most pain
[04:51.75]
[05:10.60] singer's monologue
[06:16.76]
In lrc files, per one lyrics of behavior, it is the corresponding time interval of the lyrics in [ ] bracket, during display, is generally parsed It is separated into time parameter array and lyrics content array.
When realizing rolling lyrics effect, before using timer, the side of whole painting canvas is redrawn at interval of how many millisecond Formula realizes the highlighted word for word lyrics.Have a disadvantage in that:Take resource many, overhead is big, and animation efficiency is not ideal enough.
The content of the invention
, can be word for word it is an object of the invention to provide a kind of lyric display method for defect present in prior art The display lyrics simultaneously form animation effect, control the display time by keyFrameAnimation, animation effect is smooth, attractive in appearance, accounts for Few with resource, overhead is small, improves operational efficiency.
To achieve the above objectives, the present invention is adopted the technical scheme that:
A kind of lyric display method, it is characterised in that comprise the following steps:
Step 1, when needing the display lyrics, lyrics original text to be shown and display relevant information are obtained;
The display relevant information, at least including following information:
The display time accounting of the lyrics, is specifically included:In the display time accounting of preposition blank, the lyrics during display of each word Between accounting;
Step 2, by the lyrics to be shown of bottom, shown using direct drafting mode;
Step 3, for the lyrics to be shown on upper strata, the display speed of each word is calculated:Accounted for according to the display time of each word Than, and the word word length, converse show the word needed for display speed;
Step 4, for the lyrics to be shown on upper strata, mode is rendered using part, by the word of each in the lyrics, from left to right successively Display;
And:When part is rendered, time control is carried out according to the display speed of each word with keyFrameAnimation.
On the basis of above-mentioned technical proposal, time accounting is expressed as a percentage,
If certain row lyrics has n word, then:Word 1 arrives word n display time accounting, add the row lyrics preposition blank it is aobvious Show time accounting, equal to 100%.
On the basis of above-mentioned technical proposal, the calculation of time accounting is:(The word end time-word time started)/ Row total time, the row total time is total display time of n word.
On the basis of above-mentioned technical proposal, when running into non-Chinese character or non-Chinese character string, in the non-Chinese character Or increase space after non-Chinese character string.
On the basis of above-mentioned technical proposal, when running into non-Chinese character or non-Chinese character string, in the non-Chinese character Or increasing space after non-Chinese character string, the space sets holding time to be 0.01 second.
On the basis of above-mentioned technical proposal, when running into non-Chinese character or non-Chinese character string, attempt to carry out mess code inspection Survey, determine whether non-Chinese character or non-Chinese character string need to be converted to Chinese.
On the basis of above-mentioned technical proposal, if the two neighboring word time started is identical, latter word is delayed 0.1 Second display.
Lyric display method of the present invention, can word for word show the lyrics and form animation effect, pass through KeyFrameAnimation controls the display time, and animation effect is smooth, attractive in appearance, and occupancy resource is few, and overhead is small, improves Operational efficiency.
Brief description of the drawings
The present invention has drawings described below:
The effect diagram of Fig. 1 music App lyrics dynamic rolling.
The display time accounting example of Fig. 2 lyrics.
The flow chart of Fig. 3 present invention.
Embodiment
The present invention is described in further detail below in conjunction with accompanying drawing.
As shown in figure 3, lyric display method of the present invention, comprises the following steps:
Step 1, when needing the display lyrics, lyrics original text to be shown and display relevant information are obtained;
The display relevant information, at least including following information:
The display time accounting of the lyrics, is specifically included:In the display time accounting of preposition blank, the lyrics during display of each word Between accounting, it is shown in Figure 2,
Time accounting is expressed as a percentage,
If certain row lyrics has n word, then:Word 1 arrives word n display time accounting, add the row lyrics preposition blank it is aobvious Show time accounting, equal to 100%;
The calculation of time accounting is:(The word end time-word time started)/ row total time, the row total time is n word Total display time;
In following step, the lyrics to be shown are at least divided into two layers(For example:It can be described as top layer and bottom)It has been shown that, two layers Lyrics content is identical;
Step 2, by the lyrics to be shown of bottom, shown using direct drafting mode;
Step 3, for the lyrics to be shown on upper strata, the display speed of each word is calculated:Accounted for according to the display time of each word Than, and the word word length, converse show the word needed for display speed;
Step 4, for the lyrics to be shown on upper strata, mode is rendered using part, by the word of each in the lyrics, from left to right successively Display;
And:When part is rendered, time control is carried out according to the display speed of each word with keyFrameAnimation;
For example:Part is carried out using layer mask attributes to render;
Although mask is a layer, but it can't show that it is that former layer contents are controlled with the alpha value of oneself The layer whether rendered:If mask alpha value is 1, that former layer, which will be rendered, to be come, conversely, would not wash with watercolours Dye and, would not also show, but it is transparent;
And because mask is layer, mask addition CAAnimation can be given, so just can with mask animation come Former layer is allowed from left to right gradually to show;
KeyFrame is a time/value pair, and a particular state in special time can be defined by it, i.e., crucial Frame, and different Interpolator can be defined between two keyFrame, just look like the splicing of multiple animations, first The end point of individual animation is the starting point of second animation.
On the basis of above-mentioned technical proposal, when running into non-Chinese character or non-Chinese character string, in the non-Chinese character Or increase space after non-Chinese character string.
On the basis of above-mentioned technical proposal, when running into non-Chinese character or non-Chinese character string, in the non-Chinese character Or increasing space after non-Chinese character string, the space sets holding time to be 0.01 second.
On the basis of above-mentioned technical proposal, when running into non-Chinese character or non-Chinese character string, attempt to carry out mess code inspection Survey, determine whether non-Chinese character or non-Chinese character string need to be converted to Chinese.
On the basis of above-mentioned technical proposal, if the two neighboring word time started is identical, latter word is delayed 0.1 Second display.
The content not being described in detail in this specification belongs to prior art known to professional and technical personnel in the field.

Claims (7)

1. a kind of lyric display method, it is characterised in that comprise the following steps:
Step 1, when needing the display lyrics, lyrics original text to be shown and display relevant information are obtained;
The display relevant information, at least including following information:
The display time accounting of the lyrics, is specifically included:In the display time accounting of preposition blank, the lyrics during display of each word Between accounting;
Step 2, by the lyrics to be shown of bottom, shown using direct drafting mode;
Step 3, for the lyrics to be shown on upper strata, the display speed of each word is calculated:Accounted for according to the display time of each word Than, and the word word length, converse show the word needed for display speed;
Step 4, for the lyrics to be shown on upper strata, mode is rendered using part, by the word of each in the lyrics, from left to right successively Display;
And:When part is rendered, time control is carried out according to the display speed of each word with keyFrameAnimation.
2. lyric display method as claimed in claim 1, it is characterised in that:Time accounting is expressed as a percentage,
If certain row lyrics has n word, then:Word 1 arrives word n display time accounting, add the row lyrics preposition blank it is aobvious Show time accounting, equal to 100%.
3. lyric display method as claimed in claim 1, it is characterised in that:The calculation of time accounting is:(At the end of word The m- word time started)/ row total time, the row total time is total display time of n word.
4. lyric display method as claimed in claim 1, it is characterised in that:Run into non-Chinese character or non-Chinese character string When, increase space after the non-Chinese character or non-Chinese character string.
5. lyric display method as claimed in claim 4, it is characterised in that:Run into non-Chinese character or non-Chinese character string When, increase space after the non-Chinese character or non-Chinese character string, the space sets holding time to be 0.01 second.
6. lyric display method as claimed in claim 1, it is characterised in that:Run into non-Chinese character or non-Chinese character string When, attempt to carry out mess code detection, determine whether non-Chinese character or non-Chinese character string need to be converted to Chinese.
7. lyric display method as claimed in claim 1, it is characterised in that:If the two neighboring word time started is identical, Latter word is delayed into display in 0.1 second.
CN201710383009.9A 2017-05-26 2017-05-26 A kind of lyric display method Pending CN107221348A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710383009.9A CN107221348A (en) 2017-05-26 2017-05-26 A kind of lyric display method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710383009.9A CN107221348A (en) 2017-05-26 2017-05-26 A kind of lyric display method

Publications (1)

Publication Number Publication Date
CN107221348A true CN107221348A (en) 2017-09-29

Family

ID=59944867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710383009.9A Pending CN107221348A (en) 2017-05-26 2017-05-26 A kind of lyric display method

Country Status (1)

Country Link
CN (1) CN107221348A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943964A (en) * 2017-11-27 2018-04-20 腾讯音乐娱乐科技(深圳)有限公司 Lyric display method, device and computer-readable recording medium
CN108563484A (en) * 2018-04-18 2018-09-21 彩讯科技股份有限公司 A kind of lyric display method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090051487A1 (en) * 2007-08-22 2009-02-26 Amnon Sarig System and Methods for the Remote Measurement of a Person's Biometric Data in a Controlled State by Way of Synchronized Music, Video and Lyrics
CN102436838A (en) * 2011-08-30 2012-05-02 北京瑞信在线系统技术有限公司 Lyric displaying method and device executed by computer
CN102737683A (en) * 2011-04-01 2012-10-17 腾讯科技(深圳)有限公司 Method for music player to display lyrics and apparatus thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090051487A1 (en) * 2007-08-22 2009-02-26 Amnon Sarig System and Methods for the Remote Measurement of a Person's Biometric Data in a Controlled State by Way of Synchronized Music, Video and Lyrics
CN102737683A (en) * 2011-04-01 2012-10-17 腾讯科技(深圳)有限公司 Method for music player to display lyrics and apparatus thereof
CN102436838A (en) * 2011-08-30 2012-05-02 北京瑞信在线系统技术有限公司 Lyric displaying method and device executed by computer

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943964A (en) * 2017-11-27 2018-04-20 腾讯音乐娱乐科技(深圳)有限公司 Lyric display method, device and computer-readable recording medium
CN108563484A (en) * 2018-04-18 2018-09-21 彩讯科技股份有限公司 A kind of lyric display method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
Bianchi Semiotic approaches to advertising texts and strategies: Narrative, passion, marketing
CN107704169A (en) The method of state management and system of visual human
CN107221348A (en) A kind of lyric display method
CN107480766A (en) The method and system of the content generation of multi-modal virtual robot
CN107220339A (en) A kind of lyrics word for word display methods
CN104766353A (en) Method and device for adding text content into background
CN108416420A (en) Limbs exchange method based on visual human and system
CN108415561A (en) Gesture interaction method based on visual human and system
Osborne Crisis as form
Strohecker Towards a pro-social conception of contemporary tattooing: The psychological benefits of body modification
Liu et al. Research of interaction design guided by five senses theory
Ferguson et al. K-Pop and the Creative Participatory Engagement of Thai Fans: When Cultural Hybridity Becomes Cultural Authenticity
Bliss Writing as Flat as a Photograph: Subjectivity in Annie Ernaux's La Place
Vieira Consensus and Debate in Salazar's Portugal: Visual and Literary Negotiations of the National Text, 1933-1948
Rampley Linear, Entangled, Anachronic: Periodization and the Shapes of Time in Art History
Zhang et al. APP Interface Design of Qiang People's Silver Jewelry Based on User Experience
Rahman Tradition and a New Aesthetic
Hamid et al. The Application of Beijing Lord Rabbit in Visual Design
Duggan Exploring Zechariah, vol. 1, The Development of Zechariah and Its Role within the Twelve; vol. 2, The Development and Role of Biblical Traditions in Zechariah by Mark J. Boda
Sacido-Romero Intertextuality and intermediality in Janice Galloway’s ‘Scenes from the Life’(Blood 1991)
Pasquier American Catholics: A History by Leslie Woodcock Tentler
Kemper Roman Catholic Worship: Trent to Today. By James F. White. New York: Paulist, 1995. vii+ 174 pages. 15.95
Painter The Urbanization of Opera: Music Theater in Paris in the Nineteenth Century
Zhao Chinese Characteristics and Hybrid Fusion. The Type Characteristic and Aesthetic Pursuit of Chinese Movies in the New Century
Lacombe-Heywood Sunrise

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20170929

RJ01 Rejection of invention patent application after publication