G:\Notepad\App\Notepad++64>"C:\Program Files (x86)\LilyPond-Midi\usr\bin\musicxml2ly" -a -l deutsch --no-beaming -o "G:\Trinity\Gary Ryan - Birds Flew Over The Spire\birds-flew-over-the-spire-by-gary-ryan.ly" -v "G:\Trinity\Gary Ryan - Birds Flew Over The Spire\birds-flew-over-the-spire-by-gary-ryan.musicxml"
File "C:\Program Files (x86)\LilyPond-Midi\usr\bin\musicxml2ly.py", line 2105
if current_staff and staff <> current_staff and not n.get_maybe_exist_named_child ('chord'):
^^
SyntaxError: invalid syntax
\version "2.24.0"
#(define startGlyph
(ly:make-stencil
'(path 0.03
(
moveto 1.39 -0.23
curveto 1.3 -0.5 1.8 -0.6 1.8 -0.55
curveto 1.6 -0.9 1.1 -0.6 1.32 -0.18)
round
round
#t)
; x-extend
(cons 0 1)
; y-extend
(cons 0 0.5)))
#(define (flattement grob)
(let*(
; combine start-glyph and trill-spanner
(stil (ly:stencil-add
startGlyph
(ly:line-spanner::print grob))))
; set new extent for combined stencils
(ly:make-stencil
(ly:stencil-expr stil)
(stencil-true-extent stil X)
(stencil-true-extent stil Y))))
fl=
#(define-music-function (music) (ly:music?)
#{
<>
% do not stop at barline
-\tweak to-barline #f
% surpress "TR"
-\tweak bound-details.left.text #f
% set smaller trill-element as end-glyph
-\tweak bound-details.right.text
\markup {
\hspace #-0.5
\lower #0.3
\fontsize #-2.2
\musicglyph "scripts.trill_element"
}
% position between noteheads
-\tweak bound-details.left.attach-dir #RIGHT
-\tweak bound-details.right.attach-dir #LEFT
% combine start-glyph and trill-spanner
-\tweak stencil #flattement
-\startTrillSpan
$music
\stopTrillSpan
#})
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Example
\relative c'' {
d2.
\fl { d4\( d\)\( }
d8\)
d16 d16
}
\version "2.24.0"
#(define startGlyph
(ly:make-stencil
'(path 0.03
(
moveto 1.39 -0.23
curveto 1.3 -0.5 1.8 -0.6 1.8 -0.55
curveto 1.6 -0.9 1.1 -0.6 1.32 -0.18)
round
round
#t)
(cons 0 1)
(cons 0 0.5)))
#(define (flattement grob)
(let((stil (ly:stencil-add
startGlyph
(ly:line-spanner::print grob))))
(ly:make-stencil
(ly:stencil-expr stil)
(stencil-true-extent stil X)
(stencil-true-extent stil Y))))
flatt = {
\override TrillSpanner.bound-details.left.attach-dir = #1
\override TrillSpanner.bound-details.right.attach-dir = #-1
\override TrillSpanner.to-barline = ##f
\override TrillSpanner.bound-details.left.text = ##f
\override TrillSpanner.stencil = #flattement
}
\relative c'' {
d2.
\flatt
d4\(\startTrillSpan
d\)\( \stopTrillSpan
d8\)
d16 d16
}
chordNameFunction =
#(lambda (in-pitches bass inversion context)
(if (= (length in-pitches) 1)
(note-name->german-underlined-markup (car in-pitches) #f)
(ignatzek-chord-names
in-pitches bass inversion context)))
\new ChordNames
{
\once \override ChordName.stencil =
#(grob-transformer 'stencil
(lambda (grob orig)
(grob-interpret-markup grob
(make-underline-markup (make-stencil-markup orig)))))
c:1
c:1
}
\version "2.25.4"
\language "deutsch"
#(define-public (my-note-name->german-markup pitch lowercase?)
(let* ((name (ly:pitch-notename pitch))
(alt-semitones
(inexact->exact (round (* (ly:pitch-alteration
pitch) 2))))
(n-a (if (member (cons name alt-semitones) `((6 . -1) (6 . -2)))
(cons 7 (+ 1 alt-semitones))
(cons name alt-semitones)))
(basic-list '("c" "d" "e" "f" "g" "a" "h" "b"))
(list-to-use
(if lowercase?
basic-list
(map string-upcase basic-list))))
(make-line-markup
(list
(string-append
(list-ref list-to-use (car n-a))
(if (or (equal? (car n-a) 2) (equal? (car n-a) 5))
(list-ref '( "ses" "s" "" "is" "isis") (+ 2 (cdr n-a)))
(list-ref '("eses" "es" "" "is" "isis") (+ 2 (cdr n-a)))))))))
#(define (note-name->german-underlined-markup pitch lowercase?)
(make-underline-markup
(make-line-markup
(list
(my-note-name->german-markup pitch lowercase?)))))
gRoot= \once \set ChordNames.chordRootNamer = #note-name->german-underlined-markup
chExBass = {
<c e g b>1-\markup \whiteout { "7" } %% Septakkor
<c e b>1-\markup \whiteout { "7" } %% Septakkord ohne Quint
< c es ges heses >1-\markup { "o" } %% dim
}
chExBasses =
#(append
(sequential-music-to-chord-exceptions chExBass #t)
ignatzekExceptions)
firstNote =
#(define-music-function (music )
(ly:music?)
(event-chord-reduce music))
mymus = \chordmode { cis4:1 \gRoot c:1 \gRoot c d:m h:7^5 d:dim7 }
\layout {
\context {
\ChordNames
chordNameExceptions = #chExBasses
chordNameFunction =
#(lambda (in-pitches bass inversion context)
(if (= (length in-pitches) 1)
(my-note-name->german-markup (car in-pitches) #f)
(ignatzek-chord-names
in-pitches bass inversion context)))
chordNoteNamer =
#(lambda (pitch lowercase?)
(my-note-name->german-markup pitch #f))
chordRootNamer =
#(lambda (pitch lowercase?)
(my-note-name->german-markup pitch #t))
}
}
<<
\new ChordNames \mymus
\mymus
>>
\version "2.24.0"
% based on
% https://lists.gnu.org/archive/html/lilypond-user/2015-08/msg00517.html
#(define move-to-next-barline
(lambda (grob)
(let* ((sys (ly:grob-system grob))
(all-elts (ly:grob-array->list (ly:grob-object sys 'all-elements)))
(barlines (filter (lambda (elt)
(grob::has-interface elt 'bar-line-interface))
all-elts))
(grob-pos (grob::rhythmic-location grob))
(next (filter (lambda (b)
(rhythmic-location<? grob-pos (grob::rhythmic-location b)))
barlines))
(next (reduce
(lambda (elem prev)
(if (rhythmic-location<?
(grob::rhythmic-location prev)
(grob::rhythmic-location elem))
prev
elem))
#f
next)))
(if next
(let* ((grob-x (ly:grob-relative-coordinate grob sys X))
(grob-x-ext (ly:grob-property grob 'X-extent))
(grob-width (- (cdr grob-x-ext) (car grob-x-ext)))
(next-X (ly:grob-relative-coordinate next sys X))
(next-x-ext (ly:grob-property next 'X-extent))
(next-width (- (cdr next-x-ext) (car next-x-ext)))
(offset (- (- next-X grob-x) grob-width)))
(ly:grob-set-property! grob 'extra-offset (cons offset 0)))))))
{
\override Score.BarNumber.break-visibility = #end-of-line-invisible
\set Score.barNumberVisibility = #(every-nth-bar-number-visible 1)
c'1 1 1 1 1
\once \override Score.BarNumber.after-line-breaking = #move-to-next-barline
1
}