Snippets.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
LilyPond The music typesetter Snippets The LilyPond development team ☛ ✟ This document shows a selected set of LilyPond snippets from the LilyPond Snippet Repository (http://lsr.di.unimi.it) (LSR). It is in the public domain. We would like to address many thanks to Sebastiano Vigna for maintaining LSR web site and database, and the University of Milano for hosting LSR. Please note that this document is not an exact subset of LSR: some snippets come from input/new LilyPond sources directory, and snippets from LSR are converted through convert-ly, as LSR is based on a stable LilyPond version, and this document is for version 2.22.1. Snippets are grouped by tags; tags listed in the table of contents match a section of LilyPond notation manual. Snippets may have several tags, and not all LSR tags may appear in this document. In the HTML version of this document, you can click on the file name or figure for each example to see the corresponding input file. ✡ ✠ ☛ ✟ For more information about how this manual fits with the other documentation, or to read this manual in other formats, see Section “Manuals” in General Information. If you are missing any manuals, the complete documentation can be found at http://lilypond.org/. ✡ ✠ This document has been placed in the public domain. For LilyPond version 2.22.1 i Table of Contents Pitches ................................................... ........... 1 Adding ambitus per voice ................................................... ............ 1 Adding an ottava marking to a single voice .............................................. 1 Aiken head thin variant noteheads................................................... .... 2 Altering the length of beamed stems................................................... .. 2 Ambitus after key signature ................................................... .......... 3 Ambitus with multiple voices................................................... ......... 3 Ambitus ................................................... ............................. 3 Applying note head styles depending on the step of the scale............................. 4 Automatically changing the stem direction of the middle note based on the melody ...... 5 Changing ottava text................................................... ................. 6 Changing the ambitus gap ................................................... ........... 6 Changing the interval of lines on the stave ............................................... 7 Clefs can be transposed by arbitrary amounts ........................................... 8 Coloring notes depending on their pitch ................................................. 8 Creating a sequence of notes on various pitches .......................................... 9 Creating custom key signatures................................................... ....... 9 Force a cancellation natural before accidentals .......................................... 10 Forcing a clef symbol to be displayed ................................................... 10 Generating random notes ................................................... ........... 11 Hiding accidentals on tied notes at the start of a new system ........................... 11 Keep change clefs full sized................................................... .......... 11 Makam example ................................................... .................... 12 Modifying the Ottava spanner slope ................................................... 12 Non-traditional key signatures ................................................... ...... 13 Numbers as easy note heads................................................... ......... 14 Orchestra choir and piano template ................................................... 15 Preventing extra naturals from being automatically added .............................. 18 Preventing natural signs from being printed when the key signature changes ............ 18 Quoting another voice with transposition ............................................... 19 Separating key cancellations from key signature changes ................................ 20 Transposing pitches with minimum accidentals ("Smart" transpose) .................... 20 Turkish Makam example ................................................... ............ 22 Tweaking clef properties ................................................... ............ 22 Using autochange with more than one voice ............................................ 24 Rhythms................................................... ........ 26 Adding beams, slurs, ties etc. when using tuplet and non-tuplet rhythms ............... 26 Adding drum parts ................................................... ................. 26 Adjusting grace note spacing ................................................... ........ 27 Aligning bar numbers ................................................... ............... 27 Alternative breve notes ................................................... ............. 28 Appoggiatura or grace note before a bar line ........................................... 28 Automatic beam subdivisions ................................................... ....... 29 Automatically change durations ................................................... ..... 29 Beam endings in Score context ................................................... ...... 30 Beams across line breaks ................................................... ............ 31 Changing beam knee gap ................................................... ........... 31 ii Changing form of multi-measure rests .................................................. 32 Changing the number of augmentation dots per note ................................... 32 Changing the tempo without a metronome mark ....................................... 32 Changing the tuplet number ................................................... ........ 33 Changing time signatures inside a polymetric section using \scaleDurations ............. 33 Chant or psalms notation ................................................... ........... 34 Compound time signatures ................................................... .......... 34 Conducting signs, measure grouping signs .............................................. 35 Consistently left aligned bar numbers .................................................. 36 Controlling tuplet bracket visibility................................................... .. 37 Creating metronome marks in markup mode ........................................... 38 Engraving ties manually ................................................... ............ 38 Engraving tremolos with floating beams ................................................ 38 Entering several tuplets using only one \tuplet command ............................... 39 Flat flags and beam nibs ................................................... ............ 40 Forcing rehearsal marks to start from a given letter or number.......................... 41 Generating custom flags................................................... ............. 41 Guitar strum rhythms ................................................... .............. 42 Heavily customized polymetric time signatures ......................................... 43 Making an object invisible with the ’transparent property .............................. 44 Making slurs with complex dash structure .............................................. 45 Manually controlling beam positions ................................................... 45 Merging multi-measure rests in a polyphonic part ...................................... 46 Modifying tuplet bracket length ................................................... ..... 46 Moving dotted notes in polyphony ................................................... .. 47 Multi-measure rest length control ................................................... ... 47 Multi-measure rest markup ................................................... ......... 48 Non-default tuplet numbers ................................................... ......... 48 Numbering single measure rests ................................................... ..... 49 Partcombine and autoBeamOff ................................................... ...... 50 Percussion example ................................................... ................. 50 Permitting line breaks within beamed tuplets........................................... 52 Positioning grace note beams at the height of normal note beams ....................... 52 Positioning grace notes with floating space ............................................. 53 Positioning multi-measure rests ................................................... ..... 53 Preventing final mark from removing final tuplet ....................................... 54 Printing bar numbers at regular intervals ............................................... 55 Printing bar numbers inside boxes or circles ............................................ 55 Printing bar numbers with changing regular intervals ................................... 56 Printing metronome and rehearsal marks below the staff ................................ 56 Printing music with different time signatures ........................................... 57 Printing the bar number for the first measure .......................................... 60 Redefining grace note global defaults ................................................... 61 Removing bar numbers from a score..................................................