Difference between revisions of "LilyPond"

From ArchWiki
Jump to: navigation, search
(Removed the superfluous comment in the Installation section.)
(style improvements, see Help:Style)
Line 1: Line 1:
 
[[Category:Applications]]
 
[[Category:Applications]]
 
[[de:LilyPond]]
 
[[de:LilyPond]]
== Getting Started ==
 
 
 
Lilypond is a Free Software score writing application.
 
Lilypond is a Free Software score writing application.
 
Its input is a plain text file in the lilypond music writing format, and its output is in either postscript or Portable Document Format.
 
Its input is a plain text file in the lilypond music writing format, and its output is in either postscript or Portable Document Format.
  
=== Installation ===
+
== Installation ==
 +
 
 +
[[Install]] {{Pkg|lilypond}} from the [[official repositories]].
  
~# pacman -Syu lilypond
+
== Example Score ==
  
=== Example Score ===
+
Create a test file like:
  
~# cat > test.ly
+
{{hc|test.ly|
{
+
{
  c' e' g' e'
+
c' e' g' e'
}
+
}
 +
}}
  
and then hit Ctrl+D to finish writing. To compile ‘test.ly’, use
+
To compile it, use:
  
  ~# lilypond test.ly
+
  $ lilypond test.ly
  
It will create test.pdf and test.ps files that contain your score.
+
It will create {{ic|test.pdf}} and {{ic|test.ps}} files that contain your score.
  
 
== Tweaking ==
 
== Tweaking ==
Line 29: Line 30:
 
* VIM
 
* VIM
  
Vim with the possibilities of compiling the code within the program along with syntax coloring tools and indenting. First install vim editor.
+
Vim with the possibilities of compiling the code within the program along with syntax coloring tools and indenting. First install the [[vim]] editor, then go to this Lilypond website [http://lilypond.org/doc/v2.11/Documentation/user/lilypond-program/Vim-mode] and follow the instructions on how to enable the vim mode.
  
~# pacman -Syu vim
+
The next thing you need to do is enable the syntaxes. To do so edit {{ic|~/.vimrc}} with your favorite editor and after editing your file should look like this:
  
Go to this Lilypond website [http://lilypond.org/doc/v2.11/Documentation/user/lilypond-program/Vim-mode] and follow the instructions on how to enable the vim mode.
+
{{hc|~/.vimrc|2=
The next thing you need to do is enable the syntaxes. To do so edit ~/.vimrc with your favorite editor and after editing your file should look like this:
+
set runtimepath+=/usr/share/lilypond/2.12.3/vim/  
~# cat ~/.vimrc
+
syntax on " Turn on colors
set runtimepath+=/usr/share/lilypond/2.12.3/vim/  
+
filetype plugin on " Enables the ftplugin options
syntax on " Turn on colors
+
set autoindent " Automaticaly indent while writing.
filetype plugin on " Enables the ftplugin options
+
}}
set autoindent " Automaticaly indent while writing.
 
  
Now when you edit a *.ly file you can compile your code with <F5> button, open PDF viewer with <F6> and play midi with <F4> (using timidity).
+
Now when you edit a {{ic|*.ly}} file you can compile your code with {{ic|F5}} button, open PDF viewer with {{ic|F6}} and play midi with {{ic|F4}} (using timidity).
A configuration file is in `/usr/share/lilypond/2.12.3/vim/ftplugin/lilypond.vim` which is easy to customize.
+
A configuration file is in {{ic|/usr/share/lilypond/2.12.3/vim/ftplugin/lilypond.vim}} which is easy to customize.
  
 
Click-and-point using evince.
 
Click-and-point using evince.
Line 49: Line 49:
 
* Frescobaldi
 
* Frescobaldi
  
You can find it in AUR.
+
You can find it in [[AUR]].
  
 
* jEdit with lilyPondTools plugin.
 
* jEdit with lilyPondTools plugin.
  
~# pacman -S jedit
+
[[Install]] {{Pkg|jedit}} from the [[official repositories]].
  
Open jEdit and go to '''Plugins''' -> '''Plugin Manager'''. Select '''Install''' tab and click on LilyPondTools. Hit the '''Install''' button.
+
Open jEdit and go to ''Plugins > Plugin Manager''. Select the ''Install'' tab and click on ''LilyPondTools''. Hit the ''Install'' button.
  
 
=== Speed up writing notes ===
 
=== Speed up writing notes ===
  
LilyComp [http://lilycomp.sourceforge.net/] can be used to speed up writing notes. It requires python and tk. Lines 67 and 68 in lilycomp.py should be edited to enable deutsch.ly dictionary for sharp and flat symbols. It uses absolute notation (\relative is not used.)
+
LilyComp [http://lilycomp.sourceforge.net/] can be used to speed up writing notes. It requires [[python]] and tk. Lines 67 and 68 in {{ic|lilycomp.py}} should be edited to enable {{ic|deutsch.ly}} dictionary for sharp and flat symbols. It uses absolute notation (\relative is not used.)
  
=== More usefull info ===
+
=== More useful info ===
  
* For JEdit: Under plugins install '''LookAndFeel'''. You can find good stuff under Visual.
+
* For JEdit: Under plugins install ''LookAndFeel''. You can find good stuff under Visual.
For better usability my settings are: under '''Global Options''' -> '''Docking''' put the '''Console''' and '''Error List''' to ''right'' and '''LilyPond PDF preview''' to ''bottom'' under Docking position. Then under '''View''' push '''Alternate docked window placement''' and '''Alternate tool bar placement''' buttons.
+
For better usability my settings are: under ''Global Options > Docking'' put the ''Console'' and ''Error List'' to ''right'' and ''LilyPond PDF preview'' to ''bottom'' under ''Docking'' position. Then under ''View'' push ''Alternate docked window placement'' and ''Alternate tool bar placement'' buttons.
  
* For tutorial on how to use this software visit LilyPond [http://lilypond.org/] website.
+
* For a tutorial on how to use this software visit LilyPond [http://lilypond.org/] website.

Revision as of 03:01, 12 February 2015

Lilypond is a Free Software score writing application. Its input is a plain text file in the lilypond music writing format, and its output is in either postscript or Portable Document Format.

Installation

Install lilypond from the official repositories.

Example Score

Create a test file like:

test.ly
{
 c' e' g' e'
}

To compile it, use:

$ lilypond test.ly

It will create test.pdf and test.ps files that contain your score.

Tweaking

Which editor to use?

  • VIM

Vim with the possibilities of compiling the code within the program along with syntax coloring tools and indenting. First install the vim editor, then go to this Lilypond website [1] and follow the instructions on how to enable the vim mode.

The next thing you need to do is enable the syntaxes. To do so edit ~/.vimrc with your favorite editor and after editing your file should look like this:

~/.vimrc
set runtimepath+=/usr/share/lilypond/2.12.3/vim/ 
syntax on		" Turn on colors
filetype plugin on	" Enables the ftplugin options
set autoindent		" Automaticaly indent while writing.

Now when you edit a *.ly file you can compile your code with F5 button, open PDF viewer with F6 and play midi with F4 (using timidity). A configuration file is in /usr/share/lilypond/2.12.3/vim/ftplugin/lilypond.vim which is easy to customize.

Click-and-point using evince. [2]

  • Frescobaldi

You can find it in AUR.

  • jEdit with lilyPondTools plugin.

Install jedit from the official repositories.

Open jEdit and go to Plugins > Plugin Manager. Select the Install tab and click on LilyPondTools. Hit the Install button.

Speed up writing notes

LilyComp [3] can be used to speed up writing notes. It requires python and tk. Lines 67 and 68 in lilycomp.py should be edited to enable deutsch.ly dictionary for sharp and flat symbols. It uses absolute notation (\relative is not used.)

More useful info

  • For JEdit: Under plugins install LookAndFeel. You can find good stuff under Visual.

For better usability my settings are: under Global Options > Docking put the Console and Error List to right and LilyPond PDF preview to bottom under Docking position. Then under View push Alternate docked window placement and Alternate tool bar placement buttons.

  • For a tutorial on how to use this software visit LilyPond [4] website.