27.03.2013 Views

LilyPond Snippets

LilyPond Snippets

LilyPond Snippets

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Rhythms 43<br />

This snippet shows a progression from traditional notation, to beams over the rest, to stemlets<br />

over the rest, to stemlets alone. Stemlets are generated by overriding the 'stemlet-length<br />

property of Stem, while rests are hidden by setting 'transparent = ##t.<br />

Some \markup elements are included in the source to highlight the different notations.<br />

\paper { ragged-right = ##f }<br />

{<br />

}<br />

c'16^\markup { traditional } d' r f'<br />

g'16[^\markup { beams over rests } f' r d']<br />

% N.B. use Score.Stem to set for the whole score.<br />

\override Staff.Stem #'stemlet-length = #0.75<br />

c'16[^\markup { stemlets over rests } d' r f']<br />

g'16[^\markup { stemlets and no rests } f' \once \override Rest #'transparent = ##t r d']<br />

traditional<br />

<br />

beams over rests stemlets over rests<br />

<br />

<br />

Sub-dividing beams<br />

stemlets and no rests<br />

<br />

The beams of consecutive 16th (or shorter) notes are, by default, not sub-divided. That is, the<br />

three (or more) beams stretch unbroken over entire groups of notes. This behavior can be modified<br />

to sub-divide the beams into sub-groups by setting the property subdivideBeams. When<br />

set, multiple beams will be sub-divided at intervals defined by the current value of beatLength<br />

by reducing the multiple beams to just one beam between the sub-groups. Note that beatLength<br />

defaults to one over the denominator of the current time signature if not set explicitly. It must<br />

be set to a fraction giving the duration of the beam sub-group using the make-moment function,<br />

as shown here:<br />

\relative c'' {<br />

c32[ c c c c c c c]<br />

\set subdivideBeams = ##t<br />

c32[ c c c c c c c]<br />

}<br />

% Set beam sub-group length to an eighth note<br />

\set beatLength = #(ly:make-moment 1 8)<br />

c32[ c c c c c c c]<br />

% Set beam sub-group length to a sixteenth note<br />

\set beatLength = #(ly:make-moment 1 16)<br />

c32[ c c c c c c c]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!