contemporary-glissando.ly
double-glissando.ly
flat-flags-and-beam-nibs.ly
+flat-ties.ly
flute-slap-notation.ly
heavily-customized-polymetric-time-signatures.ly
laissez-vibrer-ties.ly
--- /dev/null
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
+
+\header {
+ lsrtags = "midi, percussion, pitches, specific-notation"
+
+ texidoc = "
+If you want to use customized drum-pitch-names for an own drum-style
+with proper output for layout and midi, follow the steps as
+demonstrated in the code below. In short:
+
+* define the names * define the appearence * tell LilyPond to use it
+for layout * assign pitches to the names * tell LilyPond to use them
+for midi
+
+"
+ doctitle = "Customize drumPitchNames drumStyleTable and drumPitchTable in layout and midi"
+} % begin verbatim
+
+%% This snippet tries to amend
+%% NR 2.5.1 Common notation for percussion - Custom percussion staves
+%% http://lilypond.org/doc/v2.18/Documentation/notation/common-notation-for-percussion#custom-percussion-staves
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% To use custom drum-pitch-names for your score and midi you need to follow
+%% this route:
+%%
+%%%%%%%%%%%%
+%% LAYOUT:
+%%%%%%%%%%%%
+%%
+%% (1) Define a name and put it in `drumPitchNames'
+%% This can be done at toplevel with
+%% drumPitchNames #'my-name = #'my-name
+%% or shorter:
+%% drumPitchNames.my-name = #'my-name
+%% It's possible to add an alias as well.
+%% (2) Define how it should be printed
+%% Therefore put them into a toplevel-list, where each entry should look:
+%% (my-name
+%% note-head-style-or-default
+%% articulation-string-or-#f
+%% staff-position)
+%% Example:
+%% #(define my-style
+%% '(
+%% (my-name default "tenuto" -1)
+%% ; ...
+%% ))
+%% (3) Tell LilyPond to use this custom-definitions, with
+%% drumStyleTable = #(alist->hash-table my-style)
+%% in a \layout or \with
+%%
+%% Now we're done for layout, here a short, but complete example:
+%% \new DrumStaff
+%% \with { drumStyleTable = #(alist->hash-table my-style) }
+%% \drummode { my-name }
+%%
+%%%%%%%%%%%%
+%% MIDI:
+%%%%%%%%%%%%
+%%
+%% (1) Again at toplvel, assign a pitch to your custom-note-name
+%% midiDrumPitches #'my-name = #(ly:make-pitch -1 4 FLAT)
+%% or shorter:
+%% midiDrumPitches.my-name = ges
+%% Note that you have to use the name, which is in drumPitchNames, no alias
+%% (2) Tell LilyPond to use this pitch(es), with
+%% drumPitchTable = #(alist->hash-table midiDrumPitches)
+%%
+%% Example:
+%% \score {
+%% \new DrumStaff
+%% \with {
+%% drumStyleTable = #(alist->hash-table my-style)
+%% drumPitchTable = #(alist->hash-table midiDrumPitches)
+%% }
+%% \drummode { my-name4 }
+%% \layout {}
+%% \midi {}
+%% }
+%%
+%%%%%%%%%%%%
+%% TESTING
+%%%%%%%%%%%%
+%%
+%% To test whether all is fine, run the following sequence in terminal:
+%% lilypond my-file.ly
+%% midi2ly my-file.midi
+%% gedit my-file-midi.ly
+%%
+%% Which will do:
+%% 1. create pdf and midi
+%% 2. transform the midi back to a .ly-file
+%% (note: midi2ly is not always good in correctly identifying enharmonic pitches)
+%% 3. open this file in gedit (or use another editor)
+%% Now watch what you've got.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FULL EXAMPLE
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+drumPitchNames.dbass = #'dbass
+drumPitchNames.dba = #'dbass % 'db is in use already
+drumPitchNames.dbassmute = #'dbassmute
+drumPitchNames.dbm = #'dbassmute
+drumPitchNames.do = #'dopen
+drumPitchNames.dopenmute = #'dopenmute
+drumPitchNames.dom = #'dopenmute
+drumPitchNames.dslap = #'dslap
+drumPitchNames.ds = #'dslap
+drumPitchNames.dslapmute = #'dslapmute
+drumPitchNames.dsm = #'dslapmute
+
+#(define djembe
+ '((dbass default #f -2)
+ (dbassmute default "stopped" -2)
+ (dopen default #f 0)
+ (dopenmute default "stopped" 0)
+ (dslap default #f 2)
+ (dslapmute default "stopped" 2)))
+
+midiDrumPitches.dbass = g
+midiDrumPitches.dbassmute = fis
+midiDrumPitches.dopen = a
+midiDrumPitches.dopenmute = gis
+midiDrumPitches.dslap = b
+midiDrumPitches.dslapmute = ais
+
+one = \drummode { r4 dba4 do ds r dbm dom dsm }
+
+\score {
+ \new DrumStaff
+ \with {
+ \override StaffSymbol.line-count = #3
+ instrumentName = #"Djembe "
+ drumStyleTable = #(alist->hash-table djembe)
+ drumPitchTable = #(alist->hash-table midiDrumPitches)
+ }
+ \one
+ \layout {}
+ \midi {}
+}
--- /dev/null
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
+
+\header {
+ lsrtags = "contemporary-notation, scheme-language, staff-notation, tweaks-and-overrides"
+
+ texidoc = "
+The function takes the default @code{Tie.stencil} as an argument,
+calculating the result relying on the extents of this default. Further
+tweaking is possible by overriding @code{Tie.details.height-limit} or
+with @code{\\shape}. It's also possible to change the custom-definition
+on the fly.
+
+"
+ doctitle = "Flat Ties"
+} % begin verbatim
+
+%% http://lsr.di.unimi.it/LSR/Item?id=1031
+
+#(define ((flared-tie coords) grob)
+
+ (define (pair-to-list pair)
+ (list (car pair) (cdr pair)))
+
+ (define (normalize-coords goods x y dir)
+ (map
+ (lambda (coord)
+ ;(coord-scale coord (cons x (* y dir)))
+ (cons (* x (car coord)) (* y dir (cdr coord))))
+ goods))
+
+ (define (my-c-p-s points thick)
+ (make-connected-path-stencil
+ points
+ thick
+ 1.0
+ 1.0
+ #f
+ #f))
+
+ ;; outer let to trigger suicide
+ (let ((sten (ly:tie::print grob)))
+ (if (grob::is-live? grob)
+ (let* ((layout (ly:grob-layout grob))
+ (line-thickness (ly:output-def-lookup layout 'line-thickness))
+ (thickness (ly:grob-property grob 'thickness 0.1))
+ (used-thick (* line-thickness thickness))
+ (dir (ly:grob-property grob 'direction))
+ (xex (ly:stencil-extent sten X))
+ (yex (ly:stencil-extent sten Y))
+ (lenx (interval-length xex))
+ (leny (interval-length yex))
+ (xtrans (car xex))
+ (ytrans (if (> dir 0)(car yex) (cdr yex)))
+ (uplist
+ (map pair-to-list
+ (normalize-coords coords lenx (* leny 2) dir))))
+
+ (ly:stencil-translate
+ (my-c-p-s uplist used-thick)
+ (cons xtrans ytrans)))
+ '())))
+
+#(define flare-tie
+ (flared-tie '((0 . 0)(0.1 . 0.2) (0.9 . 0.2) (1.0 . 0.0))))
+
+\layout {
+ \context {
+ \Voice
+ \override Tie.stencil = #flare-tie
+ }
+}
+
+\paper { ragged-right = ##f }
+
+\relative c' {
+ a4~a
+ \override Tie.height-limit = 4
+ a'4~a
+ a'4~a
+ <a,, c e a c e a c e>~ q
+
+ \break
+
+ a'4~a
+ \once \override Tie.details.height-limit = 14
+ a4~a
+
+ \break
+
+ a4~a
+ \once \override Tie.details.height-limit = 0.5
+ a4~a
+
+ \break
+
+ a4~a
+ \shape #'((0 . 0) (0 . 0.4) (0 . 0.4) (0 . 0)) Tie
+ a4~a
+
+ \break
+
+ a4~a
+ \once \override Tie.stencil =
+ #(flared-tie '((0 . 0)(0.1 . 0.4) (0.9 . 0.4) (1.0 . 0.0)))
+ a4~a
+
+ a4~a
+ \once \override Tie.stencil =
+ #(flared-tie '((0 . 0)(0.06 . 0.1) (0.94 . 0.1) (1.0 . 0.0)))
+ a4~a
+}
changing-midi-output-to-one-channel-per-voice.ly
changing-the-tempo-without-a-metronome-mark.ly
creating-custom-dynamics-in-midi-output.ly
+customize-drumpitchnames,-drumstyletable-and-drumpitchtable-in-layout-and-midi.ly
demo-midiinstruments.ly
replacing-default-midi-instrument-equalization.ly
}
words = \lyricmode {
- Great is Thy faith- ful- ness,
+ Great is Thy faith -- ful -- ness,
}
\score {
adding-drum-parts.ly
+customize-drumpitchnames,-drumstyletable-and-drumpitchtable-in-layout-and-midi.ly
heavily-customized-polymetric-time-signatures.ly
jazz-combo-template.ly
percussion-beaters.ly
}
\score {
- \new GrandStaff <<
+ \new PianoStaff <<
\new Staff = upper { \new Voice = "singer" \upper }
\new Lyrics \lyricsto "singer" \text
\new Staff = lower { \lower }
>>
- \layout {
- \context {
- \GrandStaff
- \accepts "Lyrics"
- }
- \context {
- \Lyrics
- \consists "Bar_engraver"
- }
- }
+ \layout { }
\midi { }
}
coloring-notes-depending-on-their-pitch.ly
creating-a-sequence-of-notes-on-various-pitches.ly
creating-custom-key-signatures.ly
+customize-drumpitchnames,-drumstyletable-and-drumpitchtable-in-layout-and-midi.ly
forcing-a-clef-symbol-to-be-displayed.ly
generating-random-notes.ly
hiding-accidentals-on-tied-notes-at-the-start-of-a-new-system.ly
displaying-grob-ancestry.ly
drawing-boxes-around-grobs.ly
drawing-circles-around-various-objects.ly
+flat-ties.ly
generating-random-notes.ly
generating-whole-scores-also-book-parts-in-scheme-without-using-the-parser.ly
outputting-the-version-number.ly
making-an-object-invisible-with-the-transparent-property.ly
moving-dotted-notes-in-polyphony.ly
suppressing-warnings-for-clashing-note-columns.ly
+two--partcombine-pairs-on-one-staff.ly
controlling-the-placement-of-chord-fingerings.ly
creating-blank-staves.ly
custodes.ly
+customize-drumpitchnames,-drumstyletable-and-drumpitchtable-in-layout-and-midi.ly
demo-midiinstruments.ly
embedding-native-postscript-in-a--markup-block.ly
engravers-one-by-one.ly
display-bracket-with-only-one-staff-in-a-system.ly
extending-a-trillspanner.ly
extending-glissandi-across-repeats.ly
+flat-ties.ly
forcing-measure-width-to-adapt-to-metronomemarks-width.ly
glissandi-can-skip-grobs.ly
how-to-print-two-rehearsal-marks-above-and-below-the-same-barline-method-1.ly
time-signature-in-parentheses---method-3.ly
time-signature-in-parentheses.ly
tweaking-clef-properties.ly
+two--partcombine-pairs-on-one-staff.ly
use-square-bracket-at-the-start-of-a-staff-group.ly
using-autochange-with-more-than-one-voice.ly
vertical-aligned-staffgroups-without-connecting-systemstartbar.ly
extending-a-trillspanner.ly
extending-glissandi-across-repeats.ly
fine-tuning-pedal-brackets.ly
+flat-ties.ly
forcing-horizontal-shift-of-notes.ly
fret-diagrams-explained-and-developed.ly
generating-custom-flags.ly
--- /dev/null
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.19.22"
+
+\header {
+ lsrtags = "simultaneous-notes, staff-notation"
+
+ texidoc = "
+The @code{\\partcombine} function takes two music expressions each
+containing a part, and distributes them among four @code{Voice}s named
+@qq{two} @qq{one} @qq{solo} and @qq{chords} depending on when and how
+the parts merged into a common voice. The voices output from
+@code{\\partcombine} can have their layout properties adjusted in the
+usual way. Here we define extensions of @code{\\partcombine} to make
+it easier to put four voices on a staff.
+
+soprano = @{ d'4 | cis' b e' d'8 cis' | cis'2 b @} alto = @{ fis4 |
+e8 fis gis ais b4 b | b ais fis2 @} tenor = @{ a8 b | cis' dis' e'4 b8
+cis' d'4 | gis cis' dis'2 @} bass = @{ fis8 gis | a4 gis g fis | eis
+fis b,2 @}
+
+\\new Staff <<
+ \\key b\\minor
+ \\clef alto
+ \\partial 4
+ \\transpose b b'
+ \\partcombineUp \\soprano \\alto
+ \\partcombineDown \\tenor \\bass >>
+
+"
+ doctitle = "Two \\partcombine pairs on one staff"
+} % begin verbatim
+
+\layout {
+ \context {
+ \Staff
+ \accepts "VoiceBox"
+ }
+ \context {
+ \name "VoiceBox"
+ \type "Engraver_group"
+ \defaultchild "Voice"
+ \accepts "Voice"
+ }
+}
+
+partcombineUp =
+#(define-music-function (partOne partTwo)
+ (ly:music? ly:music?)
+"Take the music in @var{partOne} and @var{partTwo} and return
+a @code{VoiceBox} named @q{Up} containing @code{Voice}s
+that contain @var{partOne} and @var{partTwo} merged into one
+voice where feasible. This variant sets the default voicing
+in the output to use upward stems."
+#{
+ \new VoiceBox = "Up" <<
+ \context Voice = "one" { \voiceOne }
+ \context Voice = "two" { \voiceThree }
+ \context Voice = "shared" { \voiceOne }
+ \context Voice = "solo" { \voiceOne }
+ \partcombine #partOne #partTwo
+ >>
+#})
+
+partcombineDown = #
+(define-music-function (partOne partTwo)
+ (ly:music? ly:music?)
+"Take the music in @var{partOne} and @var{partTwo} and return
+a @code{VoiceBox} named @q{Down} containing @code{Voice}s
+that contain @var{partOne} and @var{partTwo} merged into one
+voice where feasible. This variant sets the default voicing
+in the output to use downward stems."
+#{
+ \new VoiceBox = "Down" <<
+ \set VoiceBox.soloText = #"Solo III"
+ \set VoiceBox.soloIIText = #"Solo IV"
+ \context Voice ="one" { \voiceFour }
+ \context Voice ="two" { \voiceTwo }
+ \context Voice ="shared" { \voiceFour }
+ \context Voice ="solo" { \voiceFour }
+ \partcombine #partOne #partTwo
+ >>
+#})
+
+soprano = { d'4 | cis' b e' d'8 cis' | cis'2 b }
+alto = { fis4 | e8 fis gis ais b4 b | b ais fis2 }
+tenor = { a8 b | cis' dis' e'4 b8 cis' d'4 | gis cis' dis'2 }
+bass = { fis8 gis | a4 gis g fis | eis fis b,2 }
+
+\new Staff <<
+ \key b\minor
+ \clef alto
+ \partial 4
+ \transpose b b'
+ \partcombineUp \soprano \alto
+ \partcombineDown \tenor \bass
+>>