alignBassFigureAccidentals property.
* lily/volta-bracket.cc (brew_molecule): only put text on 1st
bracket.
* Documentation/user/refman.itely (Percussion staves): use
set-drum-kit
2003-07-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ * scm/bass-figure.scm (make-bass-figure-markup): add
+ alignBassFigureAccidentals property.
+
+ * lily/volta-bracket.cc (brew_molecule): only put text on 1st
+ bracket.
+
* lily/hyphen-spanner.cc (set_spacing_rods): new function: take
syllables widths into account for minimum-length.
)c4
}
@end lilypond
+By adjusting the duration of the skip note (here it is a half-note),
+the space between the main-note and the grace is adjusted.
A @code{\grace} section has some default values, and LilyPond will
use those default values unless you specify otherwise inside the
@syntax
-A cluster is engraved as the envelope of a set of cluster-notes. This
-is achieved by applying the function @code{notes-to-cluster} to a
-sequence of chords, eg.
+A cluster is engraved as the envelope of a set of
+cluster-notes. Cluster notes are created by applying the function
+@code{notes-to-clusters} to a sequence of chords, eg.
+@c
@lilypond[relative 2]
- \apply #notes-to-cluster { << c e >> <<b f'>> }
+ \apply #notes-to-clusters { << c e >> <<b f'>> }
@end lilypond
The following example (from
@seealso
-@internalsref{Cluster}, @inputfileref{input/regression,cluster.ly},
-@internalsref{Cluster_engraver}, @internalsref{ClusterEvent}.
+@internalsref{ClusterSpanner}, @internalsref{ClusterSpannerBeacon},
+@inputfileref{input/regression,cluster.ly},
+@internalsref{Cluster_engraver}, @internalsref{ClusterNoteEvent}.
@refbugs
-When a cluster is active, note heads must be switched off manually using
-@code{\hideNotes}.
-
Music expressions like @code{< @{ g8 e8 @} a4 >} are not printed
accurately. Use @code{<<g a>>8 <<e a>>8} instead.
We continue with the introduction of more musical constructs. Normal
rests are entered just like notes with the name ``@code{r}'':
+@cindex rests
@quotation
@example
r2 r4 r8 r16
@end quotation
@separate
+@cindex tie
+
A tie is created by adding a tilde ``@code{~}'' to the first note
being tied.
@quotation
@end lilypond
@end quotation
@separate
+@cindex slurs versus ties
A tie is different from a slur. A tie simply makes the first note
sound longer, and can only be used on pairs of notes with the same
pitch. Slurs indicate the articulations of notes, and can be used on
The notation manual discusses ties in @ref{Ties}.
+@cindex key signature, setting
+
The key signature is set with the command ``@code{\key}'', followed by
a pitch and @code{\major} or @code{\minor}:
@quotation
@end lilypond
@end quotation
-@c accidentals...
+@cindex accidentals
+
There are some interesting points to note in this example.
Accidentals (sharps and flats) do not have to be marked explicitly:
you just enter the note name, and an accidental is printed
@end quotation
@separate
+@cindex slur
+
A slur is drawn across many notes, and indicates bound articulation
(legato). The starting note and ending note are marked with a
``@code{(}'' and a ``@code{)}'' respectively:
@end quotation
@separate
+@cindex phrasing slurs
If you need two slurs at the same time (one for articulation, one for
phrasing), you can also make a phrasing slur with @code{\(} and
@code{\)}.
@end quotation
@separate
+@cindex beams, by hand
Beams are drawn automatically, but if you do not like where they are
put, they can be entered by hand. Mark the first note to be beamed
with @code{[} and the last one with @code{]}:
(1 + 2) * 3
((1 + 2) * 3) / (4 * 5)
-@end quotation
+@end quotation
+@cindex expression
+@cindex music expression
is a sequence of expressions, where each expression is contained in
the next one. The simplest expressions are numbers and operators
(like +, * and /). Parentheses are used to group expressions. In
>} and @code{@{ @}}, more complex music is formed. The @code{\context}
also forms new expressions; it is prepended to a music expression.
+@cindex indent
When spreading expressions over multiple lines, it is customary to use
an indent that indicates the nesting level. Formatting music like this
eases reading, and helps you insert the right amount of closing
@node Adding articulation marks to notes
@subsection Adding articulation marks to notes
+@cindex articulation
+@cindex accents
+@cindex staccato
+
Common accents can be added to a note using @code{-.}, @code{--}, @code{->}:
@quotation
@lilypond[verbatim,relative 1]
@end quotation
@separate
+@cindex fingering
Similarly, fingering indications can be added to a note using @code{-}
and the digit to be printed.
@lilypond[verbatim,relative 1]
@end quotation
@separate
+@cindex dynamics
+@cindex decrescendo
+@cindex crescendo
+
Crescendi and decrescendi are started with the commands @code{\<} and
@code{\>}. The command @code{\!} finishes a crescendo on the note it
is attached to.
@end quotation
@separate
+@cindex chords
Chords can be made by
surrounding pitches with @code{<<} and @code{>}>:
@quotation
@separate
-@node More basic rhythms
-@subsection More basic rhythms
+@node Basic rhythmical commands
+@subsection Basic rhythmical commands
+@cindex pickup
+@cindex anacruse
+@cindex upstep
+@cindex partial measure
A pickup (or upstep) is entered with the keyword @code{\partial}. It
is followed by a duration: @code{\partial 4} is a quarter note upstep
and @code{\partial 8} an eighth note.
f8 c2 d e
@end lilypond
+@cindex tuplets
+@cindex triplets
Tuplets are made with the @code{\times} keyword. It takes two
arguments: a fraction and a piece of music. The duration of the piece
of music is multiplied by the fraction. Triplets make notes occupy
\times 2/3 { c r c }
@end lilypond
+@cindex grace notes
+@cindex accacciatura
Grace notes are also made by prefixing a note, or a set of notes with
a keyword. In this case, the keyword is @code{\grace}.
@lilypond[relative 1, verbatim,fragment]
@node Commenting input files
@subsection Commenting input files
+@cindex comments
+@cindex line comment
+@cindex block comment
Comments are pieces of the input that are ignored. There are two
types of comments. A line comments are introduced by @code{%}: after
that, the rest of that line is ignored. Block comments span larger
@section Printing lyrics
@cindex lyrics
+@cindex Lyrics
+@cindex Songs
Lyrics are entered by separating each syllable with a space, and
surrounding them with @code{\lyrics @{ @dots{} @}}, for example
@example
}
@end lilypond
+@cindex melisma
+@cindex extender line
+@c synonyms?
This melody ends on a @rglos{melisma}, a single syllable (``free'')
sung to more than one note. This is indicated with a @emph{extender
line}. It is entered as two underscores, i.e.,
@node A lead sheet
@section A lead sheet
+@cindex Lead sheets
+@cindex chords
+@cindex chord names
+
In popular music, it is common to denote accompaniment as chord-names.
Using them in LilyPond has two parts, just like lyrics: entering the
chords (with @code{\chords}), and printing them (with @code{\context
@node Listening to output
@section Listening to output
+@cindex sound
+@cindex MIDI
+
MIDI (Musical Instrument Digital Interface) is a standard for
connecting and recording digital instruments. A MIDI file is like a
tape recording of a MIDI instrument. The @code{\midi} block makes the
@node Single staff polyphony
@section Single staff polyphony
+@cindex polyphony
+@cindex multiple voices
+@cindex voices, more -- on a staff
+
When different melodic lines are combined on a single staff, these are
printed as polyphonic voices: each voice has its own stems, slurs
and beams, and the top voice has the stems up, while the bottom voice
< \context Staff = up {
c4 c g' g }
\context Staff = down {
- \clef bass c, c' e c }
+ \clef bass c,, c' e c }
>
@end lilypond
\context Voice=va { \stemUp c' fis! }
\context Voice=vb { \stemDown c fis! }
>
+
+ \paper { raggedright= ##t }
+
}
texidoc = "with \\applycontext, \\properties can be modified
procedurally. Applications include: checking bar numbers, smart
-octavation. "
+octavation.
+
+
+This example prints a bar-number during processing on stdout.
+"
}
+ \paper { raggedright= ##t }
+
+
\score { \notes \relative c'' {
c1 c1
<<g b d>>-\arpeggio
}
>
+ \paper { raggedright= ##t }
}
c8 c c c
\times 4/6 { c c c c c c}
}
- \paper{ }
+ \paper { raggedright= ##t }
}
\times 2/3 {
f8-[ f f ] f8-[ f f ] f f f f f f
}
-}}
+}
+ \paper { raggedright= ##t }
+
+ }
"
}
+ \paper { raggedright= ##t }
\score {
\notes \context PianoStaff <
\header {
texidoc="Bar number settable and padding adjustable. Bar numbers
-start counting after the anacrusis."
+start counting after the anacrusis.
+
+The padding should be increased, to prevent clashes at the start of the line.
+
+"
}
\header{
texidoc="
-COMMENTED-OUT
-
Markings that are attached to (invisible) barlines are
delicate: the are attached to the rest of the score without the score
knowing it. Consequently, they fall over often.
}
-% FIXME including this file makes lily crash lateron -- breaks website build
-
onestaff = \context Staff = foo\notes\relative c'' {
\property Staff.instr = instr
\property Staff.instrument = instrument \mark "B"
\context Staff = bufl { c1 c2 }
>
-scpaper = \paper {\translator {\OrchestralScoreContext}}
-% stpaper = \paper{ \translator {\BarNumberingStaffContext }}
-stpaper = \paper{ }
-
-
-scscore = \score { \grstaff \paper {
-\scpaper
-}}
-
-scscore = \score { \grstaff \paper {
-\scpaper
-}}
-
-stscore = \score { \onestaff \paper {
- \stpaper
-}}
-
-
-%\score {\stscore}
-\score {\scscore}
-
-\score{\notes c''}
-\score {\scscore}
+\score {\grstaff}
}
\version "1.7.19"
+ \paper { raggedright= ##t }
\score { \notes \relative c'' {
\property Score.forbidBeamBreak = ##f
\version "1.7.18"
\header{
-texidoc = "Concave beams should be horizontal. informally spoken,
+texidoc = "Concave beams should be horizontal. Informally spoken,
concave refers to the shape of the notes that are opposite a
beam. If an up-beam has high notes on its center stems, then we call
it concave. This example shows borderline cases. Only the beams
c8-[ c16 c16 c8]
c8-[ c16 e16 g8]
}
+
+ \paper { raggedright= ##t }
+
}
beams should look the same
"
}
+ \paper { raggedright= ##t }
+
\score {
\context Voice \notes\relative c {
}
>
+ \paper { raggedright= ##t }
}
}
\score {
\notes \relative c'' { c2. c8-[ c8 c8 c8] }
+
+ \paper { raggedright= ##t }
+
}
notes and the brackets with a dash."
}
+ \paper { raggedright= ##t }
+
\score
{
%be fixed by uncommenting \stemUp"
}
+\paper { raggedright= ##t }
+
+
\score{
\notes\relative c'{
%\stemUp
\header {
texidoc = "beams (simple)"
}
+
+ \paper { raggedright= ##t }
+
\score { \notes
\relative c'
{
\header {
texidoc = "Collisions for single head notes. "
}
+ \paper { raggedright= ##t }
+
\score {
\notes
}
\version "1.7.18"
+ \paper { raggedright= ##t }
+
\score{
\context Staff \notes <
"
}
+ \paper { raggedright= ##t }
+
+
\score { \notes \context Staff\relative c''<
\context Voice = VA {
\voiceOne
are resolved."
}
+ \paper { raggedright= ##t }
+
+
\score {
\context Staff \notes \transpose c c' {
\time 3/4
\header{
texidoc="
-If the Note_heads_engraver is replaced by the Completion_heads_engraver,
-notes that cross bar lines are split into tied notes.
+If the Note_heads_engraver is replaced by the
+@code{Completion_heads_engraver}, notes that cross bar lines are split
+into tied notes.
+
"
}
+\paper { raggedright= ##t }
+
+
+
\score{
\notes\relative c'{
\time 2/4
\consists "Completion_heads_engraver"
}
}
-}
\ No newline at end of file
+}
easier to process."
}
+ \paper { raggedright= ##t }
+
\score {
\notes \relative c'{
"
}
+ \paper { raggedright= ##t }
+
+
\score {
\notes\relative c' {
"
}
+ \paper { raggedright= ##t }
+
+
\version "1.7.18"
\score { \notes\relative c'' { c4 d8-[ \grace { e32-[ d c d] } e8] e-[ e \grace { f16 } e8 e] }}
texidoc = "grace code should not be confused by nested sequential musics, containing grace notes; practically speaking, this means that the end-bar and measure bar coincide in this example."
}
+ \paper { raggedright= ##t }
+
+
\score{
\notes
}
+ \paper { raggedright= ##t }
+
\score { \notes \context Voice {
{ \grace b'8 c''2 }
\grace b'16 c''4 c''4 \bar "|."
\header {
texidoc = "Another nested grace situation"
}
+ \paper { raggedright= ##t }
\score { \notes \relative c'' {
f1
\header {
texidoc = "partcombiner and grace notes can go together"
}
+ \paper { raggedright= ##t }
\score {
\context StaffGroup = group <
\header{
texidoc = "Stripped version of trip.ly. Staffs should be of correct length."
}
+
+ \paper { raggedright= ##t }
+
\score{
\context PianoStaff \notes \relative c'' <
\context Staff = treble {
}
+ \paper { raggedright= ##t }
+
\score {\notes\relative c' {
\repeat volta 2 {
c1
\version "1.7.19"
\header {
-texidoc = "Hara kiri should not upset fixed distance alignment like in pianostaff. In this example the middle staff is harakiried."
+texidoc = "Hara kiri should not upset fixed distance alignment like in pianostaff. In this example the middle of 3 staves is harakiried."
}
+ \paper { raggedright= ##t }
\score { \notes \transpose c c''
to work."
}
+ \paper { raggedright= ##t }
+
m = \notes \relative c'' {
\version "1.7.18"
\header { texidoc= "Tests lyric extenders. "}
+
+ \paper { raggedright= ##t }
\score{
\notes \relative c' <
\context Staff { c (c-) (c-) c }
+
heads that have differing dot counts may be merged anyway."
}
+ \paper { raggedright= ##t }
+
+
\score { \notes {
\context Staff <
)
+ \paper { raggedright= ##t }
+
foobar = \notes \transpose c c' { c4-\>-^ c4-^ c4-\!-^ c4-^ }
\score {
}
+ \paper { raggedright= ##t }
+
\score { \notes \relative c''
\context Thread {
<<g a c>>4
}
+\paper { raggedright= ##t }
+
\score{ \notes {
a a a a \break
\mark A
"
}
+ \paper { raggedright= ##t }
+
\score {
\notes
\context Staff\relative c'' {
texidoc = "Percent repeats are not skipped, even when skipBars is set. "
}
+ \paper { raggedright= ##t }
\score {
\context Staff <
}
+ \paper { raggedright= ##t }
+
\score{\notes\relative c''
\context Staff <
\time 2/4
}
+ \paper { raggedright= ##t }
+
\score { \notes\relative c''
{
a4\rest b4\rest c4\rest
\version "1.7.18"
+\paper { raggedright= ##t }
+
\header {
texidoc = "Scripts may be stacked."
}
d16 d d d d d cis d
}
+
+ %% not raggedright!!
\paper { linewidth = 14.\cm
}
}
+++ /dev/null
-\version "1.7.18"
-
-\header{
-
-texidoc="Similarly, if @code{'neutral-direction} is set to @code{-1}. "
-
-}
-
-\score{
- \notes\relative c{
- \property Voice.Stem \override #'neutral-direction = #-1
-
- b''4 ~ b8-(b8-) e4 e,
- }
- \paper{
-
- }
-}
-
}
\version "1.7.18"
+ \paper { raggedright= ##t }
\score {
}
-%% comment out New_tie_engraver for lily 1.6
\paper {
\translator {
\ThreadContext
texidoc = "Tieing a grace to the to a following grace or main note works."
}
+ \paper { raggedright= ##t }
+
\score { \notes \context Voice \relative c'' {
c4 \grace { c8 ~ c16 ~ } c4
}
+++ /dev/null
-\version "1.7.18"
-
-\header {
-texidoc="Simple beams. This broke somewhere < 1.3.110
-
-DOCME ! what is this.
-
-"
-}
-
-ex = \notes \relative c' {
- \repeat "volta" 2 {
- \times 2/3 {c8( cis d} \times 2/3 {dis e f}
- \times 2/3 {fis g gis} \times 2/3 {a bes b} |
- \property Voice.TupletBracket \override #'number-visibility = ##f
- \property Voice.TupletBracket \override #'bracket-visibility = ##f
- \times 2/3 {c8 cis d} \times 2/3 {dis e f}
- \times 2/3 {fis g gis} \times 2/3 {a bes b} |
- \times 2/3 {c b bes} \times 2/3 {a aes g}
- \times 2/3 {fis f e} \times 2/3 {ees d des} |
- \times 2/3 {c b bes} \times 2/3 {a aes g}
- \times 2/3 {fis f e} \times 2/3 {ees d des-)}
- }
- c1
-}
-
-\score { \context Staff { \notes { \ex } } }
-
"
}
+\paper { raggedright= ##t }
\score{
\notes \context Voice \relative c'' {
the bracket."
}
+ \paper { raggedright= ##t }
\score { \notes \context Voice\relative c'' {
\times 2/3 { r c8-[ c8] }
}
+ \paper { raggedright= ##t }
+
\score { \notes \context Voice\relative c'' {
\times 2/3 { b'4 b b }
\times 2/3 { f4 f f }
\version "1.7.23"
-clusterSneeuwbal =\notes {
- \property Thread.NoteHead \set #'transparent = ##t
- \property Voice.Stem \set #'transparent = ##t
- \property Voice.Beam \set #'transparent = ##t
-% \property Staff.Accidental \set #'transparent = ##t
- \property Voice.Cluster \set #'padding = #0.25
- \property Voice.Cluster \set #'style = #'ramp
-}
+
\score {
\notes \context PianoStaff <
\context Staff = up {
\property Voice.Beam \set #'thickness = #0.3
\property Voice.Stem \set #'thickness = #4.0
g'16-[ b16 fis16 g16]
-< { \clusterSneeuwbal
- as16-\startCluster <<as b>>
+< \apply #notes-to-clusters {
+ as16 <<as b>>
<<g b>>
- <<g cis>>-\stopCluster
+ <<g cis>>
} \\
{
\property Staff.Arpeggio \set #'arpeggio-direction =#-1
*/
+/*
+ TODO: ledger lines are also a property of the staff. Maybe move them
+ to there?
+ */
Molecule
Note_head::brew_ledger_lines (Grob *me,
int pos,
Molecule mol = Lookup::line (t, Offset (0, h), Offset (w,h));
mol.add_molecule (start);
mol.add_molecule (end);
-
- SCM text = me->get_grob_property ("text");
- SCM properties = me->get_property_alist_chain (SCM_EOL);
- Molecule num = Text_item::interpret_new_markup (smob, properties, text);
+ if (first_bracket)
+ {
+ SCM text = me->get_grob_property ("text");
+ SCM properties = me->get_property_alist_chain (SCM_EOL);
+
+ Molecule num = Text_item::interpret_new_markup (smob, properties, text);
- mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()
- - 1.0, 0);
+ mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()
+ - 1.0, 0);
+ }
mol.translate_axis (left, X_AXIS);
return mol.smobbed_copy ();
}
)))
(define-public (make-bass-figure-markup figures context)
+
(define (no-end-bracket? f1 f2)
(eq? (ly:get-mus-property f1 'bracket-stop) '())
)
;; TODO: support slashed numerals here.
(define (fig-to-markup fig-music)
(let*
- (
+ ((align-accs (eq? #t (ly:get-context-property context 'alignBassFigureAccidentals)))
(fig (ly:get-mus-property fig-music 'figure))
(acc (ly:get-mus-property fig-music 'alteration))
(acc-markup #f)
(fig-markup
(if (number? fig)
(make-number-markup (number->string fig))
- (make-simple-markup " ")
- ))
- )
-
- (if (number? acc)
- (make-line-markup (list fig-markup
- (alteration->text-accidental-markup acc)))
- fig-markup)
- ))
+ (make-simple-markup (if align-accs " " ""))
+ )))
+
+ (if (number? acc)
+ (make-line-markup (list fig-markup
+ (alteration->text-accidental-markup acc)))
+ fig-markup)
+ ))
(define (fig-seq-to-markup figs)
(let*
"Internal variable: store interface to engraver smob table for current
context. Don't mess with this.")
(translator-property-description 'aDueText string? "text for begin of a due")
+(translator-property-description 'alignBassFigureAccidentals boolean?
+ "If true, then the accidentals are aligned in bass figure context.")
+
+(translator-property-description 'allowBeamBreak boolean?
+ "If true allow line breaks during beams.")
(translator-property-description 'associatedVoice string? "Name of the
Voice that has the melody for this LyricsVoice.")
(translator-property-description 'autoBeamSettings list? "Specifies
set, \\addlyrics will assume that beams, slurs and ties signal
melismata, and align lyrics accordingly.
")
-(translator-property-description 'allowBeamBreak boolean?
- "If true allow line breaks during beams.")
+
(translator-property-description 'barAlways boolean? "If set to true a bar line is drawn after each note.
")