This repository was archived by the owner on Jul 18, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 802dce0
Showing
5 changed files
with
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* Scheme | ||
Shared Scheme code for [[https://github.com/naptaker/engraving][engraving]] [[http://naptakerrr.com/about/][Naptaker]] scores. |
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,19 @@ | ||
;; Slightly tweaked from David Nalesnik's work. | ||
;; http://lists.gnu.org/archive/html/lilypond-user/2012-05/msg00381.html | ||
|
||
(define (custom-line-breaks-engraver bar-list) | ||
(let* ((working-copy bar-list) | ||
(total (1+ (car working-copy)))) | ||
(lambda (context) | ||
(make-engraver | ||
(acknowledgers ((paper-column-interface engraver grob source-engraver) | ||
(let ((internal-bar (ly:context-property context 'internalBarNumber))) | ||
(if (and (pair? working-copy) | ||
(zero? (remainder internal-bar total)) | ||
(eq? #t (ly:grob-property grob 'non-musical))) | ||
(begin | ||
(set! (ly:grob-property grob 'line-break-permission) 'force) | ||
(if (null? (cdr working-copy)) | ||
(set! working-copy bar-list) | ||
(set! working-copy (cdr working-copy))) | ||
(set! total (+ total (car working-copy)))))))))))) |
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,9 @@ | ||
(define preston-drums | ||
'((bassdrum default #f -3) | ||
(snare default #f 1) | ||
(closedhihat cross #f 5) | ||
(halfopenhihat xcircle #f 5) | ||
(lowtom default #f -1) | ||
(pedalhihat cross #f -5) | ||
(crashcymbal cross #f 6) | ||
(ridecymbal cross #f 4))) |
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,12 @@ | ||
(define maybeRhythmicStaff | ||
(define-music-function | ||
(parser location) | ||
() | ||
(if (defined? 'rhythmNotes) | ||
#{ | ||
\new RhythmicStaff \with { | ||
\RemoveEmptyStaves | ||
\override VerticalAxisGroup #'remove-first = ##t | ||
} { \global \rhythmNotes } | ||
#} | ||
#{ #}))) |
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,23 @@ | ||
(define ((my-stencils start) grob) | ||
(let* ((par-list (parentheses-item::calc-parenthesis-stencils grob)) | ||
(null-par (grob-interpret-markup grob (markup #:null)))) | ||
(if start | ||
(list (car par-list) null-par) | ||
(list null-par (cadr par-list))))) | ||
|
||
(define startParenthesis | ||
(define-music-function (parser location note) | ||
(ly:music?) | ||
"Add an opened parenthesis to the left of `note" | ||
#{ | ||
\once \override ParenthesesItem #'stencils = #(my-stencils #t) | ||
\parenthesize $note | ||
#})) | ||
|
||
(define endParenthesis | ||
(define-music-function (parser location note) (ly:music?) | ||
"Add a closed parenthesis to the right of `note" | ||
#{ | ||
\once \override ParenthesesItem #'stencils = #(my-stencils #f) | ||
\parenthesize $note | ||
#})) |