This repository was archived by the owner on Jul 18, 2018. It is now read-only.
File tree 5 files changed +65
-0
lines changed
5 files changed +65
-0
lines changed Original file line number Diff line number Diff line change
1
+ * Scheme
2
+ Shared Scheme code for [[https://github.com/naptaker/engraving][engraving]] [[http://naptakerrr.com/about/][Naptaker]] scores.
Original file line number Diff line number Diff line change
1
+ ; ; Slightly tweaked from David Nalesnik's work.
2
+ ; ; http://lists.gnu.org/archive/html/lilypond-user/2012-05/msg00381.html
3
+
4
+ (define (custom-line-breaks-engraver bar-list )
5
+ (let* ((working-copy bar-list)
6
+ (total (1+ (car working-copy))))
7
+ (lambda (context )
8
+ (make-engraver
9
+ (acknowledgers ((paper-column-interface engraver grob source-engraver)
10
+ (let ((internal-bar (ly:context-property context 'internalBarNumber )))
11
+ (if (and (pair? working-copy)
12
+ (zero? (remainder internal-bar total))
13
+ (eq? #t (ly:grob-property grob 'non-musical )))
14
+ (begin
15
+ (set! (ly:grob-property grob 'line-break-permission ) 'force )
16
+ (if (null? (cdr working-copy))
17
+ (set! working-copy bar-list)
18
+ (set! working-copy (cdr working-copy)))
19
+ (set! total (+ total (car working-copy))))))))))))
Original file line number Diff line number Diff line change
1
+ (define preston-drums
2
+ '((bassdrum default #f -3)
3
+ (snare default #f 1 )
4
+ (closedhihat cross #f 5 )
5
+ (halfopenhihat xcircle #f 5 )
6
+ (lowtom default #f -1)
7
+ (pedalhihat cross #f -5)
8
+ (crashcymbal cross #f 6 )
9
+ (ridecymbal cross #f 4 )))
Original file line number Diff line number Diff line change
1
+ (define maybeRhythmicStaff
2
+ (define-music-function
3
+ (parser location)
4
+ ()
5
+ (if (defined? 'rhythmNotes )
6
+ #{
7
+ \new RhythmicStaff \with {
8
+ \RemoveEmptyStaves
9
+ \override VerticalAxisGroup #'remove-first = ##t
10
+ } { \global \rhythmNotes }
11
+ #}
12
+ #{ #})))
Original file line number Diff line number Diff line change
1
+ (define ((my-stencils start) grob)
2
+ (let* ((par-list (parentheses-item::calc-parenthesis-stencils grob))
3
+ (null-par (grob-interpret-markup grob (markup #:null))))
4
+ (if start
5
+ (list (car par-list) null-par)
6
+ (list null-par (cadr par-list)))))
7
+
8
+ (define startParenthesis
9
+ (define-music-function (parser location note)
10
+ (ly:music?)
11
+ " Add an opened parenthesis to the left of `note"
12
+ #{
13
+ \once \override ParenthesesItem #'stencils = #(my-stencils #t )
14
+ \parenthesize $note
15
+ #}))
16
+
17
+ (define endParenthesis
18
+ (define-music-function (parser location note) (ly:music?)
19
+ " Add a closed parenthesis to the right of `note"
20
+ #{
21
+ \once \override ParenthesesItem #'stencils = #(my-stencils #f )
22
+ \parenthesize $note
23
+ #}))
You can’t perform that action at this time.
0 commit comments