Next: Winds, Previous: Fretted strings, Up: Top
These snippets illustrate the Notation Reference, section Unfretted string instruments.
To make the \flageolet circle smaller use the following Scheme
function.
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
}
In some situations, it may be necessary to create slurs between notes from different voices.
The solution is to add invisible notes to one of the voices, using
\hideNotes.
This example is measure 235 of the Ciaconna from Bach's 2nd Partita for solo violin, BWV 1004.
\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)
} >>
}
Problem: How to know which midiInstrument would be best for your
composition? Solution: A LilyPond demo file.
\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 { }
}
This template demonstrates a simple string quartet. It also uses a
\global section for time and key signatures
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 { }
}
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 \tag feature to easily split a piece into
individual parts.
You need to split this template into separate files; the filenames are
contained in comments at the beginning of each file. piece.ly
contains all the music definitions. The other files – score.ly,
vn1.ly, vn2.ly, vla.ly, and vlc.ly –
produce the appropriate part.
Do not forget to remove specified comments when using separate files!
%%%%% 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 { }
}
%}
This page is for LilyPond-2.11.58 (development-branch).
Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.
Your suggestions for the documentation are welcome.