]> git.lyx.org Git - lyx.git/blob - lib/examples/lilypond.lyx
UserGuide.lyx: fix some typographic issues spotted by Mike
[lyx.git] / lib / examples / lilypond.lyx
1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
2 \lyxformat 508
3 \begin_document
4 \begin_header
5 \save_transient_properties true
6 \origin /systemlyxdir/examples/
7 \textclass article
8 \use_default_options true
9 \begin_modules
10 lilypond
11 \end_modules
12 \maintain_unincluded_children false
13 \language english
14 \language_package default
15 \inputencoding auto
16 \fontencoding global
17 \font_roman "lmodern" "default"
18 \font_sans "lmss" "default"
19 \font_typewriter "lmtt" "default"
20 \font_math "auto" "auto"
21 \font_default_family default
22 \use_non_tex_fonts false
23 \font_sc false
24 \font_osf false
25 \font_sf_scale 100 100
26 \font_tt_scale 100 100
27 \graphics default
28 \default_output_format default
29 \output_sync 0
30 \bibtex_command default
31 \index_command default
32 \paperfontsize default
33 \spacing single
34 \use_hyperref true
35 \pdf_title "LilyPond-book and LyX"
36 \pdf_author "The LyX Team"
37 \pdf_bookmarks true
38 \pdf_bookmarksnumbered true
39 \pdf_bookmarksopen true
40 \pdf_bookmarksopenlevel 1
41 \pdf_breaklinks false
42 \pdf_pdfborder false
43 \pdf_colorlinks true
44 \pdf_backref false
45 \pdf_pdfusetitle false
46 \pdf_quoted_options "linkcolor=blue,urlcolor=blue,pdfstartview=XYZ"
47 \papersize default
48 \use_geometry true
49 \use_package amsmath 1
50 \use_package amssymb 1
51 \use_package cancel 0
52 \use_package esint 1
53 \use_package mathdots 1
54 \use_package mathtools 0
55 \use_package mhchem 1
56 \use_package stackrel 0
57 \use_package stmaryrd 0
58 \use_package undertilde 0
59 \cite_engine basic
60 \cite_engine_type default
61 \biblio_style plain
62 \use_bibtopic false
63 \use_indices false
64 \paperorientation portrait
65 \suppress_date true
66 \justification true
67 \use_refstyle 0
68 \index Index
69 \shortcut idx
70 \color #008000
71 \end_index
72 \leftmargin 2cm
73 \topmargin 2cm
74 \rightmargin 2cm
75 \bottommargin 2cm
76 \secnumdepth 3
77 \tocdepth 3
78 \paragraph_separation indent
79 \paragraph_indentation default
80 \quotes_language english
81 \papercolumns 1
82 \papersides 1
83 \paperpagestyle default
84 \tracking_changes false
85 \output_changes false
86 \html_math_output 0
87 \html_css_as_file 0
88 \html_be_strict true
89 \end_header
90
91 \begin_body
92
93 \begin_layout Title
94 LilyPond-book and \SpecialChar LyX
95
96 \end_layout
97
98 \begin_layout Author
99 The \SpecialChar LyX
100  Team
101 \end_layout
102
103 \begin_layout Date
104 Version 2.1.x
105 \end_layout
106
107 \begin_layout Abstract
108 This document explains and demonstrates the inclusion of musical snippets
109  in a \SpecialChar LyX
110  document, using the LilyPond syntax for music notation and the LilyPond-b
111 ook utility for processing.
112 \end_layout
113
114 \begin_layout Section
115 Introduction
116 \end_layout
117
118 \begin_layout Standard
119 LilyPond is an open-source project that renders possible the creation of
120  beautiful computer-generated musical scores.
121  The project consists of a text-based music notation language, and a program
122  to process this notation into musical scores.
123 \end_layout
124
125 \begin_layout Standard
126 While LilyPond itself supports the display of title, author information,
127  footnotes, endnotes, etc., its primary focus is on music typesetting.
128  For text typesetting, other programs are generally better suited.
129  LilyPond-book is a utility provided by the LilyPond project that helps
130  incorporate musical scores using the LilyPond notation into \SpecialChar LaTeX
131  documents,
132  among other formats.
133 \end_layout
134
135 \begin_layout Standard
136 This document describes the use of the LilyPond music notation within \SpecialChar LyX
137  documents
138  that use a \SpecialChar LaTeX
139 -based layout, thus combining the beauty and quality of the
140  typesetting achieved by both \SpecialChar LaTeX
141  and LilyPond.
142  While a basic understanding of the LilyPond syntax for music notation is
143  in order, knowledge of \SpecialChar LaTeX
144  is not necessary when using \SpecialChar LyX
145 .
146 \end_layout
147
148 \begin_layout Standard
149 Section 
150 \begin_inset CommandInset ref
151 LatexCommand ref
152 reference "sec:Using-LilyPond-code"
153
154 \end_inset
155
156  explains the requirements, usage instructions, and shortcomings of LilyPond
157  music notation within \SpecialChar LyX
158 .
159  Section 
160 \begin_inset CommandInset ref
161 LatexCommand ref
162 reference "sec:LilyPond-examples"
163
164 \end_inset
165
166  demonstrates the beauty and quality of the typesetting with a few examples.
167 \end_layout
168
169 \begin_layout Section
170 Using LilyPond code within \SpecialChar LyX
171
172 \begin_inset CommandInset label
173 LatexCommand label
174 name "sec:Using-LilyPond-code"
175
176 \end_inset
177
178
179 \end_layout
180
181 \begin_layout Standard
182 Support for LilyPond music notation (LilyPond code) within \SpecialChar LyX
183  is enabled by
184  adding the LilyPond module to your document.
185  This is done from the menu 
186 \family sans
187 Document\SpecialChar menuseparator
188 Settings
189 \family default
190 , then selecting LilyPond in the list of modules.
191  You can use any \SpecialChar LaTeX
192 -based \SpecialChar LyX
193  layout and use the regular preview and export mechanism
194 ; \SpecialChar LyX
195  will take care of processing the mixed \SpecialChar LaTeX
196 /LilyPond code through LilyPond-book
197  for you.
198  LilyPond-book can also handle DocBook and HTML documents, but the integration
199  of these document types with LilyPond-book and \SpecialChar LyX
200  is missing at the moment.
201 \end_layout
202
203 \begin_layout Subsection
204 Requirements
205 \end_layout
206
207 \begin_layout Standard
208 LilyPond-book version 2.13 or newer.
209 \begin_inset Foot
210 status collapsed
211
212 \begin_layout Plain Layout
213 LilyPond-book supports \SpecialChar LaTeX
214  output since version 2.1.
215  However, some features used by \SpecialChar LyX
216  are available only in recent versions:
217  PDF\SpecialChar LaTeX
218  support (version 2.9), the 
219 \family typewriter
220 --lily-output-dir
221 \family default
222  flag (version 2.11) and especially the 
223 \family typewriter
224 --safe
225 \family default
226  flag (version 2.13).
227 \end_layout
228
229 \end_inset
230
231
232 \end_layout
233
234 \begin_layout Subsection
235 Integration
236 \end_layout
237
238 \begin_layout Standard
239 The module provides a LilyPond inset which you insert from the menu 
240 \family sans
241 Insert\SpecialChar menuseparator
242 Custom
243 \begin_inset space ~
244 \end_inset
245
246 Insets
247 \family default
248 .
249  This inset is for typing the LilyPond code which will be typeset into your
250  musical notes.
251  First, let us try a simple scale:
252 \end_layout
253
254 \begin_layout Standard
255 \begin_inset Flex LilyPond
256 status open
257
258 \begin_layout Plain Layout
259
260 \begin_inset Argument 1
261 status open
262
263 \begin_layout Plain Layout
264 staffsize=28
265 \end_layout
266
267 \end_inset
268
269
270 \end_layout
271
272 \begin_layout Plain Layout
273
274
275 \backslash
276 relative c'' {
277 \end_layout
278
279 \begin_layout Plain Layout
280
281   g a b c
282 \end_layout
283
284 \begin_layout Plain Layout
285
286 }
287 \end_layout
288
289 \end_inset
290
291
292 \end_layout
293
294 \begin_layout Standard
295 \noindent
296 The previous \SpecialChar LyX
297  inset produces the following \SpecialChar LaTeX
298 -lookalike code:
299 \end_layout
300
301 \begin_layout LyX-Code
302
303 \backslash
304 begin{lilypond}[staffsize=28]
305 \end_layout
306
307 \begin_layout LyX-Code
308
309 \end_layout
310
311 \begin_layout LyX-Code
312
313 \backslash
314 relative c'' {
315 \end_layout
316
317 \begin_layout LyX-Code
318   g a b c
319 \end_layout
320
321 \begin_layout LyX-Code
322 }
323 \end_layout
324
325 \begin_layout LyX-Code
326
327 \backslash
328 end{lilypond}
329 \end_layout
330
331 \begin_layout Standard
332 What appear first inside square brackets are options to pass to LilyPond-book.
333  This is inserted in \SpecialChar LyX
334  from the 
335 \family sans
336 Insert
337 \family default
338  menu, in the same way that the LilyPond inset itself is inserted.
339  Here, we set the dimension of the staff to 28
340 \begin_inset space \thinspace{}
341 \end_inset
342
343 pt.
344  Other options can be added by separating them by a comma, for example:
345  
346 \family typewriter
347 [staffsize=28,verbatim]
348 \family default
349 .
350  A list of music fragment options is available in the LilyPond documentation.
351  This whole block can be omitted when the default settings are desired.
352 \end_layout
353
354 \begin_layout Standard
355 What follows after the options block is the textual representation in LilyPond
356  syntax of a musical fragment.
357  This code is not, in fact, processed by \SpecialChar LaTeX
358 , but is preprocessed by LilyPond-book,
359  which creates the graphics files and includes them in the \SpecialChar LaTeX
360  document by
361  replacing the above with a 
362 \family typewriter
363
364 \backslash
365 includegraphics{\SpecialChar ldots
366 }
367 \family default
368  command.
369 \end_layout
370
371 \begin_layout Standard
372 Thus, the conversion process is as follow: 
373 \family sans
374 \SpecialChar LyX
375 \SpecialChar menuseparator
376 LilyPond-book\SpecialChar menuseparator
377 \SpecialChar LaTeX
378
379 \family default
380 .
381  \SpecialChar LyX
382  creates a .lytex file, LilyPond-book creates a .tex files and the accompanying
383  image files, and \SpecialChar LaTeX
384  creates the final document.
385  Every step of the tool chain obeys your spacing, so whether you put the
386  musical extract inline, or in its own paragraph, centered, left-aligned,
387  etc., what you see in the \SpecialChar LyX
388  window should be respected in the final format.
389  An example of inline use may be to display a chord name, such as
390 \begin_inset Flex LilyPond
391 status open
392
393 \begin_layout Plain Layout
394
395 \begin_inset Argument 1
396 status open
397
398 \begin_layout Plain Layout
399 staffsize=12
400 \end_layout
401
402 \end_inset
403
404  
405 \backslash
406 markup { 
407 \backslash
408 concat {B 
409 \backslash
410 super 
411 \backslash
412 flat } }
413 \end_layout
414
415 \end_inset
416
417 , or perhaps a very short snippet.
418 \end_layout
419
420 \begin_layout Subsection
421 Previews
422 \end_layout
423
424 \begin_layout Standard
425 It is possible to have a direct feedback of what the music notation looks
426  like from within \SpecialChar LyX
427 .
428  To do this, wrap a LilyPond inset inside a Preview inset, which you find
429  from the menu 
430 \family sans
431 Insert\SpecialChar menuseparator
432 Preview
433 \family default
434 .
435  This only affects the display within \SpecialChar LyX
436 , not the output:
437 \end_layout
438
439 \begin_layout Standard
440 \begin_inset Preview
441
442 \begin_layout Standard
443 \begin_inset Flex LilyPond
444 status collapsed
445
446 \begin_layout Plain Layout
447
448
449 \backslash
450 relative c'' {
451 \end_layout
452
453 \begin_layout Plain Layout
454
455   ais a g ges
456 \end_layout
457
458 \begin_layout Plain Layout
459
460 }
461 \end_layout
462
463 \end_inset
464
465
466 \end_layout
467
468 \end_inset
469
470
471 \end_layout
472
473 \begin_layout Standard
474 Unfortunately, you might find that the preview isn't exactly instantaneous.
475  You need to move the cursor out of the Preview inset to start compilation,
476  and processing time can take a few seconds.
477  Nevertheless, the direct feedback is often worthwhile during editing, and
478  renders the navigation through the document much easier.
479 \end_layout
480
481 \begin_layout Subsection
482 Gotchas
483 \end_layout
484
485 \begin_layout Standard
486 A few gotchas that have been experienced with the integration of LilyPond-book
487  and \SpecialChar LyX
488  are reported here.
489 \end_layout
490
491 \begin_layout Subsubsection
492 Child documents
493 \end_layout
494
495 \begin_layout Standard
496 A \SpecialChar LyX
497  document using the LilyPond module cannot have child documents using
498  the 
499 \begin_inset Quotes eld
500 \end_inset
501
502 Input
503 \begin_inset Quotes erd
504 \end_inset
505
506  method.
507  If you select 
508 \begin_inset Quotes eld
509 \end_inset
510
511 Input
512 \begin_inset Quotes erd
513 \end_inset
514
515  as the 
516 \begin_inset Quotes eld
517 \end_inset
518
519 Include Type
520 \begin_inset Quotes erd
521 \end_inset
522
523  under 
524 \family sans
525 Insert\SpecialChar menuseparator
526 File\SpecialChar menuseparator
527 Child
528 \begin_inset space ~
529 \end_inset
530
531 Document
532 \family default
533 , you will get an error when producing output.
534  This is due to the way LilyPond-book automatically processes these input
535  files recursively.
536  Since there is currently no command-line option to turn off this behavior
537  of LilyPond-book, it is suggested to use the 
538 \begin_inset Quotes eld
539 \end_inset
540
541 Include
542 \begin_inset Quotes erd
543 \end_inset
544
545  method instead.
546 \end_layout
547
548 \begin_layout Standard
549 Note that it is possible to insert child documents which make use of the
550  LilyPond module, using either the 
551 \begin_inset Quotes eld
552 \end_inset
553
554 Input
555 \begin_inset Quotes erd
556 \end_inset
557
558  or 
559 \begin_inset Quotes eld
560 \end_inset
561
562 Include
563 \begin_inset Quotes erd
564 \end_inset
565
566  method, in a master document which does not make use of the LilyPond module.
567  For this to work you might have to add the line
568 \end_layout
569
570 \begin_layout LyX-Code
571
572 \backslash
573 usepackage{graphicx}
574 \end_layout
575
576 \begin_layout Standard
577 to your master document's preamble under 
578 \family sans
579 Document\SpecialChar menuseparator
580 Settings
581 \family default
582 .
583 \end_layout
584
585 \begin_layout Subsubsection
586 Surrounding braces
587 \end_layout
588
589 \begin_layout Standard
590 LilyPond-book searches for a 
591 \family typewriter
592
593 \backslash
594 score
595 \family default
596  or 
597 \family typewriter
598
599 \backslash
600 relative
601 \family default
602  command when it decides if the code is only a fragment.
603  It is possible to include no LilyPond command at all, but in that case
604  {surrounding braces} are required.
605  Thus, in the following code,
606 \end_layout
607
608 \begin_layout LyX-Code
609
610 \backslash
611 begin{lilypond}
612 \end_layout
613
614 \begin_layout LyX-Code
615   ais' f'' g' e'' % no 
616 \backslash
617 score given
618 \end_layout
619
620 \begin_layout LyX-Code
621
622 \backslash
623 end{lilypond}
624 \end_layout
625
626 \begin_layout Standard
627 LilyPond-book gets confused:
628 \end_layout
629
630 \begin_layout LyX-Code
631 error: syntax error, unexpected NOTENAME_PITCH
632 \end_layout
633
634 \begin_layout LyX-Code
635 ais' f'' g' e'' % no 
636 \backslash
637 score given
638 \end_layout
639
640 \begin_layout Standard
641 With surrounding braces, all is well:
642 \end_layout
643
644 \begin_layout Standard
645 \begin_inset Preview
646
647 \begin_layout Standard
648 \begin_inset Flex LilyPond
649 status collapsed
650
651 \begin_layout Plain Layout
652
653 {ais' f'' g' e''} % no 
654 \backslash
655 score given
656 \end_layout
657
658 \end_inset
659
660
661 \end_layout
662
663 \end_inset
664
665
666 \end_layout
667
668 \begin_layout Standard
669 Writing the notes directly within braces without using any LilyPond command
670  is convenient when writing short snippets.
671  Advanced users will probably want to enter their musical content using
672  LilyPond variables and commands, which is of course supported.
673 \end_layout
674
675 \begin_layout Subsubsection
676 Fret diagrams
677 \end_layout
678
679 \begin_layout Standard
680 Another gotcha is with subsequent LilyPond snippets with 
681 \family typewriter
682
683 \backslash
684 fret-diagram
685 \family default
686  markup commands:
687 \end_layout
688
689 \begin_layout LyX-Code
690
691 \backslash
692 begin{lilypond}
693 \end_layout
694
695 \begin_layout LyX-Code
696   
697 \backslash
698 markup{ 
699 \backslash
700 fret-diagram-terse #"x;3;2;o;1;o;" }
701 \end_layout
702
703 \begin_layout LyX-Code
704
705 \backslash
706 end{lilypond}
707 \end_layout
708
709 \begin_layout LyX-Code
710
711 \end_layout
712
713 \begin_layout LyX-Code
714
715 \backslash
716 begin{lilypond}
717 \end_layout
718
719 \begin_layout LyX-Code
720   
721 \backslash
722 markup{ 
723 \backslash
724 fret-diagram-terse #"x;x;o;2;3;2;" }
725 \end_layout
726
727 \begin_layout LyX-Code
728
729 \backslash
730 end{lilypond}
731 \end_layout
732
733 \begin_layout Standard
734 For some reason LilyPond-book version 2.13 barks on this when run in safe
735  mode (which you always should use, unless you know what you are doing).
736  This has been corrected as of version 2.15 (was LilyPond issue #1900).
737 \end_layout
738
739 \begin_layout Subsubsection
740 The 
741 \family typewriter
742
743 \backslash
744 lilypondfile
745 \family default
746  command
747 \end_layout
748
749 \begin_layout Standard
750 LilyPond-book supports including LilyPond code that resides in external
751  files with the 
752 \family typewriter
753
754 \backslash
755 lilypondfile
756 \family default
757  command.
758  With this command, the LilyPond code is processed as if it was typed inside
759  the document and the output score follows the typesetting determined by
760  \SpecialChar LaTeX
761  with respect to line width, page breaks, and so on.
762  This is in contrast to the long-standing \SpecialChar LyX
763  feature to include LilyPond scores
764  as external material, which calls LilyPond on the external file to produce
765  a rigid figure, and includes this figure in the document, leaving the typesetti
766 ng decisions to LilyPond.
767  Unfortunately, support for the 
768 \family typewriter
769
770 \backslash
771 lilypondfile
772 \family default
773  command in \SpecialChar LyX
774  is not implemented yet, but it is possible to use it inside
775  a \SpecialChar TeX
776 -Code block, provided that one writes the complete, absolute path to
777  the desired file.
778 \end_layout
779
780 \begin_layout Section
781 LilyPond examples
782 \begin_inset CommandInset label
783 LatexCommand label
784 name "sec:LilyPond-examples"
785
786 \end_inset
787
788
789 \end_layout
790
791 \begin_layout Standard
792 Example 
793 \begin_inset CommandInset ref
794 LatexCommand ref
795 reference "subsec:Editorial-headword"
796
797 \end_inset
798
799  shows a complex score using many LilyPond constructs; some scheme code
800  has been removed from the original source of this snippet, to be able to
801  run in safe mode.
802  Example 
803 \begin_inset CommandInset ref
804 LatexCommand ref
805 reference "subsec:Tablatures-template"
806
807 \end_inset
808
809  shows another LilyPond output which should be interesting to guitarists.
810 \end_layout
811
812 \begin_layout Subsection
813 Editorial headword
814 \begin_inset CommandInset label
815 LatexCommand label
816 name "subsec:Editorial-headword"
817
818 \end_inset
819
820
821 \end_layout
822
823 \begin_layout Standard
824 NR 1.7 Editorial annotations Beethoven, Op.
825  31, No.
826  3 Piano sonata 18, Movt II, Scherzo Measures 9–14.
827 \begin_inset Separator latexpar
828 \end_inset
829
830
831 \end_layout
832
833 \begin_layout Standard
834 \noindent
835 \align center
836 \begin_inset Preview
837
838 \begin_layout Standard
839 \begin_inset Flex LilyPond
840 status collapsed
841
842 \begin_layout Plain Layout
843
844
845 \backslash
846 new PianoStaff <<
847 \end_layout
848
849 \begin_layout Plain Layout
850
851   
852 \end_layout
853
854 \begin_layout Plain Layout
855
856   % RH Staff
857 \end_layout
858
859 \begin_layout Plain Layout
860
861   
862 \backslash
863 new Staff {
864 \end_layout
865
866 \begin_layout Plain Layout
867
868     
869 \backslash
870 clef treble
871 \end_layout
872
873 \begin_layout Plain Layout
874
875     
876 \backslash
877 key aes 
878 \backslash
879 major
880 \end_layout
881
882 \begin_layout Plain Layout
883
884     
885 \backslash
886 time 2/4
887 \end_layout
888
889 \begin_layout Plain Layout
890
891     %
892 \backslash
893 set Staff.fingeringOrientations = #'(up)
894 \end_layout
895
896 \begin_layout Plain Layout
897
898     %
899 \backslash
900 set Score.currentBarNumber = #9
901 \end_layout
902
903 \begin_layout Plain Layout
904
905     
906 \backslash
907 partial 8
908 \end_layout
909
910 \begin_layout Plain Layout
911
912     <aes''-4 c''>8
913 \backslash
914 staccato
915 \end_layout
916
917 \begin_layout Plain Layout
918
919     |
920 \end_layout
921
922 \begin_layout Plain Layout
923
924     %
925 \backslash
926 set doubleSlurs = ##t
927 \end_layout
928
929 \begin_layout Plain Layout
930
931     <bes''-5 des''-2>4(
932 \end_layout
933
934 \begin_layout Plain Layout
935
936     <aes''-4 c''>8
937 \backslash
938 staccato)
939 \end_layout
940
941 \begin_layout Plain Layout
942
943     
944 \backslash
945 noBeam
946 \end_layout
947
948 \begin_layout Plain Layout
949
950     c''8-5
951 \backslash
952 staccato
953 \backslash
954 pp
955 \end_layout
956
957 \begin_layout Plain Layout
958
959     |
960 \end_layout
961
962 \begin_layout Plain Layout
963
964     
965 \backslash
966 unset doubleSlurs
967 \end_layout
968
969 \begin_layout Plain Layout
970
971     bes'8..(
972 \end_layout
973
974 \begin_layout Plain Layout
975
976     aes'32
977 \end_layout
978
979 \begin_layout Plain Layout
980
981     g'8)
982 \backslash
983 staccato
984 \end_layout
985
986 \begin_layout Plain Layout
987
988     f'8
989 \backslash
990 staccato
991 \end_layout
992
993 \begin_layout Plain Layout
994
995     |
996 \end_layout
997
998 \begin_layout Plain Layout
999
1000     e'4-2
1001 \end_layout
1002
1003 \begin_layout Plain Layout
1004
1005     r8
1006 \end_layout
1007
1008 \begin_layout Plain Layout
1009
1010     %
1011 \backslash
1012 once 
1013 \backslash
1014 override Script #'script-priority = #-100
1015 \end_layout
1016
1017 \begin_layout Plain Layout
1018
1019     
1020 \backslash
1021 afterGrace
1022 \end_layout
1023
1024 \begin_layout Plain Layout
1025
1026     f'8(
1027 \backslash
1028 trill^
1029 \backslash
1030 markup { 
1031 \backslash
1032 finger "3-2" }
1033 \end_layout
1034
1035 \begin_layout Plain Layout
1036
1037     { e'16[ f'16] }
1038 \end_layout
1039
1040 \begin_layout Plain Layout
1041
1042     |
1043 \end_layout
1044
1045 \begin_layout Plain Layout
1046
1047     g'8..-3
1048 \end_layout
1049
1050 \begin_layout Plain Layout
1051
1052     f'32
1053 \end_layout
1054
1055 \begin_layout Plain Layout
1056
1057     e'8-1)
1058 \backslash
1059 staccato
1060 \end_layout
1061
1062 \begin_layout Plain Layout
1063
1064     d'8-2
1065 \backslash
1066 staccato
1067 \end_layout
1068
1069 \begin_layout Plain Layout
1070
1071     |
1072 \end_layout
1073
1074 \begin_layout Plain Layout
1075
1076     c'4
1077 \end_layout
1078
1079 \begin_layout Plain Layout
1080
1081     r4
1082 \end_layout
1083
1084 \begin_layout Plain Layout
1085
1086   }
1087 \end_layout
1088
1089 \begin_layout Plain Layout
1090
1091   
1092 \end_layout
1093
1094 \begin_layout Plain Layout
1095
1096   % LH Staff
1097 \end_layout
1098
1099 \begin_layout Plain Layout
1100
1101   
1102 \backslash
1103 new Staff {
1104 \end_layout
1105
1106 \begin_layout Plain Layout
1107
1108     
1109 \backslash
1110 key aes 
1111 \backslash
1112 major
1113 \end_layout
1114
1115 \begin_layout Plain Layout
1116
1117     
1118 \backslash
1119 clef treble
1120 \end_layout
1121
1122 \begin_layout Plain Layout
1123
1124     %
1125 \backslash
1126 override Fingering #'direction = #down
1127 \end_layout
1128
1129 \begin_layout Plain Layout
1130
1131     %
1132 \backslash
1133 set Staff.fingeringOrientations = #'(down)
1134 \end_layout
1135
1136 \begin_layout Plain Layout
1137
1138     
1139 \backslash
1140 partial 8
1141 \end_layout
1142
1143 \begin_layout Plain Layout
1144
1145     <aes' aes>8
1146 \backslash
1147 staccato
1148 \end_layout
1149
1150 \begin_layout Plain Layout
1151
1152     %
1153 \backslash
1154 set doubleSlurs = ##t
1155 \end_layout
1156
1157 \begin_layout Plain Layout
1158
1159     <g'-2 ees'-3>4(
1160 \end_layout
1161
1162 \begin_layout Plain Layout
1163
1164     <aes' aes>8)
1165 \backslash
1166 staccato
1167 \end_layout
1168
1169 \begin_layout Plain Layout
1170
1171     
1172 \backslash
1173 noBeam
1174 \end_layout
1175
1176 \begin_layout Plain Layout
1177
1178     
1179 \backslash
1180 clef bass
1181 \end_layout
1182
1183 \begin_layout Plain Layout
1184
1185     c'8-1
1186 \backslash
1187 staccato
1188 \end_layout
1189
1190 \begin_layout Plain Layout
1191
1192     |
1193 \end_layout
1194
1195 \begin_layout Plain Layout
1196
1197     %
1198 \backslash
1199 set doubleSlurs = ##f
1200 \end_layout
1201
1202 \begin_layout Plain Layout
1203
1204     bes8..(
1205 \end_layout
1206
1207 \begin_layout Plain Layout
1208
1209     aes32
1210 \end_layout
1211
1212 \begin_layout Plain Layout
1213
1214     g8-1)
1215 \backslash
1216 staccato
1217 \end_layout
1218
1219 \begin_layout Plain Layout
1220
1221     f8
1222 \backslash
1223 staccato
1224 \end_layout
1225
1226 \begin_layout Plain Layout
1227
1228     |
1229 \end_layout
1230
1231 \begin_layout Plain Layout
1232
1233     e4
1234 \end_layout
1235
1236 \begin_layout Plain Layout
1237
1238     r8
1239 \end_layout
1240
1241 \begin_layout Plain Layout
1242
1243     
1244 \backslash
1245 afterGrace
1246 \end_layout
1247
1248 \begin_layout Plain Layout
1249
1250     f8(
1251 \backslash
1252 trill_
1253 \backslash
1254 markup { 
1255 \backslash
1256 finger "2-1" }
1257 \end_layout
1258
1259 \begin_layout Plain Layout
1260
1261     { e16[ f16] }
1262 \end_layout
1263
1264 \begin_layout Plain Layout
1265
1266     |
1267 \end_layout
1268
1269 \begin_layout Plain Layout
1270
1271     g8..-1
1272 \end_layout
1273
1274 \begin_layout Plain Layout
1275
1276     f32
1277 \end_layout
1278
1279 \begin_layout Plain Layout
1280
1281     e8)
1282 \backslash
1283 staccato
1284 \end_layout
1285
1286 \begin_layout Plain Layout
1287
1288     d8
1289 \backslash
1290 staccato
1291 \end_layout
1292
1293 \begin_layout Plain Layout
1294
1295     |
1296 \end_layout
1297
1298 \begin_layout Plain Layout
1299
1300     c4
1301 \end_layout
1302
1303 \begin_layout Plain Layout
1304
1305     r4
1306 \end_layout
1307
1308 \begin_layout Plain Layout
1309
1310   }
1311 \end_layout
1312
1313 \begin_layout Plain Layout
1314
1315 >>
1316 \end_layout
1317
1318 \begin_layout Plain Layout
1319
1320 \end_layout
1321
1322 \end_inset
1323
1324
1325 \end_layout
1326
1327 \end_inset
1328
1329
1330 \end_layout
1331
1332 \begin_layout Standard
1333 \noindent
1334 [from 
1335 \begin_inset Flex URL
1336 status collapsed
1337
1338 \begin_layout Plain Layout
1339
1340 http://lsr.di.unimi.it/LSR/Item?id=627
1341 \end_layout
1342
1343 \end_inset
1344
1345 ; scheme code removed, centering applied through the paragraph settings]
1346 \end_layout
1347
1348 \begin_layout Subsection
1349 Tablatures template
1350 \begin_inset CommandInset label
1351 LatexCommand label
1352 name "subsec:Tablatures-template"
1353
1354 \end_inset
1355
1356
1357 \end_layout
1358
1359 \begin_layout Standard
1360 \begin_inset Preview
1361
1362 \begin_layout Standard
1363 \begin_inset Flex LilyPond
1364 status collapsed
1365
1366 \begin_layout Plain Layout
1367
1368 upper=  
1369 \backslash
1370 relative c' {
1371 \end_layout
1372
1373 \begin_layout Plain Layout
1374
1375   c4.
1376   g4  g  c
1377 \end_layout
1378
1379 \begin_layout Plain Layout
1380
1381 }
1382 \end_layout
1383
1384 \begin_layout Plain Layout
1385
1386 lower=  
1387 \backslash
1388 relative c {
1389 \end_layout
1390
1391 \begin_layout Plain Layout
1392
1393   c4  e  g,  e'
1394 \end_layout
1395
1396 \begin_layout Plain Layout
1397
1398 }
1399 \end_layout
1400
1401 \begin_layout Plain Layout
1402
1403
1404 \backslash
1405 score {
1406 \end_layout
1407
1408 \begin_layout Plain Layout
1409
1410   
1411 \backslash
1412 new StaffGroup <<
1413 \end_layout
1414
1415 \begin_layout Plain Layout
1416
1417     
1418 \backslash
1419 new Staff = "guitar" <<
1420 \end_layout
1421
1422 \begin_layout Plain Layout
1423
1424       
1425 \backslash
1426 context Voice = "upper guitar" { 
1427 \backslash
1428 clef "G_8" 
1429 \backslash
1430 voiceOne  
1431 \backslash
1432 upper }
1433 \end_layout
1434
1435 \begin_layout Plain Layout
1436
1437       
1438 \backslash
1439 context Voice = "lower guitar" { 
1440 \backslash
1441 clef "G_8" 
1442 \backslash
1443 voiceTwo  
1444 \backslash
1445 lower }
1446 \end_layout
1447
1448 \begin_layout Plain Layout
1449
1450     >>
1451 \end_layout
1452
1453 \begin_layout Plain Layout
1454
1455     
1456 \backslash
1457 new TabStaff = "tab" <<
1458 \end_layout
1459
1460 \begin_layout Plain Layout
1461
1462       
1463 \backslash
1464 context TabVoice = "upper tab" { 
1465 \backslash
1466 clef "tab" 
1467 \backslash
1468 voiceOne 
1469 \backslash
1470 upper }
1471 \end_layout
1472
1473 \begin_layout Plain Layout
1474
1475       
1476 \backslash
1477 context TabVoice = "lower tab" { 
1478 \backslash
1479 clef "tab" 
1480 \backslash
1481 voiceTwo 
1482 \backslash
1483 lower }
1484 \end_layout
1485
1486 \begin_layout Plain Layout
1487
1488     >>
1489 \end_layout
1490
1491 \begin_layout Plain Layout
1492
1493   >>
1494 \end_layout
1495
1496 \begin_layout Plain Layout
1497
1498 }
1499 \end_layout
1500
1501 \end_inset
1502
1503
1504 \end_layout
1505
1506 \end_inset
1507
1508
1509 \end_layout
1510
1511 \begin_layout Standard
1512 \noindent
1513 [from 
1514 \begin_inset Flex URL
1515 status collapsed
1516
1517 \begin_layout Plain Layout
1518
1519 http://lsr.di.unimi.it/LSR/Item?id=634
1520 \end_layout
1521
1522 \end_inset
1523
1524 ]
1525 \end_layout
1526
1527 \end_body
1528 \end_document