+2002-11-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * Documentation/user/*.tely: new chord syntax.
+
+ * input/regression/[bc]*.ly (texidoc): syntax updates.
+
2002-11-13 Heikki Junes <hjunes@cc.hut.fi>
* lilypond.words: add vocabulary to be used in auto-completion
music expressions. Consider the following example.
@lilypond[verbatim, singleline]
-\score { \context Score \notes { c'4 ( d' )e' } }
+\score { \context Score \notes { c'4-( d' e'-) } }
@end lilypond
@noindent
sequential music is also interpreted with the same Thread, Voice, and
Staff context, putting the notes on the same staff, in the same voice.
-This is a convenient mechanism, but do not expect opening chords to work
-without @code{\context}. For every note, a separate staff is
-instantiated.
-
-@cindex explicit context
-@cindex starting with chords
-@cindex chords, starting with
-
-@lilypond[verbatim, singleline]
-\score { \notes <c'4 es'> }
-@end lilypond
-
-Of course, if the chord is preceded by a normal note in sequential
-music, the chord will be interpreted by the Thread of the preceding
-note:
-
-@lilypond[verbatim,singleline]
-\score { \notes { c'4 <c'4 es'> } }
-@end lilypond
-
-
@node Context properties
@subsection Context properties
< { a b c' } { c' d' e' } >
}
@end lilypond
+However, using @code{<} and @code{>} for chords turns up various
+syntactical peculiarities. For this reason, a special syntax for
+chords was introduced in version 1.7: @code{<< >>}.
+
-Other compound music expressions include
+
+
+Other compound music expressions include
@example
\repeat @var{expr}
\transpose @var{from} @var{to} @var{expr}
Then the short version:
@example
-@@lilypond[11pt]@{<c' e' g'>@}
+@@lilypond[11pt]@{<<c' e' g'>>@}
@end example
@noindent
and its music:
-@lilypond[11pt]{<c' e' g'>}
+@lilypond[11pt]{ <<c' e' g'>> }
@command{lilypond-book} knows the default margins and a few paper
sizes. One of these commands should be in the beginning of the document:
Then the short version:
@example
-\lilypond[11pt]@{<c' e' g'>@}
+\lilypond[11pt]@{<<c' e' g'>>@}
@end example
@noindent
and its music:
-@lilypond[11pt]{<c' e' g'>}
+@lilypond[11pt]{<<c' e' g'>>}
You can use whatever commands you like in the document preamble,
the part of the document before @code{\begin@{document@}}.
\time 4/4
\property Score.TextScript \set #'font-style = #'large
-<d4_"notation" a fis> r
+<<d a fis>>4_"notation" r
{ \property Voice.Stem \override #'flag-style = #""
\grace g16
\property Voice.Stem \revert #'flag-style
g8 fis16 g |
\cadenzaOn a4 \bar "||" \cadenzaOff }
\notes\relative c'' {
-<d4_"performance" a fis> r g16 () fis e fis a () g fis g |
+<<d a fis>>4_"performance" r g16 () fis e fis a () g fis g |
\cadenzaOn a4 \bar "||" \cadenzaOff }
@end lilypond
\time 2/4
\property Score.TextScript \set #'font-style = #'large
\grace { bes16 } as8_"notation" as16 bes as8 g |
- \grace { [as16 ( bes] } < ) c4 as >
- \grace { [as16 ( bes] } < ) c4 as > \bar "||"
+ \grace { [as16-( bes] } << c as >>4-)
+ \grace { [as16-( bes] } << c as >>4-) \bar "||"
\grace { bes16 } as8_"performance" as16 bes as8 g |
< \context Voice = va { \stemUp\tieUp as32 bes c8. as32 bes c8. }
\context Voice = vb { \stemDown\tieDown as16 ~ as8. as16 ~ as8. } >
\property Voice.TextScript \set #'font-style = #'large
\addlyrics
\context Staff \notes\relative c'' {
- <g1 b d> s s
- <g bes d> s s
- <g bes des> s s
- <g b dis> s s
- <g b d f> s s
- <g b d f a> s s
+ <<g b d>>1 s s
+ <<g bes d>> s s
+ <<g bes des>> s s
+ <<g b dis>> s s
+ <<g b d f>> s s
+ <<g b d f a>> s s
}
\context Lyrics \lyrics{
\property Lyrics . LyricText \override #'alignment = #-1
\property Score.TextScript \set #'font-style = #'large
\addlyrics
\context Staff \notes\relative c'' {
- gis1 s s as s s <des g,!> s s <cis g!> s s
+ gis1 s s as s s <<des g,!>> s s <<cis g!>> s s
}
\context Lyrics \lyrics {
\property Lyrics . LyricText \override #'alignment = #-1
\property Score.TextScript \set #'font-style = #'large
\addlyrics
\context Voice \notes\relative c'' {
- < g1 e c > < a f d > < b g e >
- < c a f > < d b g > < e c a > < f d b > }
+ <<g e c >>1 << a f d >> << b g e >>
+ <<c a f >> << d b g >> << e c a >> << f d b >> }
\context Lyrics \lyrics { T Sp Dp S D Tp "D{\\kern-5pt}$\\mid$" }
@end lilypond
\time 4/4
\clef treble
\context Voice
- \partial 4 < c4 g e > |
- < c a f > < b g d > < c2 g e >
+ \partial 4 << c g e >>4 |
+ << c a f >> << b g d >> << c2 g e >>
}
\property Score.LyricText \set #'font-style = #'large
\addlyrics
\property Score.barNonAuto = ##t
\property Score.TextScript \set #'font-style = #'large
\context Voice \notes\relative c'' {
- <g1_"unisone " g> s
- <g1_"third " b> s
- <g1_"fourth " c> s
- <g1_"fifth " d'> s
- <g1_"sixth " e'> s
- <g1_"octave " g'> s
- <g1_"decime" b'> s s
+ <<g1 g>>_"unisone " s
+ <<g1 b>>_"third " s
+ <<g1 c>>_"fourth " s
+ <<g1 d'>>_"fifth " s
+ <<g1 e'>>_"sixth " s
+ <<g1 g'>>_"octave " s
+ <<g1 b'>>_"decime" s s
}
@end lilypond
\property Score.barNonAuto = ##t
\property Score.TextScript \set #'font-style = #'large
\context Voice \notes\relative c'' {
- <g1_"second " a> s s
- <g1_"seventh " f'> s s
- <g1_"ninth" a'> s s
+ <<g1 a>>_"second " s s
+ <<g1 f'>>_"seventh " s s
+ <<g1 a'>>_"ninth" s s
}
@end lilypond
\property Score.TextScript \set #'font-style = #'large
\addlyrics
\context Voice \notes\relative c'' {
- < g1 g > s
- < g^"minor" as > s
- < g^"major" a! > s
- < g^"augm" ais > s
- < gis^"dimin" bes > s
- < g!^"minor" bes > s
- < g^"major" b! > s
- < g^"augm" bis > s
+ << g g >>1 s
+ << g as >>^"minor" s
+ << g a! >> s
+ << g ais >>^"augm" s
+ << gis bes >>^"dimin" s
+ << g! bes >>^"minor" s
+ << g b! >>^"major" s
+ << g bis >>^"augm" s
}
\context Lyrics \lyrics {
"unisone " "second " "second " "second "
\property Score.TextScript \set #'font-style = #'large
\addlyrics
\context Staff \notes\relative c'' {
- < g1^"perfect" c > s
- < g^"augm" cis > s
- < g^"perfect" d' > s
- < g^"dim" des' > s
- < gis^"dimin" es' > s
- < g!^"minor" es' > s
- < g^"major" e'! > s
- < g^"augm" eis' > s
+ << g c >>^"perfect" s
+ << g cis >>^"augm" s
+ << gd' >>^"perfect" s
+ << g des' >> ^"dim" s
+ << gis es' >>^"dimin" s
+ << g! es' >>^"minor" s
+ << g e'! >>^"major" s
+ << g eis' >>^"augm" s
}
\context Lyrics \lyrics {
"fourth " "fourth " "fifth " "fifth "
\property Score.TextScript \set #'font-style = #'large
\addlyrics
\context Staff \notes\relative c'' {
- < gis1^"dimin" f'! > s
- < g!^"minor" f'! > s
- < g^"major" fis' > s
- < g g' > s
- < g^"minor" as' > s
- < g^"major" a'! > s
- < g^"minor" bes' > s
- < g^"major" b'! > s
+ << gis f'! >>1^"dimin" s
+ << g! f'! >>^"minor" s
+ << g fis' >>^"major" s
+ << g g' >> s
+ << g as' >>^"minor" s
+ << g a'! >>^"major" s
+ << g bes' >>^"minor" s
+ << g b'! >>^"major" s
}
\context Lyrics \lyrics {
"seventh " "seventh " "seventh " "octave "
\property Score.barNonAuto = ##t
\property Score.TextScript \set #'font-style = #'large
\context Staff \notes\relative c'' {
- < g1_"second " a > s s < g'_"seventh " a, > s s \bar "||"
- < g,_"third " b > s s < g'_"sixth " b, > s s \bar "||"
- < g,_"fourth " c > s s < g'_"fifth " c, > s s \bar "||"
+ << g a >>1_"second s s << g' a, >>_"seventh " s s \bar "||"
+ << g, b >>_"third " s s << g' b, >>_"sixth " s s \bar "||"
+ << g, c >>_"fourth " s s << g' c, >>_"fifth " s s \bar "||"
}
@end lilypond
es4 d c bes | bes }
\context Voice = rhb {
\stemDown
- < bes8 g > as < as f > g < g es > f < d f > es | < g4 es > }
+ << bes g >>8 as << as f >> g << g es >> f << d f >> es | << g es >>4 }
>
}
\addlyrics
Dot placement for chords is not perfect. In some cases, dots overlap:
@lilypond[]
- \context Voice { <f,4. c'' d e f> }
+ <<f, c'' d e f>>4.
@end lilypond
musical phrasing. A tie is entered using the tilde symbol `@code{~}'.
@lilypond[fragment,verbatim,center]
- e' ~ e' <c' e' g'> ~ <c' e' g'>
+ e' ~ e' <<c' e' g'>> ~ <<c' e' g'>>
@end lilypond
When a tie is applied to a chord, all note heads (whose pitches match) are
for every tied chord.
@lilypond[fragment,verbatim,center]
\property Voice.sparseTies = ##t
- <c' e' g'> ~ <c' e' g'>
+ <<c' e' g'>> ~ <<c' e' g'>>
@end lilypond
In its meaning a tie is just a way of extending a note duration, similar
@lilypond[fragment,verbatim,center]
\relative c' {
- c <c e g>
- <c' e g>
- <c, e' g>
+ c <<c e g>>
+ <<c' e g>>
+ <<c, e' g>>
}
@end lilypond
@cindex @code{\notes}
@lilypond[singleline,fragment,verbatim]
\property Staff.autoAccidentals = #'( Staff (any-octave . 0) )
-cis'4 <c'' c'> r2 | cis'4 <c' c''> r2 | <cis' c''> r | <c'' cis'> r |
+cis'4 <<c'' c'>> r2 | cis'4 <<c' c''>> r2 | <<cis' c''>> r | <<c'' cis'>> r |
@end lilypond
The only solution is to manually insert the problematic
@cindex @code{\arpeggio}
You can specify an arpeggio sign on a chord by attaching an
-@code{\arpeggio} to a note of the chord.
+@code{\arpeggio} to a chord.
@lilypond[fragment,relative,verbatim]
- \context Voice <c\arpeggio e g c>
+ <<c e g c>>-\arpeggio
@end lilypond
When an arpeggio crosses staves in piano music, you attach an arpeggio
@lilypond[fragment,relative,verbatim]
\context PianoStaff <
\property PianoStaff.connectArpeggios = ##t
- \context Voice = one { <c'\arpeggio e g c> }
- \context Voice = other { \clef bass <c,,\arpeggio e g>}
+ \context Voice = one { <<c' e g c>>-\arpeggio }
+ \context Voice = other { \clef bass <<c,, e g>>-\arpeggio}
>
@end lilypond
@lilypond[fragment,relative,verbatim]
\context Voice {
\property Voice.Arpeggio \set #'arpeggio-direction = #1
- <c\arpeggio e g c>
+ <<c e g c>>-\arpeggio
\property Voice.Arpeggio \set #'arpeggio-direction = #-1
- <c\arpeggio e g c>
+ <<c e g c>>-\arpeggio
}
@end lilypond
\property PianoStaff.connectArpeggios = ##t
\property PianoStaff.Arpeggio \override
#'molecule-callback = \arpeggioBracket
- \context Voice = one { <c'\arpeggio e g c> }
- \context Voice = other { \clef bass <c,,\arpeggio e g>}
+ \context Voice = one { <<c' e g c>>-\arpeggio }
+ \context Voice = other { \clef bass <<c,, e g>>-\arpeggio }
>
@end lilypond
\notes {
a,4 c' a e' e c' a e'
}
-
>
@end lilypond
\chords {
c1 f:sus4 bes/f
}
- <c e g>
- <f bes c'>
- <f bes d'>
+ <<c e g>>
+ <<f bes c'>>
+ <<f bes d'>>
}
\score {
@lilypond[verbatim,singleline]
scheme = \notes {
- \chords {a1 b c} <d f g> <e g b>
+ \chords {a1 b c} <<d f g>> <<e g b>>
}
\score {
\notes<
@lilypond[verbatim,center,singleline]
scheme = \notes {
- <c'1 e' g'>
- <e' g' c''>
- <e e' g' c''>
+ <<c' e' g'>>1
+ <<e' g' c''>>
+ <<e e' g' c''>>
}
\score {
\context Staff \outputproperty
#(make-type-checker 'note-head-interface)
#'extra-offset = #'(0.5 . 0.75)
- <c8 e g> }
+ <<c e g>>8 }
@end lilypond
@cindex @code{extra-offset}
\score {
\context PianoStaff \notes \transpose c c'' <
\context Staff = up { s1 }
- \context Staff = down { [c8 c \translator Staff=up <c d> c
+ \context Staff = down { [c8 c \translator Staff=up <<c d>> c
\translator Staff=down c c c] }
>
\paper { linewidth = -1 }
@end quotation
@separate
-@ignore
-@c te diepzinnig?
-@c hmm, te losjes, iig
-In general, @code{ < @var{stuff} > } is used when @var{stuff} all
-happens at the same time, like in chords, or (like in the two-staff
-example above) in a bunch of stacked staves.
-@end ignore
You can combine beams and ties with chords. Beam and tie markings
must be placed outside the chord markers:
@end lilypond
@end quotation
+@ignore
When you want to combine chords with slurs and dynamics, technical
detail crops up: you have type these commands next to the notes, which
means that they have to be inside the @code{< >}. Don't get confused
by the chord @code{< >} and the dynamic @code{\< \>}!
-
+@end ignore
@quotation
@example
@separate
@example
-<c4-\arpeggio g' c>
+<<c g' c>>4-\arpeggio
@end example
-The delimiters @code{<} and @code{>} are shorthands for
-@code{\simultaneous @{} and @code{@}}. The expression enclosed in
-@code{<} and @code{>} is a chord.
+The delimiters @code{<<} and @code{>>} enclose the pitches of a chord.
+@code{\arpeggio} typesets an arpeggio sign (a wavy vertical line)
+before the chord.
@cindex arpeggio
-@code{\arpeggio} typesets an arpeggio sign (a wavy vertical line) before
-the chord.
@separate
@example
@code{\context}.
@separate
@example
-\voiceOne s4 g8. b,16 c8 r <e'8. g> <f16 a>
+\voiceOne s4 g8. b,16 c8 r <<e' g>>8. <<f a>>16
@end example
The oboes should have stems up to keep them from interfering with
@separate
@example
-\grace <e8( g> < d4 )f> <c2 e>
+\grace <<e g>>-( <<d f>>4-) <<c e>>2
@end example
@cindex @code{\grace}
@cindex ornaments
of their notated duration, so in this case the fraction is 2/3.
@separate
@example
-@{ <d8 f> <e g> <f a> @}
+@{ <<d f>>8 <<e g>> <<f a>> @}
@end example
The piece of music to be `tripletted' is sequential music containing
three chords.
@separate
@example
\stemBoth
-\grace <c,8( e> <)b8. d8.-\trill> <c16 e> |
+\grace <<c, e>>8-( <<b d>>8.-\trill <<c e>>16 |
@end example
@cindex trill
@cindex stemBoth
}
}
}
+%% new-chords-done %%
\ No newline at end of file
\score{\notes c''}
\score {\scscore}
+%% new-chords-done %%
\ No newline at end of file
linewidth = 40*\staffspace
}
}
+%% new-chords-done %%
\ No newline at end of file
linewidth = 0.0
}
}
+%% new-chords-done %%
\ No newline at end of file
%% Local variables:
%% LilyPond-indent-level:2
%% End:
+%% new-chords-done %%
\ No newline at end of file
linewidth = -1.0
}
}
+%% new-chords-done %%
\ No newline at end of file
{
\stemDown
f16( \> d \! b \translator Staff = down \stemUp
- \clef treble g ~ < g8 )e>
+ \clef treble g ~ << g e>>8-)
[e \translator Staff = up
\stemDown
\paper { linewidth = -1. }
}
+%% new-chords-done %%
\ No newline at end of file
}
+%% new-chords-done %%
\ No newline at end of file
f4 [f8 f] [f16 f] [f32 f] [f64 f] [f128 f]
}
\paper{ linewidth = -1.0 }
-}
\ No newline at end of file
+} %% new-chords-done %%
\ No newline at end of file
linewidth = -1
}
}
+%% new-chords-done %%
\ No newline at end of file
[c8 c16 e16 g8]
}}
+%% new-chords-done %%
\ No newline at end of file
\paper { linewidth = -1 }
}
+%% new-chords-done %%
\ No newline at end of file
\paper { linewidth = -1. }
}
+%% new-chords-done %%
\ No newline at end of file
c c
}
}
+%% new-chords-done %%
\ No newline at end of file
linewidth = -1
}
}
+%% new-chords-done %%
\ No newline at end of file
>
}
+%% new-chords-done %%
\ No newline at end of file
\score {
\notes \context Voice { c2. [c8 c8 c8 c8] }
}
+%% new-chords-done %%
\ No newline at end of file
}
\midi { }
}
+%% new-chords-done %%
\ No newline at end of file
c8-[-~ c-]
}
}
+%% new-chords-done %%
\ No newline at end of file
}
\paper { linewidth = -1.0 }
}
+%% new-chords-done %%
\ No newline at end of file
}
\paper{ linewidth = -1.0 }
}
+%% new-chords-done %%
\ No newline at end of file
%\stemUp
\clef alto
\time 3/4
- r8 <d ( bes > ) bes' d <e-> g, c, c,> r |
+ r8 <<d bes >>-( ) bes' d <<e g, c, c,>>-> r |
}
}
+%% new-chords-done %%
\ No newline at end of file
}
\paper { linewidth = -1. }
}
+%% new-chords-done %%
\ No newline at end of file
}}
+%% new-chords-done %%
\ No newline at end of file
[c8 c16 e16 g8]
}}
+%% new-chords-done %%
\ No newline at end of file
c1 }
}
+%% new-chords-done %%
\ No newline at end of file
indent = 0.0
linewidth = 4.0\cm}
}
+%% new-chords-done %%
\ No newline at end of file
linewidth = 40 * \staffspace
}
}
+%% new-chords-done %%
\ No newline at end of file
}
}
+%% new-chords-done %%
\ No newline at end of file
}
}
+%% new-chords-done %%
+%% new-chords-done %%
\ No newline at end of file
}
\midi { }
}
+%% new-chords-done %%
\ No newline at end of file
\notes \relative c' {
\stemUp
c4 f4
- a4 <e4 d'4> | \break
- < g8 a8 > < e8 a8 > a4 c1 < d4 b4 > e4 |
+ a4 <<e d'>>4 | \break
+ << g a >>8 << e a >>8 a4 c1 << d b >>4 e4 |
c4 a4 f4 g4 a4
}
}
\property Voice.Cluster \set #'shape = #'ramp
c4 f4
\startCluster
- a4 <e4 d'4> | \break
+ a4 <<e d'>>4 | \break
%%% do not try something like: < { g8 e8 } a4 >
- %%% instead, do the following: < g8 a8 > < e8 a8 >
- < g8 a8 > < e8 a8 > a4 c1 < d4 b4 > e4 |
+ %%% instead, do the following: << g a >>8 << e a >>8
+ << g a >>8 << e a >>8 a4 c1 << d b >>4 e4 |
c4 \stopCluster a4 f4 g4 a4
}
}
linewidth = 15.0 \cm
}
}
+%% new-chords-done %%
\ No newline at end of file
>
}
+%% new-chords-done %%
\ No newline at end of file
}
+%% new-chords-done %%
\ No newline at end of file
}
>
}
+%% new-chords-done %%
\ No newline at end of file
\time 3/4
% Here's what I was trying to do:
< \context Voice = VI {\stemDown
- <g4 b g'>
- <g4. b g'>
- <g4 b d'>
+ <<g b g'>>4
+ <<g b g'>>4.
+ <<g b d'>>4
d'4
d'4.
}
\context Voice=VII {\stemUp
d'4
d'4.
- <a4 c'>
- <g4 b g'>
- <g4. b g'>
+ <<a c'>>4
+ <<g b g'>>4
+ <<g b g'>>4.
} >
}
+%% new-chords-done %%
\ No newline at end of file
\stemUp e4 d c b a g f
}
\context Voice = ii \relative c' {
- \stemDown <a4 c> <a4 c> <a4 c> <a4 c> <a c>
- <a c> <a c>
+ \stemDown <<a c>>4 <<a c>>4 <<a c>>4 <<a c>>4 <<a c>>
+ <<a c>> <<a c>>
}
>
% \midi { \tempo 4:80 }
}
+%% new-chords-done %%
\ No newline at end of file
}\r
}\r
}\r
+%% new-chords-done %%
\ No newline at end of file
\consists "Completion_heads_engraver"
}
}
-}
\ No newline at end of file
+}%% new-chords-done %%
\ No newline at end of file
}
}
+
+%% new-chords-done %%
ADD_INTERFACE (Cluster,"cluster-interface",
"A graphically drawn musical cluster.",
- "shape padding");
+ "shape padding segments");
SCM mol = SCM_EOL;
if (gh_procedure_p (proc))
mol = gh_apply (proc, scm_list_n (this->self_scm (), SCM_UNDEFINED));
-
Molecule *m = unsmob_molecule (mol);
(define (check-dangling-properties prop)
(if (not (object-property prop 'iface-marked))
- (error "\ngrob-property-description.scm: Can't find property:" prop)))
+ (error "\ngrob-property-description.scm: Can't find interface for property:" prop)))
(map check-dangling-properties all-backend-properties)
(Y-offset-callbacks . (,Side_position_interface::out_of_staff
,Side_position_interface::aligned_side))
(molecule-callback . ,Measure_grouping::brew_molecule)
- (meta . ((interfaces . (spanner-interface measure-grouping-interface)))) (staff-padding . 3)
(padding . 2)
(direction . 1)
(thickness . 1)
(height . 2.0)
+ (staff-padding . 3)
+ (meta . ((interfaces . (spanner-interface side-position-interface measure-grouping-interface))))
))
(MultiMeasureRest
. (
(direction . 1)
(padding . 2)
(font-family . number)
- (meta . ((interfaces . (side-position-interface font-interface spanner-interface))))
+ (meta . ((interfaces . (side-position-interface self-alignment-interface font-interface spanner-interface))))
))
TODO: revise typing.")
(grob-property-description 'self-alignment-Y number? "like self-alignment-X but for Y axis.")
-(grob-property-description 'segments list? "DOCME. ")
+(grob-property-description 'segments list? "DOCME. ")
(grob-property-description 'shape symbol? "shape of cluster segments. Valid values include 'leftsided-stairs', 'rightsided-stairs', 'centered-stairs', and 'ramp'.")
(grob-property-description 'shorten number? "the amount of space that a stem should be shortened (DOCME!)")
(grob-property-description 'shorten-pair number-pair? "the length on each side to shorten a text-spanner, for example a pedal bracket")