Skip to content

Commit

Permalink
J.S. Bach: Suite Anglaise 1: add macros for schleifer and slidenotes
Browse files Browse the repository at this point in the history
Signed-off-by: Davide Madrisan <[email protected]>
  • Loading branch information
madrisan committed Jul 25, 2024
1 parent d399bb1 commit 45efb64
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/johann-sebastian-bach/suites-anglaises/BWV806/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
#})
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 45efb64

Please sign in to comment.