Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.21"
+@c \version "2.19.25"
@node Keyboard and other multi-staff instruments
@section Keyboard and other multi-staff instruments
}
@end lilypond
+@noindent
+It is possible to specify other pitches for the turning point.
+If the staves are not instantiated explicitly, other clefs may be used.
+
+@lilypond[quote,verbatim]
+music = {
+ g8 b a c' b8 d' c'8 e'
+ d'8 r f' g' a'2
+}
+
+\autochange d' \music
+\autochange b \with { \clef soprano } \music
+\autochange d' \with { \clef alto } \with { \clef tenor } \music
+@end lilypond
+
@cindex relative music and autochange
@cindex autochange and relative music
--- /dev/null
+
+\version "2.19.25"
+
+\header {
+ texidoc=" Other clefs for the autochanger may be set. This works for
+implicitly created staves only.
+The first example should turn at b with soprano-clef in the upper Staff.
+The second example should turn at d' with alto-clef in the upper and tenor-clef
+in the lower Staff.
+"
+}
+
+\layout { ragged-right= ##t }
+
+music = {
+ g8 b a c'
+ b8 d' c'8 e'
+ d'8 r f' g' a'2
+}
+
+\autochange b \with { \clef soprano } \music
+\autochange d' \with { \clef alto } \with { \clef tenor } \music
--- /dev/null
+
+\version "2.19.25"
+
+\header {
+ texidoc=" Other turning points for the autochanger are possible."
+}
+
+\layout { ragged-right= ##t }
+
+\context PianoStaff <<
+ \context Staff = "up" {
+ \autochange \relative { <>^"default c' " b4 c d e }
+ \autochange d' \relative { <>^"switch after d' " b c d e }
+ }
+ \context Staff = "down" {
+ \clef bass
+ s1*2
+ }
+>>
%%%% You should have received a copy of the GNU General Public License
%%%% along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-\version "2.19.22"
+\version "2.19.25"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(make-grob-property-override 'Beam 'positions (check-slope-callbacks comp)))
autochange =
-#(define-music-function (music) (ly:music?)
- (_i "Make voices that switch between staves automatically")
- (let ;; keep the contexts alive for the full duration
- ((skip (make-skip-music (make-duration-of-length
- (ly:music-length music)))))
- #{
- <<
- \context Staff = "up" <<
- #(make-autochange-music music)
- \new Voice { #skip }
- >>
- \context Staff = "down" \with {
- clefGlyph = "clefs.F"
- clefPosition = 2
- middleCPosition = 6
- middleCClefPosition = 6
- } {
- \new Voice { #skip }
- }
- >>
- #} ))
+#(define-music-function (pitch clef-1 clef-2 music)
+ ((ly:pitch? (ly:make-pitch 0 0)) (ly:context-mod?)(ly:context-mod?) ly:music?)
+ (_i "Make voices that switch between staves automatically. As an option the
+pitch where to switch staves may be specified. The clefs for the staves are
+optional as well. Setting clefs works only for implicitly instantiated
+staves.")
+ (let ;; keep the contexts alive for the full duration
+ ((skip (make-skip-music (make-duration-of-length
+ (ly:music-length music)))))
+ #{
+ <<
+ \context Staff = "up" $(or clef-1 #{ \with { \clef "treble" } #})
+ <<
+ #(make-autochange-music pitch music)
+ \new Voice { #skip }
+ >>
+ \context Staff = "down" $(or clef-2 #{ \with { \clef "bass" } #})
+ \new Voice { #skip }
+ >>
+ #}))
balloonGrobText =
#(define-music-function (grob-name offset text)
-
+;;;; This file is part of LilyPond, the GNU music typesetter.
+;;;;
+;;;; Copyright (C) 2000--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; Jan Nieuwenhuizen <janneke@gnu.org>
+;;;;
+;;;; LilyPond is free software: you can redistribute it and/or modify
+;;;; it under the terms of the GNU General Public License as published by
+;;;; the Free Software Foundation, either version 3 of the License, or
+;;;; (at your option) any later version.
+;;;;
+;;;; LilyPond is distributed in the hope that it will be useful,
+;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;;; GNU General Public License for more details.
+;;;;
+;;;; You should have received a copy of the GNU General Public License
+;;;; along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; autochange.scm - fairly related to part combining.
-(define-public (make-autochange-music music)
+(define-public (make-autochange-music ref-pitch music)
(define (generate-split-list change-moment prev-dir event-list acc)
(if (null? event-list)
acc
(pitch (if (pair? notes)
(ly:event-property (car notes) 'pitch)
#f))
- (dir (if pitch (sign (ly:pitch-steps pitch)) 0)))
+ (dir (if pitch
+ (sign
+ (- (ly:pitch-steps pitch) (ly:pitch-steps ref-pitch)))
+ 0)))
;; tail recursive.
(if (and (not (= dir 0))
(not (= dir prev-dir)))
dir
(cdr event-list)
(cons (cons
-
(if change-moment
change-moment
now)
(let* ((m (make-music 'AutoChangeMusic))
(m1 (context-spec-music (make-non-relative-music music) 'Voice ""))
- (context-list (recording-group-emulate m1
- (ly:parser-lookup 'partCombineListener)))
+ (context-list
+ (recording-group-emulate m1
+ (ly:parser-lookup 'partCombineListener)))
(rev (reverse! (cdar context-list)))
(split (reverse! (generate-split-list
#f