5.1 Lilypond五线谱
生活随笔
收集整理的這篇文章主要介紹了
5.1 Lilypond五线谱
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
文章目錄
- 環(huán)境搭建
- 寫樂譜文件
- 編譯效果
環(huán)境搭建
??LaTex本身不能寫五線譜,只能集成lilypond。Lilypond的下載地址為鏈接。按照完成后,在Windows環(huán)境下,需要修改一個文件,將lilypond-book改成lilypond-book.py,如下圖所示:
寫樂譜文件
??創(chuàng)建一個后綴為ly的文件,隨便用一款編輯器就可以往里面寫樂譜了。但我不愿寫,我是從網(wǎng)上抄了一個樂譜文件,Franz Abt的練聲曲,下載網(wǎng)頁為Franz Abt的練聲曲,下載鏈接為練習(xí)曲一。如果因為網(wǎng)絡(luò)原因下載不了,我可以貼出樂譜代碼:
\version "2.18.2"\midi {\tempo 4 = 110\context {\Voice\remove "Dynamic_performer"} }\header {title = "Vocalise № 1"composer = "Franz Abt (1819-1885)"maintainer = "Anonymous"mutopiacomposer = "AbtF"mutopiainstrument = "Voice, Piano"license = "Public Domain"source = "Practical Singing Tutor for All Voices, G.Schirmer, 1892. Ed: Max Spicker"moreinfo = "IMSLP-39796, PDF page 84.\nSee also: Франц АБТ / ШКОЛА ПЕНИЯ / Избранные / упражнения / для низких голосов / в сопровождении / фортепиано / Составитель Г. ТИЦ / ИЗДАТЕЛЬСТВО МУЗЫКА ? МОСКВА 1965"style=Romanticfooter = "Mutopia-2019/07/24-2247"copyright = \markup {\override #'(font-name . "DejaVu Sans, Bold") \override #'(baseline-skip . 0) \right-column {\with-url #"http://www.MutopiaProject.org" {\abs-fontsize #9 "Mutopia " \concat {\abs-fontsize #12 \with-color #white "?" \abs-fontsize #9 "Project "}}}\override #'(font-name . "DejaVu Sans, Bold") \override #'(baseline-skip . 0 ) \center-column {\abs-fontsize #11.9 \with-color #grey \bold {"?" "?"}}\override #'(font-name . "DejaVu Sans,sans-serif") \override #'(baseline-skip . 0) \column { \abs-fontsize #8 \concat {"Typeset using " \with-url #"http://www.lilypond.org" "LilyPond " "by " \maintainer " — " \footer}\concat {\concat {\abs-fontsize #8 { "Placed in the " \with-url #"http://creativecommons.org/licenses/publicdomain" "Public Domain" " by the typesetter " " — free to distribute, modify, and perform" }}\abs-fontsize #13 \with-color #white "?" }}}tagline = ##f }tightenSlur = {\once \override Slur #'positions = #'(5 . 5) }global = {\tempo Moderato\key c \major\time 4/4s1*5 \breaks1*5 \breaks1*6 \break\bar "|." }voice = \relative c' {e2^>( \once \override Hairpin #'to-barline = ##f d\> |c1\!) |\breathe d2\<( e4 fe2^>\!) r |g2\p\<( a |\barNumberCheck 6b1\!) |\breathe a2\>( g4 fis\! |g2) r |g2( a4 b |c2.) \breathe b8( a |\barNumberCheck 11g2\> f |e2\!) r |e4\<( d e f |g1\!) |\breathe g4\>( f e d |c1\!) | }text = \lyricmode {\set ignoreMelismata = ##tMi re dore mi fa misol la sila sol fa solsol la si dosi la sol fa mimi re mi fa solsol fa mi re do }upper = \relative c' {\slurDown<c e>4( g <f d'> g) |<e c'>4 e g c |\tightenSlur <b d>4( g <c e> <d f> |<c e>4 g c e) |<e g>4( c <g' a> e) |\barNumberCheck 6<g b>4( d g b) |<c, a'>2( <b g'>4 <ais fis'> |<b g'>2) r |\tightenSlur <b f' g>4( g <d' f g> g, |<c e g>4 g c e) |\barNumberCheck 11\tightenSlur \shape #'((0 . 0) (0 . 0) (0 . -0.75) (0 . 0)) Slur g4( b, d f |e4 e, c' e) |<< { e4 d e } \\ { <a, c>2. } >> <a d f>4 |\tightenSlur \shape #'((0 . 0) (-0.5 . -0.75) (0 . 0) (0 . 0)) Slur g'4( g, c e) |<b g'>4( <a f'> <g e'> <f d'> |<e c'>1) | }lower = \relative c {<c, c'>1~ |<c c'> |g'1( |c2) r |c2( cis |\barNumberCheck 6d1) |d,4 d' d, d' |g,4 b d g |g,1 |g1 |\barNumberCheck 11g2( gis |a1) |f4( f' e d |<g, e'>1) |g1 |<c, g'>1 | }\score {<<\new Staff \with { midiInstrument = "voice oohs" } <<\new Voice \global\new Voice = "voice" {\clef treble\dynamicUp\voice}\new Lyrics \lyricsto "voice" \text>>\new Staff \with { midiInstrument = "voice oohs" } <<\new Voice \global\new Voice = "voice" {\clef bass\dynamicUp\transpose c c, \voice}>>\new PianoStaff \with { midiInstrument = "acoustic grand" } <<\new Staff = "upper" <<\clef treble\global\upper>>\new Staff = "lower" <<\clef bass\global\lower>>>>>>\layout {}\midi {} }??下載完成之后創(chuàng)建一個后綴為lytex的文件,寫入以下內(nèi)容:
\documentclass{article} \begin{document}\lilypondfile{Vocalise1.ly} \end{document}??Vocalise1.ly就是我下載下來的樂譜文件,然后執(zhí)行命令:
lilypond-book.py --pdf .\Vocalise1.lytex??這個時候就得到了一個tex文件。
編譯效果
??將這個tex文件用TexStudio打開編譯,得到了最終需要的pdf了,這樣就可以寫音樂類的論文或文章了,編譯效果如下:
總結(jié)
以上是生活随笔為你收集整理的5.1 Lilypond五线谱的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: QT之实现斗鱼直播PC客户端
- 下一篇: 抽象代数入门(一)