[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1 Přeložení zdrojového souboru

@translationof Compiling a file

Tento úryvek uvádí do „sestavování“ – do procesu zpracování LilyPondovských vstupních souborů (napsaných vámi), který popisuje, aby byl vytvořen výstupní soubor.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1.1 Zadání not

@translationof Entering input

„Sestavení“ je pojem, který se používá pro přeměnu vstupního souboru pro LilyPond programem LilyPond do notového výstupu. Výstupními soubory jsou v první řadě soubory PDF (pro prohlížení a tisku), MIDI (pro přehrávání) a PNG (pro používání na internetových stránkách). Vstupními soubory pro LilyPond jsou prosté textové soubory.

První příklad ukazuje, jak takový jednoduchý vstupní soubor může vypadat.

 
{
  c' e' g' e'
}

Obrazovým výstupem je:

[image of music]

Pozor: V každém souboru LilyPond musejí být nastaveny { kulaté závorky } kolem not nebo písňového textu. Před a za závorkami mají být zadány prázdné znaky, aby ve spojení s vlastními symboly not nevznikly žádné nejasnosti. Na začátku a na konci řádku mohou být tyto prázdné znaky vynechány také. Může se stát, že v této příručce závorky v některých příkladech chybí, ale je třeba vždy myslet na to, aby se ve vlastních souborech používaly! Více informací ke znázornění příkladů v této příručce podává úryvek Jak číst příručky.

Dodatečně LilyPond rozlišuje Psaní velkých a malých písmen. ‘ { c d e }’ je přípustný kód, ‘ { C D E }’ naproti tomu vede k chybovému hlášení.


Pohled na výsledky

Tvorba notového výstupu závisí na tom, jaký operační systém a které programy se používají.

Vezměte na vědomí, že lepší výsledky jsou u textových editorů s podporou pro LilyPond. Více k tomu v úryvku (web)Snadnější úpravy section ‘Snadnější úpravy’ in Všeobecné informace.

Pozor: Poprvé, když použijete LilyPond, může spuštění trvat minutu nebo i déle, protože program nejprve vyhledává všechna písma, LilyPond běží o mnoho rychleji.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1.2 MacOS X

@translationof MacOS X

Pozor: These instructions assume that you are using the LilyPond application. If you are using any of the programs described in (web)Easier editing section ‘Easier editing’ in Všeobecné informace, consult the documentation for those programs should you have any problems.

Step 1. Create your ‘.ly’ file

Double click the LilyPond.app, an example file will open.

pictures/Learning_Macos_welcome

From the menus along the top left of your screen, select File > Save.

pictures/Learning_Macos_Save_menu

Choose a name for your file, for example ‘test.ly’.

pictures/Learning_Macos_Save_file_with_name

Step 2. Compile (with LilyPad)

From the same menus, select Compile > Typeset.

pictures/Learning_Macos_Typeset_menu

A new window will open showing a progress log of the compilation of the file you have just saved.

pictures/Learning_Macos_Compiling_log

Step 3. View output

Once the compilation has finished, a PDF file will be created with the same name as the original file and will be automatically opened in the default PDF viewer and displayed on your screen.

pictures/Learning_Macos_pdf_output

Other commands

To create new files for LilyPond, begin by selecting File > New

pictures/Learning_Macos_New_menu

or File > Open to open and edit existing files you have saved previously.

pictures/Learning_Macos_Open_menu

You must save any new edits you make to your file before you Compile > Typeset and if the PDF file is not displayed check the window with the progress log for any errors.

If you are not using the default Preview PDF viewer that comes with the Mac Operating system and you have the PDF file generated from a previous compilation open, then any further compilations may fail to generate an update PDF until you close the original.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1.3 Windows

@translationof Windows

Pozor: These instructions assume that you are using the built-in LilyPad editor. If you are using any of the programs described in (web)Easier editing section ‘Easier editing’ in Všeobecné informace, consult the documentation for those programs should you have any problems.

Step 1. Create your ‘.ly’ file

Double-click the LilyPond icon on your desktop and an example file will open.

pictures/LilyPad

From the menus that appear along the top of the example file, select File > Save as. Do not use the File > Save for the example file as this will not work until you have given it a valid LilyPond file name.

pictures/FileSave

Choose a name for your file, for example ‘test.ly’.

pictures/SaveAs

Step 2. Compile

To turn your LilyPond file into a music score, you need to compile it. This can be done a number of ways – using drag and drop, with right-click, double-clicking or using the command line (a DOS box). We’ll look at the first three to start with.

1. Drag-and-drop the file directly onto the LilyPond icon on the desktop.

pictures/DragDrop

Not much will seem to happen, but after a short while, you should see two new files on your desktop – ‘test.log’ and ‘test.pdf’.

2. Right-click on the file and from the pop-up context menu and choose Generate PDF.

pictures/GenPDF

3. Or simply double-click the ‘test.ly’.

Step 3. View output

‘test.pdf’ contains the engraved ‘test.ly’ file. Double-click it and it should open in your PDF viewer:

pictures/PDFRead

Other commands

To create a new file, begin by selecting File > New from within any previously created file or File > Open to open and edit any files you have saved before. You can also edit a file by right-clicking it and selecting Edit source.

pictures/EditFile

You must save any edits you make before you try to compile your file. If the PDF file is not created or the output is not what you expected, check the log file that will have been created during the compilation attempt for any errors.

pictures/BadLog

This log file is overwritten each time you compile your LilyPond file.

If you are viewing your file in a PDF viewer, then you must close the PDF if you wish to try a new compilation as it may fail to create the new PDF while it is still being viewed.

pictures/BadLog2
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1.4 Příkazový řádek

@translationof Command-line

Pozor: These instructions assume that you are familiar with command-line programs. If you are using any of the programs described in (web)Easier editing section ‘Easier editing’ in Všeobecné informace, consult the documentation for those programs should you have any problems.

Step 1. Create your ‘.ly’ file

Create a text file called ‘test.ly’ and enter:

 
\version "2.20.0"
{
  c' e' g' e'
}

Step 2. Compile (with command-line)

To process ‘test.ly’, type the following at the command prompt:

 
lilypond test.ly

You will see something resembling:

 
GNU LilyPond 2.20.0
Processing `test.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Solving 1 page-breaking chunks...[1: 1 pages]
Drawing systems...
Layout output to `test.ps'...
Converting to `./test.pdf'...
Success: compilation successfully completed

Step 3. View output

You may view or print the resulting ‘test.pdf’.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by gub on July 13, 2020 using texi2html 1.82.

Jiné jazyky: English, català, deutsch, español, français, magyar, italiano, 日本語, nederlands.
O automatickém výběru řeči.