diff --git a/src/johann-sebastian-bach/suites-anglaises/BWV806/Makefile.am b/src/johann-sebastian-bach/suites-anglaises/BWV806/Makefile.am index 019b5858..86e39431 100644 --- a/src/johann-sebastian-bach/suites-anglaises/BWV806/Makefile.am +++ b/src/johann-sebastian-bach/suites-anglaises/BWV806/Makefile.am @@ -24,6 +24,8 @@ EXTRA_DIST = JS-Bach-BWV806-Suite-Anglaise-1.ly \ header.ily \ global.ly \ logo.ly \ + macros-schleifer.ly \ + macros-slidenotes.ly \ parts/bach-suite-anglaise-1-1-prelude.ly \ parts/bach-suite-anglaise-1-2-allemande.ly \ parts/bach-suite-anglaise-1-3-courante-1.ly \ diff --git a/src/johann-sebastian-bach/suites-anglaises/BWV806/macros-schleifer.ly b/src/johann-sebastian-bach/suites-anglaises/BWV806/macros-schleifer.ly new file mode 100644 index 00000000..a5b8b69c --- /dev/null +++ b/src/johann-sebastian-bach/suites-anglaises/BWV806/macros-schleifer.ly @@ -0,0 +1,35 @@ +schleifer = +#(define-music-function (start) (ly:music?) + #{\once \override Slur.direction = #UP + \once \override Slur.stencil = $(lambda (grob) + (let* ((slur-stencil (ly:slur::print grob)) + (Y-ext (ly:stencil-extent slur-stencil Y)) + (text-stencil (ly:text-interface::print grob)) + (prall-stencil (ly:stencil-translate text-stencil + (cons 2.5 (car Y-ext)))) + (combo-stencil (ly:stencil-combine-at-edge + prall-stencil X RIGHT + slur-stencil 0)) + (combo-X-ext (ly:stencil-extent combo-stencil X))) + (ly:stencil-translate combo-stencil (cons 0.5 -1)))) + \once \override Slur.positions = #'(-1 . 1) + \once \override Slur.text = \markup { + \normalsize \musicglyph "scripts.prall" + } + \once \override Slur.control-points = $(lambda (grob) + (let* ((coords (ly:slur::calc-control-points grob)) + (point-0 (list-ref coords 0)) + (point-1 (list-ref coords 1)) + (point-2 (list-ref coords 2)) + (point-3 (list-ref coords 3))) + (set-car! point-0 (+ (car point-0) 2)) + (set-car! point-1 (+ (car point-1) 1.5)) + (set-car! point-2 (+ (car point-2) -1)) + (set-car! point-3 (+ (car point-3) -2)) + coords)) + s1*0( $start + \once \override Rest.transparent = ##t + \once \override Rest.X-extent = #'(0 . 0.2) + \grace r1 + s1*0) +#}) diff --git a/src/johann-sebastian-bach/suites-anglaises/BWV806/macros-slidenotes.ly b/src/johann-sebastian-bach/suites-anglaises/BWV806/macros-slidenotes.ly new file mode 100644 index 00000000..75f8c036 --- /dev/null +++ b/src/johann-sebastian-bach/suites-anglaises/BWV806/macros-slidenotes.ly @@ -0,0 +1,25 @@ +%% http://lsr.di.unimi.it/LSR/Item?id=837 +%% see also http://comments.gmane.org/gmane.comp.gnu.lilypond.general/63777 + +% by Edward Neeman + +% Warnings may be suppressed using 'ly:expect-warning' +% Or use the here defined 'suppressWarning'-function, working since 2.20. + +% suppressWarning = +% #(define-void-function (amount message)(number? string?) +% (for-each +% (lambda (warning) +% (ly:expect-warning message)) +% (iota amount 1 1))) +% +% \suppressWarning 2 "this Voice needs a \voiceXx or \shiftXx setting" + +slideNotes = { + \override NoteColumn.force-hshift = 0 + \override NoteHead.stencil = #(ly:make-stencil + (list 'draw-line 0.15 -0.5 -0.4 2 0.4) + '(-0.1 . 0.1) '(0.1 . 1)) + \override Stem.stencil = ##f + \override Flag.stencil = ##f +}