### Build Contributors' Guide Section Example Source: https://lilypond.org/doc/v2.24/Documentation/contributor-big-page Example of building a specific section (doc-work) from the Contributors' Guide using the cg-section.sh script. ```bash scripts/auxiliar/cg-section.sh doc-work ``` -------------------------------- ### Relocation File Examples Source: https://lilypond.org/doc/v2.24/Documentation/usage-big-page.html Illustrates specific examples of relocation file entries using 'set?' and 'prependdir' commands. These examples show how to set environment variables, potentially overriding existing ones or prepending to directory lists. ```plaintext set? FONTCONFIG_FILE=$INSTALLER_PREFIX/etc/fonts/fonts.conf prependdir GUILE_LOAD_PATH=$INSTALLER_PREFIX/share/guile/1.8 ``` -------------------------------- ### LilyPond Music Notation Example Source: https://lilypond.org/doc/v2.24/Documentation/54/lily-94e25ed2.ly Demonstrates basic music notation with key and time signatures, and note durations. Ensure LilyPond is installed and configured to process .ly files. ```lilypond %% Generated by lilypond-book %% Options: [exampleindent=10.16\mm,fragment,indent=0\mm,line-width=160\mm,quote,relative=2] \include "lilypond-book-preamble.ly" % **************************************************************** % Start cut-&-pastable-section % **************************************************************** #(ly:set-option 'eps-box-padding 3.000000) \paper { indent = 0\mm line-width = 160\mm % offset the left padding, also add 1mm as lilypond creates cropped % images with a little space on the right line-width = #(- line-width (* mm 3.000000) (* mm 1)) line-width = 160\mm - 2.0 * 10.16\mm % offset the left padding, also add 1mm as lilypond creates cropped % images with a little space on the right line-width = #(- line-width (* mm 3.000000) (* mm 1)) } \layout { } \relative c'' { % **************************************************************** % ly snippet contents follows: % **************************************************************** \sourcefileline 1347 \key g \major \time 4/4 g4 c b a | g1 \bar "||" \time 3/8 g8 d' c | b c a | g4. \bar "||" % **************************************************************** % end ly snippet % **************************************************************** } ``` -------------------------------- ### Handle Missing Optional Documentation Dependencies Source: https://lilypond.org/doc/v2.24/Documentation/contributor/running-configure This is an example of a warning message when an optional program for building documentation is missing. Consider installing the listed programs if you intend to build documentation. ```text WARNING: Please consider installing optional programs: bar ``` -------------------------------- ### Install LilyPond with User Permissions Source: https://lilypond.org/doc/v2.24/Documentation/contributor/installing-lilypond-from-a-local-build Run this command when the installation directory is writable by the current user. This is the standard installation command after a local build. ```bash make install ``` -------------------------------- ### Install Documentation Levels Source: https://lilypond.org/doc/v2.24/Documentation/contributor/generating-documentation Commands to install documentation at different levels of complexity. ```bash make && make install ``` ```bash make && make info && make install-info ``` ```bash make && make doc && make install-doc ``` -------------------------------- ### Install Make on OpenSUSE Source: https://lilypond.org/doc/v2.24/Documentation/contributor-big-page Installs the 'make' utility, a fundamental build tool required for compiling software on OpenSUSE. ```bash sudo zypper install make ``` -------------------------------- ### Install LilyPond Documentation Source: https://lilypond.org/doc/v2.24/Documentation/contributor-big-page Install HTML, PDF, and Info files to the standard documentation path. This command also installs Info documentation with images. ```bash make install-doc ``` -------------------------------- ### Install LilyPond with Superuser Privileges Source: https://lilypond.org/doc/v2.24/Documentation/contributor-big-page Use 'sudo make install' or 'su -c 'make install'' when the installation directory requires superuser permissions. ```bash make install ``` ```bash sudo make install ``` ```bash su -c 'make install' ``` -------------------------------- ### Install LilyPond Documentation Source: https://lilypond.org/doc/v2.24/Documentation/contributor/generating-documentation Installs HTML, PDF, and Info files into the standard documentation path. The 'install-doc' target also installs Info documentation with images by creating symbolic links. Use 'install-info' to copy images separately. ```makefile make install-doc ``` ```makefile make install-info ``` -------------------------------- ### Example of calling display-ancestry Source: https://lilypond.org/doc/v2.24/Documentation/2d/lily-6724756c.ly This example demonstrates how to call the \`display-ancestry\` macro with a \`NoteHead\` grob to visualize its lineage. ```scheme { \once \override NoteHead.before-line-breaking = #display-ancestry c } ``` -------------------------------- ### Example .gdbinit Configuration Source: https://lilypond.org/doc/v2.24/Documentation/contributor-big-page A sample .gdbinit file that sets breakpoints for errors and defines custom commands for inspecting Scheme objects, grobs, and music expressions. ```gdb file $LILYPOND_GIT/build/out/bin/lilypond b programming_error b Grob::programming_error define ps print ly_display_scm($arg0) end define pgrob print ly_display_scm($arg0->self_scm_) print ly_display_scm($arg0->mutable_property_alist_) print ly_display_scm($arg0->immutable_property_alist_) print ly_display_scm($arg0->object_alist_) end define pmusic print ly_display_scm($arg0->self_scm_) print ly_display_scm($arg0->mutable_property_alist_) print ly_display_scm($arg0->immutable_property_alist_) end ``` -------------------------------- ### Minimal LilyPond File Example Source: https://lilypond.org/doc/v2.24/Documentation/learning/command-line-setup.html A basic LilyPond file to test your installation. This snippet compiles a single musical note. ```lilypond \version "2.24.4" { c' } ``` -------------------------------- ### Relocation File Examples Source: https://lilypond.org/doc/v2.24/Documentation/usage/command_002dline-usage.html Example entries for setting environment variables within a relocation file, utilizing the $INSTALLER_PREFIX variable. ```text set? FONTCONFIG_FILE=$INSTALLER_PREFIX/etc/fonts/fonts.conf prependdir GUILE_LOAD_PATH=$INSTALLER_PREFIX/share/guile/1.8 ``` -------------------------------- ### Get Consecutive Pitches Source: https://lilypond.org/doc/v2.24/Documentation/snippets/chords Extracts consecutive pitches from a list based on a starting number and a condition related to pitch numbers. ```Scheme (define (get-consecutive nr pitches) (if (pair? pitches) (let* ((pitch-nr (step-nr (car pitches))) (next-nr (if (!= (modulo pitch-nr 2) 0) (+ pitch-nr 2) nr))) (if (<= pitch-nr nr) (cons (car pitches) (get-consecutive next-nr (cdr pitches))) '())) '())) ``` -------------------------------- ### View All configure Options Source: https://lilypond.org/doc/v2.24/Documentation/contributor/running-configure Run this command to see all available configuration options for the `configure` script. Ensure you are in the `build/` subdirectory. ```bash ../configure --help ``` -------------------------------- ### Handle Missing Build Dependencies Source: https://lilypond.org/doc/v2.24/Documentation/contributor/running-configure This is an example of an error message when a required program for compilation is missing. You will need to install the listed programs. ```text ERROR: Please install required programs: foo ``` -------------------------------- ### Run Setup Script Source: https://lilypond.org/doc/v2.24/Documentation/contributor/lilydev Execute the setup script to configure git and download necessary repositories for building LilyPond. This is an interactive script. ```bash ./setup.sh ``` -------------------------------- ### Get Full List of Pitches Source: https://lilypond.org/doc/v2.24/Documentation/snippets/chords Recursively generates a list of pitches starting from a given pitch, advancing by thirds until a condition is met. ```Scheme (define (get-full-list pitch) (if (<= (step-nr pitch) (step-nr (last pitches))) (cons pitch (get-full-list (next-third pitch))) '())) ``` -------------------------------- ### LilyPond Pitched Trills Example Source: https://lilypond.org/doc/v2.24/Documentation/bf/lily-3503013f.ly Demonstrates how to create pitched trills in LilyPond. This snippet shows the syntax for starting and stopping trill spans with specific notes. ```lilypond { \key d \major \pitchedTrill d'2\startTrillSpan cis d\stopTrillSpan \pitchedTrill d2\startTrillSpan c d\stopTrillSpan \pitchedTrill d2\startTrillSpan e d\stopTrillSpan } ``` -------------------------------- ### Build Online Documentation for Website Source: https://lilypond.org/doc/v2.24/Documentation/contributor-big-page Create a documentation tree in 'out-www/online-root/' for website use with content negotiation for automatic language selection. ```bash make WEB_TARGETS=online doc ``` -------------------------------- ### Basic Violin Clef and Note in LilyPond Source: https://lilypond.org/doc/v2.24/Documentation/bb/lily-2d240373.ly Sets the violin clef and plays a C note for one measure. This is a fundamental example for starting musical notation. ```lilypond \clef violin c1 ``` -------------------------------- ### Basic Music Notation in LilyPond Source: https://lilypond.org/doc/v2.24/Documentation/99/lily-ddd9276f.ly A simple example demonstrating basic note input and line breaks in LilyPond. Use this to start creating musical scores. ```lilypond \relative c'' { c4 c c c | \break c4 c c c | } ``` -------------------------------- ### Prepare the build directory Source: https://lilypond.org/doc/v2.24/Documentation/contributor/compiling-with-lilydev Initializes the build environment by running autogen and configure scripts. ```bash cd $LILYPOND_GIT sh autogen.sh --noconfigure mkdir -p build/ cd build/ ../configure ``` -------------------------------- ### Basic Musical Notation in LilyPond Source: https://lilypond.org/doc/v2.24/Documentation/04/lily-25881d83.ly Defines a tenor G clef and a single C note lasting a whole measure. This is a fundamental example for starting musical scores. ```lilypond \clef tenorG c1 ``` -------------------------------- ### Get Context Name Symbol in LilyPond Source: https://lilypond.org/doc/v2.24/Documentation/internals/scheme-functions Returns the name of the context as a symbol. For example, for `\context Voice = "one" ...`, it returns the symbol `Voice`. ```lilypond ly:context-name context ``` -------------------------------- ### Build Specific Documentation Section (Manual) Source: https://lilypond.org/doc/v2.24/Documentation/contributor-big-page Use this script to build a single section of the manual. Specify the manual name and the section filename. Ensure the 'build/' subdirectory exists. ```bash scripts/auxiliar/doc-section.sh MANUAL SECTION ``` -------------------------------- ### Initial Regression Test Setup Source: https://lilypond.org/doc/v2.24/Documentation/contributor/verify-regression-tests Run this command to establish the baseline for regression tests. Use 'make clean' if needed before running. ```bash make clean _## when needed (see below)_ make [-jX CPU_COUNT=X] test-baseline ``` -------------------------------- ### Get Help Source: https://lilypond.org/doc/v2.24/Documentation/usage/invoking-musicxml2ly.ca.html Use the -h or --help option to display usage information and a summary of command-line options. ```bash musicxml2ly -h ``` -------------------------------- ### Install LilyPond Info Documentation Separately Source: https://lilypond.org/doc/v2.24/Documentation/contributor-big-page Install only the Info documentation. Note that 'install-doc' creates symbolic links for images to save disk space, while 'install-info' copies them. ```bash make install-info ``` -------------------------------- ### LilyPond Music Notation Snippet Source: https://lilypond.org/doc/v2.24/Documentation/16/lily-42e79084.ly A basic example of music notation in LilyPond, demonstrating relative pitch and tied notes. Ensure LilyPond is installed and configured to render this snippet. ```lilypond \relative { c''4(~ c8 d~ 4 e) } ``` -------------------------------- ### Build Manual and Post-Process for Web Source: https://lilypond.org/doc/v2.24/Documentation/contributor/generating-documentation Builds the manual without compiling extensive 'input/*' regression tests. After building documentation in 'out-www', run 'make out=www WWW-post' from the top directory to post-process for web browsing. ```makefile make doc ``` ```makefile make out=www WWW-post ``` -------------------------------- ### Basic Music Notation with F Clef in LilyPond Source: https://lilypond.org/doc/v2.24/Documentation/c6/lily-30534dba.ly Defines a musical passage starting with an F clef and a single note 'c'. This is a fundamental example of LilyPond syntax for notation. ```lilypond \relative c' { \clef F c1 } ``` -------------------------------- ### LilyPond Slur and Beam Nesting Example Source: https://lilypond.org/doc/v2.24/Documentation/learning/on-the-un_002dnestedness-of-brackets-and-ties.html Demonstrates a phrasing slur starting before a manual beam and ending before the beam's end. This showcases that not all bracket-like constructs require strict nesting. ```lilypond \relative { g'8\( a b\[ c b\) a] g4 } ``` -------------------------------- ### Initialize build directory Source: https://lilypond.org/doc/v2.24/Documentation/contributor/running-autogen_002esh Commands to navigate to the source directory and create a separate build directory. ```bash cd lilypond/ mkdir build/ cd build/ ``` -------------------------------- ### Add Alto Clef and Note in LilyPond Source: https://lilypond.org/doc/v2.24/Documentation/c6/lily-5b036962.ly Specifies the alto clef (C clef on the third line) and a single C note in the score. This is a fundamental example for starting musical phrases. ```lilypond \relative c' { \clef altovarC c1 } ``` -------------------------------- ### Get Context ID String in LilyPond Source: https://lilypond.org/doc/v2.24/Documentation/internals/scheme-functions Returns the ID string of a LilyPond context. For example, for `\context Voice = "one" ...`, it returns the string `"one"`. ```lilypond ly:context-id context ``` -------------------------------- ### Handle Missing Dependencies Source: https://lilypond.org/doc/v2.24/Documentation/contributor-big-page Example output messages displayed when required or optional build programs are missing. ```text ERROR: Please install required programs: foo ``` ```text WARNING: Please consider installing optional programs: bar ``` -------------------------------- ### TimeScaledMusic Source: https://lilypond.org/doc/v2.24/Documentation/internals-big-page Used to multiply durations, typically for tuplets. The syntax is `\times fraction music`, for example, `\times 2/3 { … }` for triplets. It includes properties for iterator construction, length calculation, and start callbacks. ```APIDOC ## TimeScaledMusic ### Description Multiply durations, as in tuplets. ### Syntax `\times fraction music`, e.g., `\times 2/3 { … }` for triplets. ### Properties - **iterator-ctor** (procedure) - `ly:tuplet-iterator::constructor` - Function to construct a `music-event-iterator` object for this music. - **length-callback** (procedure) - `ly:music-wrapper::length-callback` - How to compute the duration of this music. This property can only be defined as initializer in ‘`scm/define-music-types.scm`’. - **name** (symbol) - `'TimeScaledMusic` - Name of this music object. - **start-callback** (procedure) - `ly:music-wrapper::start-callback` - Function to compute the negative length of starting grace notes. This property can only be defined as initializer in ‘`scm/define-music-types.scm`’. - **types** (list) - `'(time-scaled-music)` - The types of this music object; determines by what engraver this music expression is processed. ``` -------------------------------- ### Demonstrate Context Alignment Source: https://lilypond.org/doc/v2.24/Documentation/d3/lily-12eb0542.ly Examples showing how different contexts align to their respective baselines. ```lilypond << \new ChordNames { \chords { \labelContext "ChordNames" g1:m } } \new NoteNames { s1 |\labelContext "NoteNames" g1 | } \new Lyrics { \lyrics { \skip 1*2 | \labelContext "Lyrics" ghijk1 | } } \new RhythmicStaff \with { instrumentName = "ligne de base (baseline) " } s1*3 >> << \new Dynamics { \labelContext "Dynamics" s1\mp s\fp } \new RhythmicStaff \with { instrumentName = "mi-hauteur " } s1*3 >> << \new FiguredBass { \labelContext "FiguredBass" \figuremode { <6 5>1 } } \new RhythmicStaff \with { instrumentName = "point le plus haut " } s1 >> \include "predefined-guitar-fretboards.ly" << \new FretBoards { \labelContext "FretBoards" \chordmode { e1 } } \new RhythmicStaff \with { instrumentName = "ligne du haut " } s1 >> ``` -------------------------------- ### Change Default Bar Lines in LilyPond Source: https://lilypond.org/doc/v2.24/Documentation/snippets/repeats.html Customizes the default bar lines (normal, start repeat, end repeat, double repeat) by redefining them within the Score context. This snippet also includes an example of its usage with repeat structures. ```lilypond % http://lsr.di.unimi.it/LSR/Item?id=964 %%=> http://lists.gnu.org/archive/html/lilypond-user/2014-03/msg00126.html %%=> http://lilypond.1069038.n5.nabble.com/Changing-the-default-end-repeat-bracket-tc169357.html \layout { \context { \Score %% Changing the defaults from engraver-init.ly measureBarType = #"!" startRepeatBarType = #"[|:" endRepeatBarType = #":|]" doubleRepeatBarType = #":|][|:" } } %% example: { c'1 \repeat volta 2 { \repeat unfold 2 c' } \repeat volta 2 { \repeat unfold 2 c' } \alternative { { c' } { %% v2.18 workaround \once\override Score.VoltaBracket.shorten-pair = #'(1 . -1) c' } } \bar "|." } ``` -------------------------------- ### Install Git on OpenSUSE Source: https://lilypond.org/doc/v2.24/Documentation/contributor-big-page Installs the 'git' version control system. Recommended if you plan to contribute to the LilyPond codebase or documentation. ```bash sudo zypper install git ``` -------------------------------- ### Makefile for GNU/Linux and MacOS X Source: https://lilypond.org/doc/v2.24/Documentation/usage-big-page.hu.html A Makefile example for GNU/Linux and MacOS X systems. It defines variables for LilyPond commands and output directories, and sets up rules for generating PDF and MIDI files from LilyPond sources. Note that command lines must start with tabs, not spaces. ```makefile # the name stem of the output files piece := symphony # The command to run lilypond LILY_CMD := lilypond -ddelete-intermediate-files \ -dno-point-and-click # The suffixes used in this Makefile. .SUFFIXES: .ly .ily .pdf .midi .DEFAULT_GOAL := score PDFDIR := PDF MIDIDIR := MIDI # Input and output files are searched in the directories listed in # the VPATH variable. All of them are subdirectories of the current # directory (given by the GNU make variable `CURDIR'). VPATH := \ $(CURDIR)/Scores \ $(CURDIR)/Parts \ $(CURDIR)/Notes \ $(CURDIR)/$(PDFDIR) \ $(CURDIR)/$(MIDIDIR) # The pattern rule to create PDF and MIDI files from a LY input file. # The .pdf output files are put into the `PDF' subdirectory, and the # .midi files go into the `MIDI' subdirectory. %.pdf %.midi: %.ly | $(PDFDIR) $(MIDIDIR) $(LILY_CMD) $< # this line begins with a tab mv "$*.pdf" $(PDFDIR)/ # this line begins with a tab mv "$*.midi" $(MIDIDIR)/ # this line begins with a tab $(PDFDIR): mkdir $(PDFDIR) $(MIDIDIR): mkdir $(MIDIDIR) common := symphonyDefs.ily notes := \ cello.ily \ horn.ily \ oboe.ily \ viola.ily \ violinOne.ily \ violinTwo.ily # The dependencies of the movements. $(piece)I.pdf: $(piece)I.ly $(notes) $(common) $(piece)II.pdf: $(piece)II.ly $(notes) $(common) $(piece)III.pdf: $(piece)III.ly $(notes) $(common) $(piece)IV.pdf: $(piece)IV.ly $(notes) $(common) # The dependencies of the full score. $(piece).pdf: $(piece).ly $(notes) $(common) # The dependencies of the parts. $(piece)-cello.pdf: $(piece)-cello.ly cello.ily $(common) $(piece)-horn.pdf: $(piece)-horn.ly horn.ily $(common) $(piece)-oboe.pdf: $(piece)-oboe.ly oboe.ily $(common) $(piece)-viola.pdf: $(piece)-viola.ly viola.ily $(common) $(piece)-violinOne.pdf: $(piece)-violinOne.ly violinOne.ily $(common) $(piece)-violinTwo.pdf: $(piece)-violinTwo.ly violinTwo.ily $(common) # Type `make score' to generate the full score of all four ``` -------------------------------- ### Build Documentation Targets Source: https://lilypond.org/doc/v2.24/Documentation/contributor/generating-documentation Standard commands for building full documentation or specific formats. ```bash make doc ``` ```bash make -C Documentation out=www pdf ``` ```bash make LANGS='en' doc ``` ```bash make LANGS='de fr' doc ``` ```bash make info ``` -------------------------------- ### LilyPond Chord Names and Fretboard Diagrams Source: https://lilypond.org/doc/v2.24/Documentation/d4/lily-3d7e68be.ly This snippet demonstrates how to display chord names above a musical staff and render corresponding fretboard diagrams. It includes examples of basic chords, chords with capos, and custom fret markings with colors and labels. Ensure LilyPond is installed and configured to use these commands. ```lilypond << \new ChordNames { \chordmode { f1 g c c b } } \new Staff { \clef "treble_8" \override Voice.TextScript .fret-diagram-details.finger-code = #'below-string 1^\markup { \fret-diagram-verbose #'( (place-fret 6 1) (place-fret 5 3) (place-fret 4 3) (place-fret 3 2) (place-fret 2 1) (place-fret 1 1) (barre 6 1 1) ) } 1^\markup { \fret-diagram-verbose #'( (place-fret 6 3 2) (place-fret 5 2 1) (open 4) (open 3) (open 2) (place-fret 1 3 3) ) } 1^\markup { \fret-diagram-verbose #'( (capo 3) (mute 6) (place-fret 4 5 1) (place-fret 3 5 2) (place-fret 2 5 3) ) } \override Voice.TextScript.size = 1.4 1^\markup { \fret-diagram-verbose #'( (place-fret 6 3 1 red parenthesized default-paren-color) (place-fret 5 3 1 inverted) (place-fret 4 5 2 blue parenthesized) (place-fret 3 5 3 blue) (place-fret 2 5 4 blue) (place-fret 1 3 1 inverted) ) } \override Voice.TextScript.size = 1.5 1^\ \override #'(fret-diagram-details . ((finger-code . in-dot))) \fret-diagram-verbose #`( (place-fret 5 2 1) (place-fret 4 4 "fis" red) (place-fret 3 4 "b" red) (place-fret 2 4 ,#{ \markup \concat { \vcenter "d" \fontsize #-5 \musicglyph "accidentals.sharp"} #} red) (place-fret 1 2 1) ) } >> ``` -------------------------------- ### LilyPond Mensural Music Transcription Example Source: https://lilypond.org/doc/v2.24/Documentation/learning-big-page.cs.html This snippet demonstrates a full LilyPond score for transcribing mensural music. It includes setup for global settings, incipits for different voices (Discantus, Altus, Tenor, Bassus), musical notes, lyrics, and score layout configurations. Note the use of ` ecursiveGroup` and ` ecursiveStaff` for nested staff groups, and ` ecursiveVoice` for nested voices. ```lilypond %% With 2.23. this throws: %% programming error: Loose column does not have right side to attach to. %% Likely "Hidden BarLine during note yields programming error" %% https://gitlab.com/lilypond/lilypond/-/issues/4084 %% --Harm %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % A short excerpt from the Jubilate Deo by Orlande de Lassus %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% global = { \set Score.skipBars = ##t \key g \major \time 4/4 % the actual music \skip 1*8 % let finis bar go through all staves \override Staff.BarLine.transparent = ##f % finis bar \bar "|." } discantusIncipit = { \clef "neomensural-c1" \key f \major \time 2/2 c''1. } discantusNotes = { \transpose c' c'' { \clef "treble" d'2. d'4 | b e' d'2 | c'4 e'4.( d'8 c' b | a4) b a2 | b4.( c'8 d'4) c'4 | \once \hide NoteHead c'1 | b\breve | } } discantusLyrics = \lyricmode { Ju -- bi -- la -- te De -- o, om -- nis ter -- ra, __ om- "..." -us. } altusIncipit = { \clef "neomensural-c3" \key f \major \time 2/2 r1 f'1. } altusNotes = { \transpose c' c'' { \clef "treble" r2 g2. e4 fis g | a2 g4 e | fis g4.( fis16 e fis4) | g1 | \once \hide NoteHead g1 | g\breve | } } altusLyrics = \lyricmode { Ju -- bi -- la -- te De -- o, om -- nis ter -- ra, "..." -us. } tenorIncipit = { \clef "neomensural-c4" \key f \major \time 2/2 r\longa r\breve r1 c'1. } tenorNotes = { \transpose c' c' { \clef "treble_8" R1 | R1 | R1 | % two measures r2 d'2. d'4 b e' | \once \hide NoteHead e'1 | d'\breve | } } tenorLyrics = \lyricmode { Ju -- bi -- la -- te "..." -us. } bassusIncipit = { \clef "mensural-f" \key f \major \time 2/2 r\maxima f1. } bassusNotes = { \transpose c' c' { \clef "bass" R1 | R1 | R1 | R1 | g2. e4 | \once \hide NoteHead e1 | g\breve | } } bassusLyrics = \lyricmode { Ju -- bi- "..." -us. } \score { << \new StaffGroup = choirStaff << \new Voice = "discantusNotes" << \set Staff.instrumentName = "Discantus" \incipit \discantusIncipit \global \discantusNotes >> \new Lyrics \lyricsto discantusNotes { \discantusLyrics } \new Voice = "altusNotes" << \set Staff.instrumentName = "Altus" \global \incipit \altusIncipit \altusNotes >> \new Lyrics \lyricsto altusNotes { \altusLyrics } \new Voice = "tenorNotes" << \set Staff.instrumentName = "Tenor" \global \incipit \tenorIncipit \tenorNotes >> \new Lyrics \lyricsto tenorNotes { \tenorLyrics } \new Voice = "bassusNotes" << \set Staff.instrumentName = "Bassus" \global \incipit \bassusIncipit \bassusNotes >> \new Lyrics \lyricsto bassusNotes { \bassusLyrics } >> >> \layout { \context { \Score %% no bar lines in staves or lyrics \hide BarLine } %% the next two instructions keep the lyrics between the bar lines \context { \Lyrics \consists "Bar_engraver" \consists "Separating_line_group_engraver" } \context { \Voice %% no slurs \hide Slur %% Comment in the below "\remove" command to allow line %% breaking also at those bar lines where a note overlaps %% into the next measure. The command is commented out in this %% short example score, but especially for large scores, you %% will typically yield better line breaking and thus improve %% overall spacing if you comment in the following command. %% emove "Forbid_line_break_engraver" } indent = 6\cm incipit-width = 4\cm } } ``` -------------------------------- ### Demonstrate Context Reference Points Source: https://lilypond.org/doc/v2.24/Documentation/66/lily-daa65de0.ly Examples showing how different contexts align relative to their reference points. ```lilypond << \new ChordNames { \chords { \labelContext "ChordNames" g1:m } } \new NoteNames { s1 |\labelContext "NoteNames" g1 | } \new Lyrics { \lyrics { \skip 1*2 | \labelContext "Lyrics" ghijk1 | } } \new RhythmicStaff \with { instrumentName = "baseline " } s1*3 >> << \new Dynamics { \labelContext "Dynamics" s1\mp s\fp } \new RhythmicStaff \with { instrumentName = "mid-height " } s1*3 >> << \new FiguredBass { \labelContext "FiguredBass" \figuremode { <6 5>1 } } \new RhythmicStaff \with { instrumentName = "highest point " } s1 >> \include "predefined-guitar-fretboards.ly" << \new FretBoards { \labelContext "FretBoards" \chordmode { e1 } } \new RhythmicStaff \with { instrumentName = "top line " } s1 >> ``` -------------------------------- ### View the documentation Source: https://lilypond.org/doc/v2.24/Documentation/contributor/compiling-with-lilydev Opens the generated documentation in the Firefox browser. ```bash firefox $LILYPOND_GIT/build/out-www/offline-root/index.html ``` -------------------------------- ### Non-Minimal LilyPond Example Source: https://lilypond.org/doc/v2.24/Documentation/web/tiny-examples.nl.html This example is provided to illustrate what is NOT a minimal LilyPond example. It includes more musical context than necessary for demonstrating a specific issue. ```lilypond \version "2.14.1" \include "english.ly" \score { \new Staff { \key d \major \numericTimeSignature \time 2/4 16 8. %% Here: the tie on the D's looks funny %% Too tall? Left-hand endpoint is not aligned with the B tie? ~ 8 [ ] } } ``` -------------------------------- ### Install Perl Module with cpanm Source: https://lilypond.org/doc/v2.24/Documentation/contributor/the-makelsr_002epl-script Use this command to download, compile, and install Perl modules. The --sudo option installs modules system-wide. ```bash cpanm --sudo Parallel::ForkManager ``` -------------------------------- ### View Makefile Help Source: https://lilypond.org/doc/v2.24/Documentation/contributor/generating-documentation Access an overview of available targets for documentation maintenance and build cleaning. Run from any directory in the build tree. ```makefile make help ``` -------------------------------- ### Install LilyPond with Superuser Permissions (sudo) Source: https://lilypond.org/doc/v2.24/Documentation/contributor/installing-lilypond-from-a-local-build Use this command when the installation directory requires superuser privileges, such as '/usr/local/'. It temporarily elevates permissions for the installation process. ```bash sudo make install ``` -------------------------------- ### Build Online Docs and Website Source: https://lilypond.org/doc/v2.24/Documentation/contributor/debugging-website-and-docs-locally Use these make commands to build all language variants of the website and online documentation. To save time, you can specify specific languages with WEB_LANGS. ```bash make WEB_TARGETS="offline online" doc make website ``` ```bash make WEB_LANGS='' website ``` ```bash make WEB_LANGS='fr' website ``` -------------------------------- ### Build Specific Documentation Section (Contributors' Guide) Source: https://lilypond.org/doc/v2.24/Documentation/contributor-big-page Use this script to build a single section of the Contributors' Guide. Specify the section filename. This script has different usage than the general manual builder. ```bash scripts/auxiliar/cg-section.sh SECTION ``` -------------------------------- ### Install LilyPond with Superuser Permissions (su) Source: https://lilypond.org/doc/v2.24/Documentation/contributor/installing-lilypond-from-a-local-build An alternative to 'sudo make install' for executing the installation command with superuser privileges. This method is useful in environments where 'sudo' is not available or preferred. ```bash su -c 'make install' ```