第 185 章 Music score

简介:


185.1. LilyPond

http://lilypond.org/

sudo apt-get install lilypond
	

185.1.1. Example

185.1.1.1. PNG/PDF/PS

			
\version "2.14.2"
\relative c'' {
  <<
    \new Staff { \clef "treble" c4 }
    \new Staff { \clef "bass" c,,4 }
  >>
}
			
			
lilypond --png -o abc.png example.ly
lilypond --pdf -o abc example.ly
			

185.1.1.2. Latex

			
\documentclass{article}
\begin{document}
    An easy song to learn on the piano is Mary Had a Little Lamb:\\
    \begin{lilypond}
        \score { % start of musical score
          <<
            % beginning of musical staff. the \relative c' means that the
            % notes are an octave higher than the default (ie: notes are
            % notes are relative to middle c)
            \new Staff \relative c' {
                e4 d c d e e e2 d4 d d2 e4 g g2
                e4 d c d e e e e d d e d c1
            } % end of staff
          >>
        } % end of musical score
    \end{lilypond}
\end{document}
			
			
lilypond-book --format=latex --lily-output-dir=lilyfiles mary.lytex
latex mary.tex
			
pdflatex --shell-escape your.tex
			



原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
8月前
|
Python
Python报错ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
Python报错ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
|
7月前
codeforces 302 B. Eugeny and Play List
题目链接 有n首歌,编号从1到n,每首歌播放时间为t,播放次数为c,n首歌按次序播放,有m个询问,输出第v分钟正在播放的歌曲编号。 很简单的二分查找,直接贴代码。
22 0
|
12月前
|
机器学习/深度学习 数据可视化
Lesson 5.2 混淆矩阵与 F1-Score
Lesson 5.2 混淆矩阵与 F1-Score
成功解决but is 0 and 2 (computed from start 0 and end 9223372 over shape with rank 2 and stride-1)
成功解决but is 0 and 2 (computed from start 0 and end 9223372 over shape with rank 2 and stride-1)
|
设计模式 前端开发 算法
something about flower and Panthera
something about flower and Panthera
106 0
|
SQL Java 中间件
SELECT * FROM GIRLS WHERE AGE BETWEEN 20 AND 24 ...
阿粉最近看到一张图,如上所示,原本只是一个搞笑的图,但是在阿粉看来这分明是个渣男啊!一句普通的 SQL 语句SELECT * FROM GIRLS WHERE AGE BETWEEN 20 AND 24 AND BOYFRIEND IS NULL,也有很多内涵! 什么?没看出来?来,阿粉带你品品。
SELECT * FROM GIRLS WHERE AGE BETWEEN 20 AND 24 ...
How to judge if one model data is out of date
Created by Wang, Jerry, last modified on Jan 12, 2015
85 0
How to judge if one model data is out of date
1109. Group Photo (25)
#include #include #include #include #include #include using namespace std; struct node{ string name; ...
837 0
|
JavaScript 前端开发
|
安全 iOS开发
Can iPhone X Face ID Be Cracked?
Apple's Face ID claims to be immune to spoofing from masks, but a Vietnamese cybersecurity firm defies this claim.
2616 0