<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- header_tag --> <html lang="en"> <head> <title>Simultaneous notes - LilyPond snippets</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="description" content="LilyPond snippets"> <meta name="generator" content="makeinfo 4.11"> <link title="Top" rel="start" href="index.html#Top"> <link rel="prev" href="Repeats.html#Repeats" title="Repeats"> <link rel="next" href="Staff-notation.html#Staff-notation" title="Staff notation"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } hr { border:0; height:1; color: #000000; background-color: #000000; } /* hr { border: none; height: 1px; color: #666666; background-color: #666666; } body { border-left: 1px solid #666666; border-right: 1px solid #666666; color: #332d28; margin-right: auto; margin-left: auto; width: 60em; list-style-type: square; font-family: Arial,Helvetica,sans-serif; padding-right: 1em; padding-left: 1em; } a { border-bottom: 1px dashed #344242; text-decoration: none; color: #344242; } a:link { text-decoration: none; } a:visited { border-bottom: 1px dashed #666666; color: #666666; } a:active { border-bottom: 1px solid #00cccc; color: #00cccc; } a:hover { border-bottom: 1px solid #1d7b85; color: #1d7b85; } blockquote { border: 1px solid #cccccc; padding: 3px; width: 40em; } .node { border-left: 1px solid #666666; margin: -0.5em 0px 1em; padding: 2px 1px 0px; font-style: italic; } .node a { border: none; text-decoration: underline; font-style: normal; font-weight: bold; } .verbatim { font-family: "Courier New",Courier,monospace; } .unnumberedsubsubsec { font-size: large; color: #1d7b85; } .subsubheading { font-size: large; color: #3b220d; } .contents { border: 1px dashed #339999; margin: 3px 2em; list-style-type: square; padding-right: 1em; width: 40em; background-color: #fcfff9; } .contents a { border-bottom: 1px dashed #423d34; text-decoration: none; color: #423d34; } .contents a:visited { border-bottom: 1px dashed #666666; color: #666666; } .contents a:active { border-bottom: 1px solid #f0d86d; color: #f0d86d; } .contents a:hover { border-bottom: 1px solid #3b220d; color: #3b220d; } .menu { border-left: 1px dashed #339999; margin: 3px 2em 1em; list-style-type: square; padding-left: 1.4em; width: 40em; } .unnumbered { } h2 { font-size: x-large; color: #1d7b85; } */ --></style> </head> <BODY BGCOLOR=WHITE TEXT=BLACK> <div class="node"> <p> <a name="Simultaneous-notes"></a> Next: <a rel="next" accesskey="n" href="Staff-notation.html#Staff-notation">Staff notation</a>, Previous: <a rel="previous" accesskey="p" href="Repeats.html#Repeats">Repeats</a>, Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a> <hr> </div> <h2 class="unnumbered">Simultaneous notes</h2> <p>These snippets illustrate the Notation Reference, section <a href="../../../Documentation/user/lilypond/Simultaneous-notes.html#Simultaneous-notes">Simultaneous notes</a>. <p><a name="additional-voices-to-avoid-collisions.ly"></a> <h3 class="unnumberedsec">Additional voices to avoid collisions</h3> <p>In some instances of complex polyphonic music, additional voices are necessary to prevent collisions between notes. If more than four parallel voices are needed, additional voices can be added by defining a variable using the Scheme function <code>context-spec-music</code>. <pre class="verbatim"> voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice) \relative c'' { \time 3/4 \key d \minor \partial 2 << { \voiceOne a4. a8 e'4 e4. e8 f4 d4. c8 } \\ { \voiceThree f,2 bes4 a2 a4 s2 } \\ { \voiceFive s2 g4 g2 f4 f2 } \\ { \voiceTwo d2 d4 cis2 d4 bes2 } >> } </pre> <p> <a href="../c9/lily-6be42b3d.ly"> <img align="middle" border="0" src="../c9/lily-6be42b3d.png" alt="[image of music]"> </a> </p> <p><a name="changing-a-single-notes-size-in-a-chord.ly"></a> <h3 class="unnumberedsec">Changing a single note's size in a chord</h3> <p>Individual note heads in a chord can be modified with the <code>\tweak</code> command inside a chord, by altering the <code>font-size</code> property. <p>Inside the chord (within the brackets <code>< ></code>), before the note to be altered, place the <code>\tweak</code> command, followed by <code>#'font-size</code> and define the proper size like <code>#-2</code> (a tiny notehead). <pre class="verbatim"> \layout { ragged-right = ##t } \relative { <\tweak #'font-size #+2 c e g c \tweak #'font-size #-2 e>1^\markup { A tiny e }_\markup { A big c } } </pre> <p> <a href="../69/lily-7e4a3f0d.ly"> <img align="middle" border="0" src="../69/lily-7e4a3f0d.png" alt="[image of music]"> </a> </p> <p><a name="changing-partcombine-texts.ly"></a> <h3 class="unnumberedsec">Changing partcombine texts</h3> <p>When using the automatic part combining feature, the printed text for the solo and unison sections may be changed: <pre class="verbatim"> \new Staff << \set Staff.soloText = #"girl" \set Staff.soloIIText = #"boy" \set Staff.aDueText = #"together" \partcombine \relative c'' { g4 g r r a2 g } \relative c'' { r4 r a( b) a2 g } >> </pre> <p> <a href="../f7/lily-895dc057.ly"> <img align="middle" border="0" src="../f7/lily-895dc057.png" alt="[image of music]"> </a> </p> <p><a name="clusters.ly"></a> <h3 class="unnumberedsec">Clusters</h3> <p>Clusters are a device to denote that a complete range of notes is to be played. <pre class="verbatim"> \layout { ragged-right = ##t } fragment = \relative c' { c4 f <e d'>4 <g a>8 <e a> a4 c2 <d b>4 e2 c } << \new Staff \fragment \new Staff \makeClusters \fragment >> </pre> <p> <a href="../67/lily-7b23dbb9.ly"> <img align="middle" border="0" src="../67/lily-7b23dbb9.png" alt="[image of music]"> </a> </p> <p><a name="combining-two-parts-on-the-same-staff.ly"></a> <h3 class="unnumberedsec">Combining two parts on the same staff</h3> <p>The part combiner tool ( <code>\partcombine</code> command ) allows the combination of several different parts on the same staff. Text directions such as "solo" or "a2" are added by default; to remove them, simply set the property <code>printPartCombineTexts</code> to "false". For vocal scores (hymns), there is no need to add "solo"/"a2" texts, so they should be switched off. However, it might be better not to use it if there are any solos, as they won't be indicated. In such cases, standard polyphonic notation may be preferable. <p>This snippet presents the three ways two parts can be printed on a same staff: standard polyphony, <code>\partcombine</code> without texts, and <code>\partcombine</code> with texts. <pre class="verbatim"> musicUp = \relative c'' { \time 4/4 a4 c4.( g8) a4 | g4 e' g,( a8 b) | c b a2. } musicDown = \relative c'' { g4 e4.( d8) c4 | r2 g'4( f8 e) | d2 \stemDown a } \score { << << \new Staff { \set Staff.instrumentName = "Standard polyphony " << \musicUp \\ \musicDown >> } \new Staff \with { printPartCombineTexts = ##f } { \set Staff.instrumentName = "PartCombine without texts " \partcombine \musicUp \musicDown } \new Staff { \set Staff.instrumentName = "PartCombine with texts " \partcombine \musicUp \musicDown } >> >> \layout { indent = 6.0\cm \context { \Score \override SystemStartBar #'collapse-height = #30 } } } </pre> <p> <a href="../5e/lily-c79da8a0.ly"> <img align="middle" border="0" src="../5e/lily-c79da8a0.png" alt="[image of music]"> </a> </p> <p><a name="forcing-horizontal-shift-of-notes.ly"></a> <h3 class="unnumberedsec">Forcing horizontal shift of notes</h3> <p>When the typesetting engine cannot cope, the <code>force-hshift</code> property of the <code>NoteColumn</code> object can be used to override typesetting decisions. The measure units used here are staff spaces. <pre class="verbatim"> \relative c' << { <d g>2 <d g> } \\ { <b f'>2 \once \override NoteColumn #'force-hshift = #1.7 <b f'>2 } >> </pre> <p> <a href="../1b/lily-041be501.ly"> <img align="middle" border="0" src="../1b/lily-041be501.png" alt="[image of music]"> </a> </p> <p><a name="suppressing-warnings-for-clashing-note-columns.ly"></a> <h3 class="unnumberedsec">Suppressing warnings for clashing note columns</h3> <p>If notes from two voices with stems in the same direction are placed at the same position, and both voices have no shift or the same shift specified, the error message "warning: ignoring too many clashing note columns" will appear when compiling the LilyPond file. This message can be suppressed by setting the <code>'ignore-collision</code> property of the <code>NoteColumn</code> object to <code>#t</code>. <pre class="verbatim"> ignore = \override NoteColumn #'ignore-collision = ##t \relative c' << \ignore { \stemDown f2 g } \\ { c2 c, } >> </pre> <p> <a href="../28/lily-74c9287c.ly"> <img align="middle" border="0" src="../28/lily-74c9287c.png" alt="[image of music]"> </a> </p> <!-- footer_tag --><br><hr> <div class="node"> <p> Next: <a rel="next" accesskey="n" href="Staff-notation.html#Staff-notation">Staff notation</a>, Previous: <a rel="previous" accesskey="p" href="Repeats.html#Repeats">Repeats</a>, Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a> </div> <div style="background-color: #e8ffe8; padding: 2; border: #c0ffc0 1px solid;"> <p> <font size="-1"> This page is for LilyPond-2.11.57 (development-branch). <br> <address> Report errors to <a href="http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs">http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs</a>. </address> <br> Your <a href="http://lilypond.org/web/devel/participating/documentation-adding">suggestions for the documentation</a> are welcome. </font> </p> </div> </BODY></html>