Hallo Musi,
da ich gestern kaum Zeit hatte hier noch eine ausgearbeitete Fassung:
\version "2.14.1"
\header {
title = "Notenschlüsselübung 1"
}
\paper {
markup-system-spacing =
#'((basic-distance . 12)
(minimum-distance . 20)
(padding . 1)
(stretchability . 12))
system-system-spacing =
#'((basic-distance . 12)
(minimum-distance . 20)
(padding . 1)
(stretchability . 12))
}
linesOne =
\relative c' {
\mark\markup { "Violin-Schlüssel" }
\override Staff.StaffSymbol #'line-positions = #'(-4 -2.1 -2 -1.9 0 2 4)
\clef treble
s1
\stopStaff\break
\startStaff
\mark\markup { "Bass-Schlüssel" }
\override Staff.StaffSymbol #'line-positions = #'(-4 -2 0 1.9 2 2.1 4)
\clef bass
s1
\stopStaff\break
\startStaff
\mark\markup { "Alt-Schlüssel" }
\override Staff.StaffSymbol #'line-positions = #'(-4 -2 -0.1 0 0.1 2 4)
\clef alto
s1
}
\score {
\new Staff \linesOne
\layout {
indent = 0
\context {
\Score
\remove "Bar_number_engraver"
\override RehearsalMark #'break-align-symbols = #'(time-signature key-signature)
\override RehearsalMark #'self-alignment-X = #LEFT
\override RehearsalMark #'Y-offset = #'6
}
\context {
\Staff
\remove "Clef_engraver"
\remove "Time_signature_engraver"
\remove "Bar_engraver"
\override TimeSignature #'break-align-anchor-alignment = #LEFT
}
}
}Anmerkung: Ich benutze mittlerweile 2.14.1. Falls Du noch auf 2.12.x bist, mußt Du den Paper-Block rausnehmen und einen eigenen entwerfen.
Darüber hinaus könntest Du ja auch überlegen die Linien nicht dicker sondern farbig zu gestalten.
Dazu habe ich
LSR-snippet 700 benutzt und mit Anleitung eines
Beitrags auf Old Nabble für 2.14.1 nutzbar gemacht. (Es sollte so aber auch mit 2.12.x funktionieren, falls nicht so melde Dich). Für den Paper-Block gilt dasselbe wie oben:
\version "2.14.1"
%LSR This snippet was contributed by Neil Puttock
#(define-public ((color-staff-lines . rest) grob)
(define (index-cell cell dir)
(if (equal? dir RIGHT)
(cdr cell)
(car cell)))
(define (interval-translate iv amount)
(cons (+ amount (car iv))
(+ amount (cdr iv))))
(define (index-set-cell! x dir val)
(case dir
((-1) (set-car! x val))
((1) (set-cdr! x val))))
(let* ((common (ly:grob-system grob))
(span-points '(0 . 0))
(thickness (* (ly:grob-property grob 'thickness 1.0)
(ly:output-def-lookup (ly:grob-layout grob) 'line-thickness)))
(width (ly:grob-property grob 'width))
(line-positions (ly:grob-property grob 'line-positions))
(staff-space (ly:grob-property grob 'staff-space 1))
(line-stencil #f)
(total-lines empty-stencil)
;; use a local copy of colors list, since
;; stencil creation mutates list
(colors rest))
(for-each
(lambda (dir)
(if (and (= dir RIGHT)
(number? width))
(set-cdr! span-points width)
(let* ((bound (ly:spanner-bound grob dir))
(bound-ext (ly:grob-extent bound bound X)))
(index-set-cell! span-points dir
(ly:grob-relative-coordinate bound common X))
(if (and (not (ly:item-break-dir bound))
(not (interval-empty? bound-ext)))
(index-set-cell! span-points dir
(+ (index-cell span-points dir)
(index-cell bound-ext dir))))))
(index-set-cell! span-points dir (- (index-cell span-points dir)
(* dir thickness 0.5))))
(list LEFT RIGHT))
(set! span-points
(interval-translate span-points
(- (ly:grob-relative-coordinate grob common X))))
(set! line-stencil
(make-line-stencil thickness (car span-points) 0 (cdr span-points) 0))
(if (pair? line-positions)
(for-each (lambda (position)
(let ((color (if (pair? colors)
(car colors)
#f)))
(set! total-lines
(ly:stencil-add
total-lines
(ly:stencil-translate-axis
(if (color? color)
(ly:stencil-in-color line-stencil
(first color)
(second color)
(third color))
line-stencil)
;(ly:stencil-extent line-stancil 2)
(* position staff-space 0.5) Y)))
(and (pair? colors)
(set! colors (cdr colors)))))
line-positions)
(let* ((line-count (ly:grob-property grob 'line-count 5))
(height (* (1- line-count) (/ staff-space 2))))
(do ((i 0 (1+ i)))
((= i line-count))
(let ((color (if (and (pair? colors)
(> (length colors) i))
(list-ref colors i)
#f)))
(set! total-lines (ly:stencil-add
total-lines
(ly:stencil-translate-axis
(if (color? color)
(ly:stencil-in-color line-stencil
(first color)
(second color)
(third color))
line-stencil)
(- height (* i staff-space)) Y)))))))
total-lines))
\header {
title = "Notenschlüsselübung 2"
}
\paper {
markup-system-spacing =
#'((basic-distance . 12)
(minimum-distance . 20)
(padding . 1)
(stretchability . 12))
system-system-spacing =
#'((basic-distance . 12)
(minimum-distance . 20)
(padding . 1)
(stretchability . 12))
}
linesTwo =
\relative c' {
\mark\markup { "Violin-Schlüssel" }
\clef treble
\override Staff.StaffSymbol #'stencil = #(color-staff-lines #f #f #f red)
s1
\stopStaff
\break
\revert Staff.StaffSymbol #'stencil
\startStaff
\mark\markup { "Bass-Schlüssel" }
\clef bass
\override Staff.StaffSymbol #'stencil = #(color-staff-lines #f red)
s1
\stopStaff
\break
\revert Staff.StaffSymbol #'stencil
\startStaff
\mark\markup { "Alt-Schlüssel" }
\clef alto
\override Staff.StaffSymbol #'stencil = #(color-staff-lines #f #f red)
s1
}
\score {
\new Staff \linesTwo
\layout {
indent = 0
\context {
\Score
\remove "Bar_number_engraver"
\override RehearsalMark #'break-align-symbols = #'(time-signature key-signature)
\override RehearsalMark #'self-alignment-X = #LEFT
\override RehearsalMark #'Y-offset = #'6
}
\context {
\Staff
\remove "Clef_engraver"
\remove "Time_signature_engraver"
\remove "Bar_engraver"
\override TimeSignature #'break-align-anchor-alignment = #LEFT
}
}
}Gruß,
Harm
Nachtrag:
Die Änderungen der Linien sollten pro Zeile erfolgen, da sonst beim ändern des Schlüssels ein Bug sichtbar wird den ich nicht wegbekommen habe.
\relative c' {
\override Staff.StaffSymbol #'line-positions = #'(-4 -2.1 -2 -1.9 0 2 4)
c4 d e f
\stopStaff
\revert Staff.StaffSymbol #'line-positions
\startStaff
\override Staff.StaffSymbol #'line-positions = #'(-4 -2 0 1.9 2 2.1 4)
\clef bass
c d e f
}Entsprechendes kann man auch im LSR-snippet provozieren.