<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- header_tag --> <html lang="en"> <head> <title>Unfretted strings - 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="Fretted-strings.html#Fretted-strings" title="Fretted strings"> <link rel="next" href="Winds.html#Winds" title="Winds"> <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="Unfretted-strings"></a> Next: <a rel="next" accesskey="n" href="Winds.html#Winds">Winds</a>, Previous: <a rel="previous" accesskey="p" href="Fretted-strings.html#Fretted-strings">Fretted strings</a>, Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a> <hr> </div> <h2 class="unnumbered">Unfretted strings</h2> <p>These snippets illustrate the Notation Reference, section <a href="../../../Documentation/user/lilypond/Unfretted-string-instruments.html#Unfretted-string-instruments">Unfretted string instruments</a>. <p><a name="changing--flageolet-mark-size.ly"></a> <h3 class="unnumberedsec">Changing \flageolet mark size</h3> <p>To make the <code>\flageolet</code> circle smaller use the following Scheme function. <pre class="verbatim"> smallFlageolet = #(let ((m (make-music 'ArticulationEvent 'articulation-type "flageolet"))) (set! (ly:music-property m 'tweaks) (acons 'font-size -3 (ly:music-property m 'tweaks))) m) \layout { ragged-right = ##f } \relative c'' { d4^\flageolet_\markup { default size } d_\flageolet c4^\smallFlageolet_\markup { smaller } c_\smallFlageolet } </pre> <p> <a href="../f0/lily-49d06399.ly"> <img align="middle" border="0" src="../f0/lily-49d06399.png" alt="[image of music]"> </a> </p> <p><a name="creating-slurs-across-voices.ly"></a> <h3 class="unnumberedsec">Creating slurs across voices</h3> <p>In some situations, it may be necessary to create slurs between notes from different voices. <p>The solution is to add invisible notes to one of the voices, using <code>\hideNotes</code>. <p>This example is measure 235 of the Ciaconna from Bach's 2nd Partita for solo violin, BWV 1004. <pre class="verbatim"> \relative c' { << { d16( a') s a s a[ s a] s a[ s a] } \\ { \slurUp bes,16[ s e]( \hideNotes a) \unHideNotes f[( \hideNotes a) \unHideNotes fis]( \hideNotes a) \unHideNotes g[( \hideNotes a) \unHideNotes gis]( \hideNotes a) } >> } </pre> <p> <a href="../ce/lily-e9383e5e.ly"> <img align="middle" border="0" src="../ce/lily-e9383e5e.png" alt="[image of music]"> </a> </p> <p><a name="demo-midiinstruments.ly"></a> <h3 class="unnumberedsec">Demo MidiInstruments</h3> <p>Problem: How to know which <code>midiInstrument</code> would be best for your composition? Solution: A LilyPond demo file. <pre class="verbatim"> \header { title = "Demo of all midi sounds" arranger = "Myself " } basemelodie = \relative c' { c4. \mf g c16 b' c d e16 d e f g4 g'4 r R1 } melodie = { \tempo 4 = 150 \basemelodie } \score { \new Staff << \new Voice { \melodie } >> \layout { } } \score { \new Staff << %\set Staff.instrumentName= #"S/A" %\set Staff.midiMinimumVolume = #0.2 %\set Staff.midiMaximumVolume = #0.4 %\set Voice.dynamicAbsoluteVolumeFunction = #0.6 \new Voice { r \mf \set Staff.midiInstrument = #"acoustic grand" \melodie \set Staff.midiInstrument = #"bright acoustic" \melodie \set Staff.midiInstrument = #"electric grand" \melodie \set Staff.midiInstrument = #"honky-tonk" \melodie \set Staff.midiInstrument = #"electric piano 1" \melodie \set Staff.midiInstrument = #"electric piano 2" \melodie \set Staff.midiInstrument = #"harpsichord" \melodie \set Staff.midiInstrument = #"clav" \melodie \set Staff.midiInstrument = #"celesta" \melodie \set Staff.midiInstrument = #"glockenspiel" \melodie \set Staff.midiInstrument = #"music box" \melodie \set Staff.midiInstrument = #"vibraphone" \melodie \set Staff.midiInstrument = #"marimba" \melodie \set Staff.midiInstrument = #"xylophone" \melodie \set Staff.midiInstrument = #"tubular bells" \melodie \set Staff.midiInstrument = #"dulcimer" \melodie \set Staff.midiInstrument = #"drawbar organ" \melodie \set Staff.midiInstrument = #"percussive organ" \melodie \set Staff.midiInstrument = #"rock organ" \melodie \set Staff.midiInstrument = #"church organ" \melodie \set Staff.midiInstrument = #"reed organ" \melodie \set Staff.midiInstrument = #"accordion" \melodie \set Staff.midiInstrument = #"harmonica" \melodie \set Staff.midiInstrument = #"concertina" \melodie \set Staff.midiInstrument = #"acoustic guitar (nylon)" \melodie \set Staff.midiInstrument = #"acoustic guitar (steel)" \melodie \set Staff.midiInstrument = #"electric guitar (jazz)" \melodie \set Staff.midiInstrument = #"electric guitar (clean)" \melodie \set Staff.midiInstrument = #"electric guitar (muted)" \melodie \set Staff.midiInstrument = #"overdriven guitar" \melodie \set Staff.midiInstrument = #"distorted guitar" \melodie \set Staff.midiInstrument = #"acoustic bass" \melodie \set Staff.midiInstrument = #"electric bass (finger)" \melodie \set Staff.midiInstrument = #"electric bass (pick)" \melodie \set Staff.midiInstrument = #"fretless bass" \melodie \set Staff.midiInstrument = #"slap bass 1" \melodie \set Staff.midiInstrument = #"slap bass 2" \melodie \set Staff.midiInstrument = #"synth bass 1" \melodie \set Staff.midiInstrument = #"synth bass 2" \melodie \set Staff.midiInstrument = #"violin" \melodie \set Staff.midiInstrument = #"viola" \melodie \set Staff.midiInstrument = #"cello" \melodie \set Staff.midiInstrument = #"contrabass" \melodie \set Staff.midiInstrument = #"tremolo strings" \melodie \set Staff.midiInstrument = #"pizzicato strings" \melodie \set Staff.midiInstrument = #"orchestral strings" \melodie \set Staff.midiInstrument = #"timpani" \melodie \set Staff.midiInstrument = #"string ensemble 1" \melodie \set Staff.midiInstrument = #"string ensemble 2" \melodie \set Staff.midiInstrument = #"synthstrings 1" \melodie \set Staff.midiInstrument = #"synthstrings 2" \melodie \set Staff.midiInstrument = #"choir aahs" \melodie \set Staff.midiInstrument = #"voice oohs" \melodie \set Staff.midiInstrument = #"synth voice" \melodie \set Staff.midiInstrument = #"orchestra hit" \melodie \set Staff.midiInstrument = #"trumpet" \melodie \set Staff.midiInstrument = #"trombone" \melodie \set Staff.midiInstrument = #"tuba" \melodie \set Staff.midiInstrument = #"muted trumpet" \melodie \set Staff.midiInstrument = #"french horn" \melodie \set Staff.midiInstrument = #"brass section" \melodie \set Staff.midiInstrument = #"synthbrass 1" \melodie \set Staff.midiInstrument = #"synthbrass 2" \melodie \set Staff.midiInstrument = #"soprano sax" \melodie \set Staff.midiInstrument = #"alto sax" \melodie \set Staff.midiInstrument = #"tenor sax" \melodie \set Staff.midiInstrument = #"baritone sax" \melodie \set Staff.midiInstrument = #"oboe" \melodie \set Staff.midiInstrument = #"english horn" \melodie \set Staff.midiInstrument = #"bassoon" \melodie \set Staff.midiInstrument = #"clarinet" \melodie \set Staff.midiInstrument = #"piccolo" \melodie \set Staff.midiInstrument = #"flute" \melodie \set Staff.midiInstrument = #"recorder" \melodie \set Staff.midiInstrument = #"pan flute" \melodie \set Staff.midiInstrument = #"blown bottle" \melodie \set Staff.midiInstrument = #"shakuhachi" \melodie \set Staff.midiInstrument = #"whistle" \melodie \set Staff.midiInstrument = #"ocarina" \melodie \set Staff.midiInstrument = #"lead 1 (square)" \melodie \set Staff.midiInstrument = #"lead 2 (sawtooth)" \melodie \set Staff.midiInstrument = #"lead 3 (calliope)" \melodie \set Staff.midiInstrument = #"lead 4 (chiff)" \melodie \set Staff.midiInstrument = #"lead 5 (charang)" \melodie \set Staff.midiInstrument = #"lead 6 (voice)" \melodie \set Staff.midiInstrument = #"lead 7 (fifths)" \melodie \set Staff.midiInstrument = #"lead 8 (bass+lead)" \melodie \set Staff.midiInstrument = #"pad 1 (new age)" \melodie \set Staff.midiInstrument = #"pad 2 (warm)" \melodie \set Staff.midiInstrument = #"pad 3 (polysynth)" \melodie \set Staff.midiInstrument = #"pad 4 (choir)" \melodie \set Staff.midiInstrument = #"pad 5 (bowed)" \melodie \set Staff.midiInstrument = #"pad 6 (metallic)" \melodie \set Staff.midiInstrument = #"pad 7 (halo)" \melodie \set Staff.midiInstrument = #"pad 8 (sweep)" \melodie \set Staff.midiInstrument = #"fx 1 (rain)" \melodie \set Staff.midiInstrument = #"fx 2 (soundtrack)" \melodie \set Staff.midiInstrument = #"fx 3 (crystal)" \melodie \set Staff.midiInstrument = #"fx 4 (atmosphere)" \melodie \set Staff.midiInstrument = #"fx 5 (brightness)" \melodie \set Staff.midiInstrument = #"fx 6 (goblins)" \melodie \set Staff.midiInstrument = #"fx 7 (echoes)" \melodie \set Staff.midiInstrument = #"fx 8 (sci-fi)" \melodie \set Staff.midiInstrument = #"sitar" \melodie \set Staff.midiInstrument = #"banjo" \melodie \set Staff.midiInstrument = #"shamisen" \melodie \set Staff.midiInstrument = #"koto" \melodie \set Staff.midiInstrument = #"kalimba" \melodie \set Staff.midiInstrument = #"bagpipe" \melodie \set Staff.midiInstrument = #"fiddle" \melodie \set Staff.midiInstrument = #"shanai" \melodie \set Staff.midiInstrument = #"tinkle bell" \melodie \set Staff.midiInstrument = #"agogo" \melodie \set Staff.midiInstrument = #"steel drums" \melodie \set Staff.midiInstrument = #"woodblock" \melodie \set Staff.midiInstrument = #"taiko drum" \melodie \set Staff.midiInstrument = #"melodic tom" \melodie \set Staff.midiInstrument = #"synth drum" \melodie \set Staff.midiInstrument = #"reverse cymbal" \melodie \set Staff.midiInstrument = #"guitar fret noise" \melodie \set Staff.midiInstrument = #"breath noise" \melodie \set Staff.midiInstrument = #"seashore" \melodie \set Staff.midiInstrument = #"bird tweet" \melodie \set Staff.midiInstrument = #"telephone ring" \melodie \set Staff.midiInstrument = #"helicopter" \melodie \set Staff.midiInstrument = #"applause" \melodie \set Staff.midiInstrument = #"gunshot" \melodie } >> \midi { } } </pre> <p> <a href="../52/lily-d2f91df9.ly"> <img align="middle" border="0" src="../52/lily-d2f91df9.png" alt="[image of music]"> </a> </p> <p><a name="string-quartet-template-simple.ly"></a> <h3 class="unnumberedsec">String quartet template (simple)</h3> <p>This template demonstrates a simple string quartet. It also uses a <code>\global</code> section for time and key signatures <pre class="verbatim"> global= { \time 4/4 \key c \major } violinOne = \new Voice \relative c'' { \set Staff.instrumentName = #"Violin 1 " c2 d e1 \bar "|." } violinTwo = \new Voice \relative c'' { \set Staff.instrumentName = #"Violin 2 " g2 f e1 \bar "|." } viola = \new Voice \relative c' { \set Staff.instrumentName = #"Viola " \clef alto e2 d c1 \bar "|." } cello = \new Voice \relative c' { \set Staff.instrumentName = #"Cello " \clef bass c2 b a1 \bar "|." } \score { \new StaffGroup << \new Staff << \global \violinOne >> \new Staff << \global \violinTwo >> \new Staff << \global \viola >> \new Staff << \global \cello >> >> \layout { } \midi { } } </pre> <p> <a href="../c0/lily-052deeba.ly"> <img align="middle" border="0" src="../c0/lily-052deeba.png" alt="[image of music]"> </a> </p> <p><a name="string-quartet-template-with-separate-parts.ly"></a> <h3 class="unnumberedsec">String quartet template with separate parts</h3> <p>The "String quartet template" snippet produces a nice string quartet, but what if you needed to print parts? This new template demonstrates how to use the <code>\tag</code> feature to easily split a piece into individual parts. <p>You need to split this template into separate files; the filenames are contained in comments at the beginning of each file. <code>piece.ly</code> contains all the music definitions. The other files – <code>score.ly</code>, <code>vn1.ly</code>, <code>vn2.ly</code>, <code>vla.ly</code>, and <code>vlc.ly</code> – produce the appropriate part. <p>Do not forget to remove specified comments when using separate files! <pre class="verbatim"> %%%%% piece.ly %%%%% (This is the global definitions file) global= { \time 4/4 \key c \major } Violinone = \new Voice { \relative c''{ \set Staff.instrumentName = #"Violin 1 " c2 d e1 \bar "|." }} %********************************* Violintwo = \new Voice { \relative c''{ \set Staff.instrumentName = #"Violin 2 " g2 f e1 \bar "|." }} %********************************* Viola = \new Voice { \relative c' { \set Staff.instrumentName = #"Viola " \clef alto e2 d c1 \bar "|." }} %********************************* Cello = \new Voice { \relative c' { \set Staff.instrumentName = #"Cello " \clef bass c2 b a1 \bar "|."}} %********************************** music = { << \tag #'score \tag #'vn1 \new Staff { << \global \Violinone >> } \tag #'score \tag #'vn2 \new Staff { << \global \Violintwo>> } \tag #'score \tag #'vla \new Staff { << \global \Viola>> } \tag #'score \tag #'vlc \new Staff { << \global \Cello>> } >> } %%% These are the other files you need to save on your computer %%%%% score.ly %%%%% (This is the main file) %\include "piece.ly" %%% uncomment this line when using a separate file #(set-global-staff-size 14) \score { \new StaffGroup \keepWithTag #'score \music \layout { } \midi { } } %{ Uncomment this block when using separate files %%%%% vn1.ly %%%%% (This is the Violin 1 part file) \include "piece.ly" \score { \keepWithTag #'vn1 \music \layout { } } %%%%% vn2.ly %%%%% (This is the Violin 2 part file) \include "piece.ly" \score { \keepWithTag #'vn2 \music \layout { } } %%%%% vla.ly %%%%% (This is the Viola part file) \include "piece.ly" \score { \keepWithTag #'vla \music \layout { } } %%%%% vlc.ly %%%%% (This is the Cello part file) \include "piece.ly" \score { \keepWithTag #'vlc \music \layout { } } %} </pre> <p> <a href="../8c/lily-5f210b23.ly"> <img align="middle" border="0" src="../8c/lily-5f210b23.png" alt="[image of music]"> </a> </p> <!-- footer_tag --><br><hr> <div class="node"> <p> Next: <a rel="next" accesskey="n" href="Winds.html#Winds">Winds</a>, Previous: <a rel="previous" accesskey="p" href="Fretted-strings.html#Fretted-strings">Fretted strings</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>