[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing the "midpoint" of a custom staff for stem direction purpose
From: |
Paul Morris |
Subject: |
Re: Changing the "midpoint" of a custom staff for stem direction purposes |
Date: |
Sun, 10 Feb 2013 23:32:55 -0500 |
On Feb 10, 2013, at 6:09 PM, Eluze <address@hidden> wrote:
> I never used such transformations, but in
>
> /NR 1.6.2 Modifying single staves /(2.17.11) I found:
>
> "The clef position and the position of middle C may need to be adjusted
> accordingly to fit
> the new lines."
Thanks Eluze. I had actually tried this, as follows:
1. Set the custom staff line-positions so that they are centered on the default
staff midpoint (0). This means the direction of stems are automatically
correct. No Scheme needed.
2. Set middleCPosition and clefPosition for the staff to adjust the notes and
clef so they appear at the correct vertical positions on the staff.
(See example code below.)
The only trouble is that any time there's a clef change, you have to manually
re-do the custom middleCPosition and clefPosition that you had set, since each
new clef overwrites these staff settings with the default values (not your
custom values).
I guess ideally the midpoint of the staff would be a customizable Staff
property (so that stem directions could be correct when using custom staff line
positions).
And/or it would be handy if there were a way to set what the middleCPosition(s)
and clefPosition(s) should be for clefs on a given staff once, without having
to manually reset them with each clef change. So basically if there were a way
to customize the values that are set for middleCPosition and clefPosition for
each type of clef, within a given staff.
I'm not sure if there's a way to use Scheme to override the clef setting
operation to apply custom values instead of the defaults, maybe with a custom
clef engraver?
I realize we're pretty far into non-standard customization territory here...
Cheers,
-Paul
%%%% BEGIN %%%%
\version "2.16.1"
theMusic = \relative c' {
% adjustments to middleCPosition and clefPosition
% overwritten by new clef signs
c4 e g c
\clef bass
c,, e g c
\clef treble
c e g c
\break
% manual re-setting required to restore correct positions
\set Staff.middleCPosition = #-5
\set Staff.clefPosition = #-1
c,4 e g c
\clef bass
\set Staff.middleCPosition = #-2
\set Staff.clefPosition = #1
c, e g c
\clef treble
\set Staff.middleCPosition = #-5
\set Staff.clefPosition = #-1
c, e g c
}
\score {
\new Staff \with {
\override StaffSymbol #'line-positions = #'( -3 -1 1 3)
middleCPosition = #-5
clefPosition = #-1
}
{\theMusic }
\layout {}
}
%%%% END %%%%