X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fmusic-functions-init.ly;h=10af2cfefb8f720f02b034d67d9894b0e08a02b4;hb=9173ba70cca2ef771e2e2a190edbfabf63f42b28;hp=2e2a154d7d904fc73ffbdffb44a9aab155decfb7;hpb=b59eedcb6fbda723022e42121880fb8c27618eda;p=lilypond.git diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 2e2a154d7d..10af2cfefb 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -446,14 +446,19 @@ markups), or inside a score.") %% doing %% define-music-function in a .scm causes crash. -octave = +octaveCheck = #(define-music-function (parser location pitch-note) (ly:music?) (_i "octave check") (make-music 'RelativeOctaveCheck 'origin location 'pitch (pitch-of-note pitch-note) - )) + )) + +ottava = #(define-music-function (parser location octave) (number?) + (_i "set the octavation ") + (make-ottava-set octave)) + partcombine = #(define-music-function (parser location part1 part2) (ly:music? ly:music?) (make-part-combine-music parser @@ -471,20 +476,24 @@ pitchedTrill = (ly:music-property ev-chord 'elements)))) (sec-note-events (get-notes secondary-note)) (trill-events (filter (lambda (m) (music-has-type m 'trill-span-event)) - (ly:music-property main-note 'elements))) - - (trill-pitch - (if (pair? sec-note-events) - (ly:music-property (car sec-note-events) 'pitch) - ))) - - (if (ly:pitch? trill-pitch) - (for-each (lambda (m) (ly:music-set-property! m 'pitch trill-pitch)) - trill-events) - (begin - (ly:warning (_ "Second argument of \\pitchedTrill should be single note: ")) - (display sec-note-events))) + (ly:music-property main-note 'elements)))) + (if (pair? sec-note-events) + (begin + (let* + ((trill-pitch (ly:music-property (car sec-note-events) 'pitch)) + (forced (ly:music-property (car sec-note-events ) 'force-accidental))) + + (if (ly:pitch? trill-pitch) + (for-each (lambda (m) (ly:music-set-property! m 'pitch trill-pitch)) + trill-events) + (begin + (ly:warning (_ "Second argument of \\pitchedTrill should be single note: ")) + (display sec-note-events))) + + (if (eq? forced #t) + (for-each (lambda (m) (ly:music-set-property! m 'force-accidental forced)) + trill-events))))) main-note))