2015-11-05 01:39:52 +01:00
|
|
|
% ================================================= %
|
|
|
|
% Musical Functions %
|
|
|
|
% ================================================= %
|
|
|
|
% Part of lilydrum
|
|
|
|
|
2015-11-05 03:28:25 +01:00
|
|
|
eighthBeaming = {
|
|
|
|
\set baseMoment = #(ly:make-moment 1/8)
|
2016-12-02 11:48:18 +01:00
|
|
|
\set beatStructure = #'( 2 2 2 2)
|
2015-11-05 03:28:25 +01:00
|
|
|
}
|
2016-04-27 02:57:44 +02:00
|
|
|
eighthReelBeaming = {
|
|
|
|
\set baseMoment = #(ly:make-moment 1/8)
|
2016-12-02 11:48:18 +01:00
|
|
|
\set beatStructure = #'( 4 4 4 4)
|
2016-04-27 02:57:44 +02:00
|
|
|
}
|
2016-07-12 11:19:49 +02:00
|
|
|
eighthCompoundBeaming = {
|
2015-11-05 03:28:25 +01:00
|
|
|
\set baseMoment = #(ly:make-moment 1/8)
|
2016-12-02 11:48:18 +01:00
|
|
|
\set beatStructure = #'( 3 3 3 3)
|
2015-11-05 03:28:25 +01:00
|
|
|
}
|
|
|
|
|
2016-11-23 03:24:56 +01:00
|
|
|
sixteenthBeaming = {
|
|
|
|
\set baseMoment = #(ly:make-moment 1/16)
|
2016-12-02 11:48:18 +01:00
|
|
|
\set beatStructure = #'( 4 4 4 4)
|
2016-11-23 03:24:56 +01:00
|
|
|
}
|
|
|
|
sixteenthReelBeaming = {
|
|
|
|
\set baseMoment = #(ly:make-moment 1/16)
|
2016-12-02 11:48:18 +01:00
|
|
|
\set beatStructure = #'( 8 8 8 8)
|
2016-11-23 03:24:56 +01:00
|
|
|
}
|
|
|
|
sixteenthCompoundBeaming = {
|
|
|
|
\set baseMoment = #(ly:make-moment 1/16)
|
2016-12-02 11:48:18 +01:00
|
|
|
\set beatStructure = #'( 6 6 6 6)
|
2016-11-23 03:24:56 +01:00
|
|
|
}
|
2015-11-05 01:39:52 +01:00
|
|
|
% triplet
|
|
|
|
triplet = #(define-music-function (parser location notes) (ly:music?) #{ \tuplet 3/2 { $notes } #})
|
|
|
|
|
|
|
|
% dynamics
|
|
|
|
v = #(define-event-function (parser location) () #{ \upbow #})
|
|
|
|
|
|
|
|
% dynamics with extended lines
|
|
|
|
dynLine = #(define-music-function
|
|
|
|
(parser location text)
|
|
|
|
(markup?)
|
|
|
|
#{
|
|
|
|
\once \override TextSpanner.style = #'line
|
|
|
|
\once \override TextSpanner.bound-details.left.text = \markup {
|
|
|
|
\combine
|
|
|
|
\draw-line #'(0 . -1)
|
|
|
|
\draw-line #'(1 . 0)
|
|
|
|
\dynamic #text
|
|
|
|
}
|
|
|
|
\once \override TextSpanner.bound-details.right.text = \markup { \draw-line #'(0 . -1) }
|
|
|
|
#})
|
|
|
|
|
2016-10-26 11:21:41 +02:00
|
|
|
% unison brackets
|
2017-02-02 17:06:20 +01:00
|
|
|
% TODO: a little 'u'
|
|
|
|
% TODO: open ended brackets(\odr,\ofr)
|
2016-10-26 11:21:41 +02:00
|
|
|
dr = #(define-event-function (parser location) () #{ \startGroup #})
|
|
|
|
fr = #(define-event-function (parser location) () #{ \stopGroup #})
|
2017-02-02 17:06:20 +01:00
|
|
|
odr = #(define-event-function (parser location) () #{ \startGroup #})
|
|
|
|
ofr = #(define-event-function (parser location) () #{ \stopGroup #})
|
2017-05-03 13:16:58 +02:00
|
|
|
tutti = #(define-music-function (mus) (ly:music?)
|
|
|
|
; By Jan-Peter Voigt, Tue, 2 May 2017 11:10:46 +0200
|
|
|
|
(let* ((elms (ly:music-property mus 'elements))
|
|
|
|
; first and last music-element ...
|
|
|
|
(frst (first elms)) ; TODO test for list? and ly:music?
|
|
|
|
(lst (last elms)) ; TODO test for list? and ly:music?
|
|
|
|
(fartic (ly:music-property frst 'articulations '())) ; look
|
|
|
|
for eventchords ...
|
|
|
|
(lartic (ly:music-property lst 'articulations '()))
|
|
|
|
)
|
|
|
|
(ly:music-set-property! frst 'articulations `(,@fartic ,(make-music 'NoteGroupingEvent 'span-direction -1)))
|
|
|
|
(ly:music-set-property! lst 'articulations `(,@lartic ,(make-music 'NoteGroupingEvent 'span-direction 1)))
|
|
|
|
#{
|
|
|
|
#mus
|
|
|
|
#}))
|