[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: treble and bass clef simultaneously
From: |
Thomas Morley |
Subject: |
Re: treble and bass clef simultaneously |
Date: |
Thu, 28 Mar 2019 01:02:36 +0100 |
Am Mi., 27. März 2019 um 09:27 Uhr schrieb Werner LEMBERG <address@hidden>:
>
>
> Folks,
>
>
> for a solitary bass note I want to have a bass clef, not affecting
> anything else in the staff. How can I fix the attached example?
>
> I guess I need a music function that adjusts the vertical note offset
> of the upper voice...
>
>
> Werner
>
>
> ======================================================================
>
>
> \version "2.19.83"
>
> fakeBassClef = {
> \once\set Staff.clefGlyph = #"clefs.F"
> \once\set Staff.clefPosition = #-8
> \once\set Staff.middleCPosition = #6
> \once\override Staff.Clef.font-size = #-3
> \once\override Staff.Clef.full-size-change = ##t
> \once\override Score.BreakAlignment #'break-align-orders =
> #(make-vector 3 '(span-bar
> breathing-sign
> staff-bar
> key-cancellation
> key-signature
> time-signature
> clef))
> }
>
> \relative c' {
> << { c'8 g a g c \once\omit Staff.Clef g a g } \\
> { s2 \fakeBassClef c,,,4\laissezVibrer s4 } >>
> }
Hi Werner,
here my factious approach:
\version "2.19.82"
\layout {
\context {
\Voice
\name "ClefVoice"
\alias "Voice"
\consists "Clef_engraver"
clefGlyph = #"clefs.F"
middleCPosition = #6
clefPosition = #-8
explicitClefVisibility = ##(#f #t #t)
\override Clef.full-size-change = ##t
\override Clef.font-size = #-4
\override Clef.space-alist.next-note = #'(fixed-space . 2)
\override Clef.after-line-breaking =
#(lambda (grob)
(let ((col (ly:item-get-column grob)))
(if (eqv? (ly:item-break-dir grob) 1)
(ly:grob-translate-axis!
grob
(cdr (ly:grob-extent col col X))
X))))
}
%% probably let ClefVoice be accepted by other contexts too
\context {
\Staff
\accepts "ClefVoice"
}
}
clefTst =
#(define-music-function (m1 m2)(ly:music? ly:music?)
#{
<<
$m1
\context ClefVoice = "ClefVoice" {
\voiceTwo
%% Mmmh, this is a Score-override, may cause problems ...
\temporary \override Score.BreakAlignment.before-line-breaking =
#(lambda (grob)
(if (eqv? (ly:item-break-dir grob) 0)
(ly:grob-set-property! grob 'break-align-orders
(make-vector 3 '(span-bar
breathing-sign
staff-bar
key-cancellation
key-signature
time-signature
clef)))))
\set forceClef = ##t
$m2
\revert Score.BreakAlignment.before-line-breaking
}
>>
#})
\new Staff = "left"
\relative c'' {
%\key ces \major
\clef treble
c8 g a g
\clefTst { <fis ais cis> g } c,,,4
a'''8 g |
\clefTst { <fis ais cis>8 g } { c,,,4 } a'''8 g c g a g |
\break
\clefTst { <fis ais cis>8 g } { c,,,4 } a'''8 g c g a g |
c8 g a g \clefTst { <fis ais cis> g } { c,,,4 } a'''8 g |
}
\new PianoStaff {
<<
\new Staff = "right" \relative c'' {
c1 | c1 | c1 | c1 |
}
\new Staff = "left" \relative c'' {
c8 g a g \clefTst { <fis ais cis> g } { c,,,4 } a'''8 g |
\clefTst { <fis ais cis>8 g } { c,,,4 } a'''8 g c g a g |
\break
\clefTst { <fis ais cis>8 g } { c,,,4 } a'''8 g c g a g |
c8 g a g \clefTst { <fis ais cis> g } { c,,,4 } a'''8 g |
}
>>
}
It's not tested beyond the given example, though.
Cheers,
Harm
- Re: treble and bass clef simultaneously, (continued)
Re: treble and bass clef simultaneously, Andrew Bernard, 2019/03/27
Re: treble and bass clef simultaneously,
Thomas Morley <=
- Re: treble and bass clef simultaneously, Werner LEMBERG, 2019/03/28
- Re: treble and bass clef simultaneously, Thomas Morley, 2019/03/28
- Re: treble and bass clef simultaneously, Thomas Morley, 2019/03/29
- Re: treble and bass clef simultaneously, Werner LEMBERG, 2019/03/30
- Re: treble and bass clef simultaneously, Thomas Morley, 2019/03/30
- Re: treble and bass clef simultaneously, Thomas Morley, 2019/03/30