-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
J.S. Bach: Suite Anglaise 1: add macros for schleifer and slidenotes
Signed-off-by: Davide Madrisan <[email protected]>
- Loading branch information
Showing
3 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/johann-sebastian-bach/suites-anglaises/BWV806/macros-schleifer.ly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
#}) |
25 changes: 25 additions & 0 deletions
25
src/johann-sebastian-bach/suites-anglaises/BWV806/macros-slidenotes.ly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |