]> git.lyx.org Git - lyx.git/blob - lib/examples/lilypond.lyx
Amend and extend 9f3518bc
[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 \end_layout
828
829 \begin_layout Standard
830 \noindent
831 \align center
832 \begin_inset Preview
833
834 \begin_layout Standard
835 \begin_inset Flex LilyPond
836 status collapsed
837
838 \begin_layout Plain Layout
839
840
841 \backslash
842 new PianoStaff <<
843 \end_layout
844
845 \begin_layout Plain Layout
846
847   
848 \end_layout
849
850 \begin_layout Plain Layout
851
852   % RH Staff
853 \end_layout
854
855 \begin_layout Plain Layout
856
857   
858 \backslash
859 new Staff {
860 \end_layout
861
862 \begin_layout Plain Layout
863
864     
865 \backslash
866 clef treble
867 \end_layout
868
869 \begin_layout Plain Layout
870
871     
872 \backslash
873 key aes 
874 \backslash
875 major
876 \end_layout
877
878 \begin_layout Plain Layout
879
880     
881 \backslash
882 time 2/4
883 \end_layout
884
885 \begin_layout Plain Layout
886
887     %
888 \backslash
889 set Staff.fingeringOrientations = #'(up)
890 \end_layout
891
892 \begin_layout Plain Layout
893
894     %
895 \backslash
896 set Score.currentBarNumber = #9
897 \end_layout
898
899 \begin_layout Plain Layout
900
901     
902 \backslash
903 partial 8
904 \end_layout
905
906 \begin_layout Plain Layout
907
908     <aes''-4 c''>8
909 \backslash
910 staccato
911 \end_layout
912
913 \begin_layout Plain Layout
914
915     |
916 \end_layout
917
918 \begin_layout Plain Layout
919
920     %
921 \backslash
922 set doubleSlurs = ##t
923 \end_layout
924
925 \begin_layout Plain Layout
926
927     <bes''-5 des''-2>4(
928 \end_layout
929
930 \begin_layout Plain Layout
931
932     <aes''-4 c''>8
933 \backslash
934 staccato)
935 \end_layout
936
937 \begin_layout Plain Layout
938
939     
940 \backslash
941 noBeam
942 \end_layout
943
944 \begin_layout Plain Layout
945
946     c''8-5
947 \backslash
948 staccato
949 \backslash
950 pp
951 \end_layout
952
953 \begin_layout Plain Layout
954
955     |
956 \end_layout
957
958 \begin_layout Plain Layout
959
960     
961 \backslash
962 unset doubleSlurs
963 \end_layout
964
965 \begin_layout Plain Layout
966
967     bes'8..(
968 \end_layout
969
970 \begin_layout Plain Layout
971
972     aes'32
973 \end_layout
974
975 \begin_layout Plain Layout
976
977     g'8)
978 \backslash
979 staccato
980 \end_layout
981
982 \begin_layout Plain Layout
983
984     f'8
985 \backslash
986 staccato
987 \end_layout
988
989 \begin_layout Plain Layout
990
991     |
992 \end_layout
993
994 \begin_layout Plain Layout
995
996     e'4-2
997 \end_layout
998
999 \begin_layout Plain Layout
1000
1001     r8
1002 \end_layout
1003
1004 \begin_layout Plain Layout
1005
1006     %
1007 \backslash
1008 once 
1009 \backslash
1010 override Script #'script-priority = #-100
1011 \end_layout
1012
1013 \begin_layout Plain Layout
1014
1015     
1016 \backslash
1017 afterGrace
1018 \end_layout
1019
1020 \begin_layout Plain Layout
1021
1022     f'8(
1023 \backslash
1024 trill^
1025 \backslash
1026 markup { 
1027 \backslash
1028 finger "3-2" }
1029 \end_layout
1030
1031 \begin_layout Plain Layout
1032
1033     { e'16[ f'16] }
1034 \end_layout
1035
1036 \begin_layout Plain Layout
1037
1038     |
1039 \end_layout
1040
1041 \begin_layout Plain Layout
1042
1043     g'8..-3
1044 \end_layout
1045
1046 \begin_layout Plain Layout
1047
1048     f'32
1049 \end_layout
1050
1051 \begin_layout Plain Layout
1052
1053     e'8-1)
1054 \backslash
1055 staccato
1056 \end_layout
1057
1058 \begin_layout Plain Layout
1059
1060     d'8-2
1061 \backslash
1062 staccato
1063 \end_layout
1064
1065 \begin_layout Plain Layout
1066
1067     |
1068 \end_layout
1069
1070 \begin_layout Plain Layout
1071
1072     c'4
1073 \end_layout
1074
1075 \begin_layout Plain Layout
1076
1077     r4
1078 \end_layout
1079
1080 \begin_layout Plain Layout
1081
1082   }
1083 \end_layout
1084
1085 \begin_layout Plain Layout
1086
1087   
1088 \end_layout
1089
1090 \begin_layout Plain Layout
1091
1092   % LH Staff
1093 \end_layout
1094
1095 \begin_layout Plain Layout
1096
1097   
1098 \backslash
1099 new Staff {
1100 \end_layout
1101
1102 \begin_layout Plain Layout
1103
1104     
1105 \backslash
1106 key aes 
1107 \backslash
1108 major
1109 \end_layout
1110
1111 \begin_layout Plain Layout
1112
1113     
1114 \backslash
1115 clef treble
1116 \end_layout
1117
1118 \begin_layout Plain Layout
1119
1120     %
1121 \backslash
1122 override Fingering #'direction = #down
1123 \end_layout
1124
1125 \begin_layout Plain Layout
1126
1127     %
1128 \backslash
1129 set Staff.fingeringOrientations = #'(down)
1130 \end_layout
1131
1132 \begin_layout Plain Layout
1133
1134     
1135 \backslash
1136 partial 8
1137 \end_layout
1138
1139 \begin_layout Plain Layout
1140
1141     <aes' aes>8
1142 \backslash
1143 staccato
1144 \end_layout
1145
1146 \begin_layout Plain Layout
1147
1148     %
1149 \backslash
1150 set doubleSlurs = ##t
1151 \end_layout
1152
1153 \begin_layout Plain Layout
1154
1155     <g'-2 ees'-3>4(
1156 \end_layout
1157
1158 \begin_layout Plain Layout
1159
1160     <aes' aes>8)
1161 \backslash
1162 staccato
1163 \end_layout
1164
1165 \begin_layout Plain Layout
1166
1167     
1168 \backslash
1169 noBeam
1170 \end_layout
1171
1172 \begin_layout Plain Layout
1173
1174     
1175 \backslash
1176 clef bass
1177 \end_layout
1178
1179 \begin_layout Plain Layout
1180
1181     c'8-1
1182 \backslash
1183 staccato
1184 \end_layout
1185
1186 \begin_layout Plain Layout
1187
1188     |
1189 \end_layout
1190
1191 \begin_layout Plain Layout
1192
1193     %
1194 \backslash
1195 set doubleSlurs = ##f
1196 \end_layout
1197
1198 \begin_layout Plain Layout
1199
1200     bes8..(
1201 \end_layout
1202
1203 \begin_layout Plain Layout
1204
1205     aes32
1206 \end_layout
1207
1208 \begin_layout Plain Layout
1209
1210     g8-1)
1211 \backslash
1212 staccato
1213 \end_layout
1214
1215 \begin_layout Plain Layout
1216
1217     f8
1218 \backslash
1219 staccato
1220 \end_layout
1221
1222 \begin_layout Plain Layout
1223
1224     |
1225 \end_layout
1226
1227 \begin_layout Plain Layout
1228
1229     e4
1230 \end_layout
1231
1232 \begin_layout Plain Layout
1233
1234     r8
1235 \end_layout
1236
1237 \begin_layout Plain Layout
1238
1239     
1240 \backslash
1241 afterGrace
1242 \end_layout
1243
1244 \begin_layout Plain Layout
1245
1246     f8(
1247 \backslash
1248 trill_
1249 \backslash
1250 markup { 
1251 \backslash
1252 finger "2-1" }
1253 \end_layout
1254
1255 \begin_layout Plain Layout
1256
1257     { e16[ f16] }
1258 \end_layout
1259
1260 \begin_layout Plain Layout
1261
1262     |
1263 \end_layout
1264
1265 \begin_layout Plain Layout
1266
1267     g8..-1
1268 \end_layout
1269
1270 \begin_layout Plain Layout
1271
1272     f32
1273 \end_layout
1274
1275 \begin_layout Plain Layout
1276
1277     e8)
1278 \backslash
1279 staccato
1280 \end_layout
1281
1282 \begin_layout Plain Layout
1283
1284     d8
1285 \backslash
1286 staccato
1287 \end_layout
1288
1289 \begin_layout Plain Layout
1290
1291     |
1292 \end_layout
1293
1294 \begin_layout Plain Layout
1295
1296     c4
1297 \end_layout
1298
1299 \begin_layout Plain Layout
1300
1301     r4
1302 \end_layout
1303
1304 \begin_layout Plain Layout
1305
1306   }
1307 \end_layout
1308
1309 \begin_layout Plain Layout
1310
1311 >>
1312 \end_layout
1313
1314 \begin_layout Plain Layout
1315
1316 \end_layout
1317
1318 \end_inset
1319
1320
1321 \end_layout
1322
1323 \end_inset
1324
1325
1326 \end_layout
1327
1328 \begin_layout Standard
1329 \noindent
1330 [from 
1331 \begin_inset Flex URL
1332 status collapsed
1333
1334 \begin_layout Plain Layout
1335
1336 http://lsr.di.unimi.it/LSR/Item?id=627
1337 \end_layout
1338
1339 \end_inset
1340
1341 ; scheme code removed, centering applied through the paragraph settings]
1342 \end_layout
1343
1344 \begin_layout Subsection
1345 Tablatures template
1346 \begin_inset CommandInset label
1347 LatexCommand label
1348 name "subsec:Tablatures-template"
1349
1350 \end_inset
1351
1352
1353 \end_layout
1354
1355 \begin_layout Standard
1356 \begin_inset Preview
1357
1358 \begin_layout Standard
1359 \begin_inset Flex LilyPond
1360 status collapsed
1361
1362 \begin_layout Plain Layout
1363
1364 upper=  
1365 \backslash
1366 relative c' {
1367 \end_layout
1368
1369 \begin_layout Plain Layout
1370
1371   c4.
1372   g4  g  c
1373 \end_layout
1374
1375 \begin_layout Plain Layout
1376
1377 }
1378 \end_layout
1379
1380 \begin_layout Plain Layout
1381
1382 lower=  
1383 \backslash
1384 relative c {
1385 \end_layout
1386
1387 \begin_layout Plain Layout
1388
1389   c4  e  g,  e'
1390 \end_layout
1391
1392 \begin_layout Plain Layout
1393
1394 }
1395 \end_layout
1396
1397 \begin_layout Plain Layout
1398
1399
1400 \backslash
1401 score {
1402 \end_layout
1403
1404 \begin_layout Plain Layout
1405
1406   
1407 \backslash
1408 new StaffGroup <<
1409 \end_layout
1410
1411 \begin_layout Plain Layout
1412
1413     
1414 \backslash
1415 new Staff = "guitar" <<
1416 \end_layout
1417
1418 \begin_layout Plain Layout
1419
1420       
1421 \backslash
1422 context Voice = "upper guitar" { 
1423 \backslash
1424 clef "G_8" 
1425 \backslash
1426 voiceOne  
1427 \backslash
1428 upper }
1429 \end_layout
1430
1431 \begin_layout Plain Layout
1432
1433       
1434 \backslash
1435 context Voice = "lower guitar" { 
1436 \backslash
1437 clef "G_8" 
1438 \backslash
1439 voiceTwo  
1440 \backslash
1441 lower }
1442 \end_layout
1443
1444 \begin_layout Plain Layout
1445
1446     >>
1447 \end_layout
1448
1449 \begin_layout Plain Layout
1450
1451     
1452 \backslash
1453 new TabStaff = "tab" <<
1454 \end_layout
1455
1456 \begin_layout Plain Layout
1457
1458       
1459 \backslash
1460 context TabVoice = "upper tab" { 
1461 \backslash
1462 clef "tab" 
1463 \backslash
1464 voiceOne 
1465 \backslash
1466 upper }
1467 \end_layout
1468
1469 \begin_layout Plain Layout
1470
1471       
1472 \backslash
1473 context TabVoice = "lower tab" { 
1474 \backslash
1475 clef "tab" 
1476 \backslash
1477 voiceTwo 
1478 \backslash
1479 lower }
1480 \end_layout
1481
1482 \begin_layout Plain Layout
1483
1484     >>
1485 \end_layout
1486
1487 \begin_layout Plain Layout
1488
1489   >>
1490 \end_layout
1491
1492 \begin_layout Plain Layout
1493
1494 }
1495 \end_layout
1496
1497 \end_inset
1498
1499
1500 \end_layout
1501
1502 \end_inset
1503
1504
1505 \end_layout
1506
1507 \begin_layout Standard
1508 \noindent
1509 [from 
1510 \begin_inset Flex URL
1511 status collapsed
1512
1513 \begin_layout Plain Layout
1514
1515 http://lsr.di.unimi.it/LSR/Item?id=634
1516 \end_layout
1517
1518 \end_inset
1519
1520 ]
1521 \end_layout
1522
1523 \end_body
1524 \end_document